diff --git a/.github/doc_issue_template.md b/.github/doc_issue_template.md new file mode 100644 index 000000000000..c34905605b2f --- /dev/null +++ b/.github/doc_issue_template.md @@ -0,0 +1,11 @@ +**Is your feature request related to a problem?** +A new feature has been added. + +**What solution would you like?** +Document the usage of the new feature. + +**What alternatives have you considered?** +N/A + +**Do you have any additional context?** +See please diff --git a/.github/workflows/create_doc_issue.yml b/.github/workflows/create_doc_issue.yml new file mode 100644 index 000000000000..653163247778 --- /dev/null +++ b/.github/workflows/create_doc_issue.yml @@ -0,0 +1,42 @@ +name: Create Documentation Issue +on: + pull_request: + types: + - labeled +env: + PR_NUMBER: ${{ github.event.number }} + +jobs: + create-issue: + if: ${{ github.event.label.name == 'needs-documentation' }} + runs-on: ubuntu-latest + name: Create Documentation Issue + steps: + - name: GitHub App token + id: github_app_token + uses: tibdex/github-app-token@v1.5.0 + with: + app_id: ${{ secrets.APP_ID }} + private_key: ${{ secrets.APP_PRIVATE_KEY }} + # opensearch-trigger-bot installation ID + installation_id: 22958780 + + - name: Checkout code + uses: actions/checkout@v2 + + - name: Edit the issue template + run: | + echo "https://github.com/opensearch-project/OpenSearch-Dashboards/pull/${{ env.PR_NUMBER }}." >> ./.github/doc_issue_template.md + + - name: Create Issue From File + id: create-issue + uses: peter-evans/create-issue-from-file@v4 + with: + title: Add documentation related to new feature + content-filepath: ./.github/doc_issue_template.md + labels: documentation + repository: opensearch-project/documentation-website + token: ${{ steps.github_app_token.outputs.token }} + + - name: Print Issue + run: echo "Created related documentation issue ${{ steps.create-issue.outputs.issue-number }}" diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 000000000000..fcb38e9ff339 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,2 @@ +# use stylelint +*.scss diff --git a/.stylelintignore b/.stylelintignore new file mode 100644 index 000000000000..b3fdf275c9a4 --- /dev/null +++ b/.stylelintignore @@ -0,0 +1,2 @@ +build +target \ No newline at end of file diff --git a/.stylelintrc.yml b/.stylelintrc.yml new file mode 100644 index 000000000000..8a70ee1dd008 --- /dev/null +++ b/.stylelintrc.yml @@ -0,0 +1,19 @@ +extends: + - stylelint-config-standard-scss +rules: + # while we still use node-sass, only legacy rgb() notation is allowed + color-function-notation: "legacy" + # recommended to turn off descending specificity since we use a lot of nesting: + # https://stylelint.io/user-guide/rules/list/no-descending-specificity/ + no-descending-specificity: null + # need to use global function/value names from EUI + function-name-case: null + value-keyword-case: null + scss/no-global-function-names: null + # camelCase names + keyframes-name-pattern: "^[a-z][a-zA-Z0-9_-]+$" + selector-class-pattern: "^[a-z][a-zA-Z0-9_-]+$" + selector-id-pattern: "^[a-z][a-zA-Z0-9_-]+$" + scss/at-mixin-pattern: "^[a-z][a-zA-Z0-9_-]+$" + scss/at-function-pattern: "^[a-z][a-zA-Z0-9_-]+$" + scss/dollar-variable-pattern: "^[a-z][a-zA-Z0-9_-]+$" diff --git a/.whitesource b/.whitesource new file mode 100644 index 000000000000..7dd2131e7c7d --- /dev/null +++ b/.whitesource @@ -0,0 +1,15 @@ +{ + "scanSettings": { + "configMode": "LOCAL", + "configExternalURL": "", + "projectToken": "", + "baseBranches": [] + }, + "checkRunSettings": { + "vulnerableCheckRunConclusionLevel": "failure", + "displayMode": "diff" + }, + "issueSettings": { + "minSeverityLevel": "LOW" + } +} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 08ebfbdf6b2d..e01afadf8b10 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,30 @@ # CHANGELOG Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +## [Unreleased](https://github.com/opensearch-project/OpenSearch-Dashboards/compare/1.3.16...1.3) + +### 💥 Breaking Changes + +### Deprecations + +### 🛡 Security + +### 📈 Features/Enhancements + +### 🐛 Bug Fixes + +### 🚞 Infrastructure + +### 📝 Documentation + +### 🛠 Maintenance + +- [Version] Increment version to 1.3.18 ([](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/)) + +### 🪛 Refactoring + +### 🔩 Tests + ## [1.3.17 - 2024-06-06](https://github.com/opensearch-project/OpenSearch-Dashboards/releases/tag/1.3.17) ### 💥 Breaking Changes diff --git a/dev-tools/get-version.sh b/dev-tools/get-version.sh new file mode 100755 index 000000000000..555dd89e9e9c --- /dev/null +++ b/dev-tools/get-version.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +# Copyright OpenSearch Contributors +# SPDX-License-Identifier: Apache-2.0 + +set -e + +PACKAGE_VERSION=$(cat package.json \ +| grep version \ +| head -1 \ +| awk -F: '{ print $2 }' \ +| sed 's/[",]//g' \ +| tr -d [:space:]) + +echo "$PACKAGE_VERSION" \ No newline at end of file diff --git a/examples/expressions_example/.eslintrc.js b/examples/expressions_example/.eslintrc.js new file mode 100644 index 000000000000..d40ef4ec9091 --- /dev/null +++ b/examples/expressions_example/.eslintrc.js @@ -0,0 +1,12 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +module.exports = { + root: true, + extends: ['@elastic/eslint-config-kibana', 'plugin:@elastic/eui/recommended'], + rules: { + '@osd/eslint/require-license-header': 'off', + }, +}; diff --git a/examples/expressions_example/.i18nrc.json b/examples/expressions_example/.i18nrc.json new file mode 100644 index 000000000000..a4777b0c81b7 --- /dev/null +++ b/examples/expressions_example/.i18nrc.json @@ -0,0 +1,7 @@ +{ + "prefix": "expressionsExample", + "paths": { + "expressionsExample": "." + }, + "translations": ["translations/ja-JP.json"] +} diff --git a/examples/expressions_example/README.md b/examples/expressions_example/README.md new file mode 100755 index 000000000000..009a67cd6504 --- /dev/null +++ b/examples/expressions_example/README.md @@ -0,0 +1,11 @@ +# expressions_example + +An OpenSearch Dashboards example plugin to demonstrate the expressions plugin + +--- + +## Development + +See the [OpenSearch Dashboards contributing +guide](https://github.com/opensearch-project/OpenSearch-Dashboards/blob/master/CONTRIBUTING.md) for instructions +setting up your development environment. diff --git a/examples/expressions_example/common/expression_functions/action/index.ts b/examples/expressions_example/common/expression_functions/action/index.ts new file mode 100644 index 000000000000..17e5f37c3d31 --- /dev/null +++ b/examples/expressions_example/common/expression_functions/action/index.ts @@ -0,0 +1,7 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +export * from './quick_form_fn'; +export * from './quick_form_renderer'; diff --git a/examples/expressions_example/common/expression_functions/action/quick_form_fn.ts b/examples/expressions_example/common/expression_functions/action/quick_form_fn.ts new file mode 100644 index 000000000000..1eb4c59d0029 --- /dev/null +++ b/examples/expressions_example/common/expression_functions/action/quick_form_fn.ts @@ -0,0 +1,53 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import { i18n } from '@osd/i18n'; +import { + ExpressionFunctionDefinition, + Render, +} from '../../../../../src/plugins/expressions/public'; +import { QuickFormRenderValue } from './quick_form_renderer'; + +type Arguments = QuickFormRenderValue; + +export const quickFormFn = (): ExpressionFunctionDefinition< + 'quick-form', + unknown, + Arguments, + Render +> => ({ + name: 'quick-form', + type: 'render', + help: i18n.translate('expressionsExample.function.avatar.help', { + defaultMessage: 'Render a simple form that sends the value back as an event on click', + }), + args: { + label: { + types: ['string'], + help: i18n.translate('expressionsExample.function.form.args.label.help', { + defaultMessage: 'Form label', + }), + default: i18n.translate('expressionsExample.function.form.args.label.default', { + defaultMessage: 'Input', + }), + }, + buttonLabel: { + types: ['string'], + help: i18n.translate('expressionsExample.function.form.args.buttonLabel.help', { + defaultMessage: 'Button label', + }), + default: i18n.translate('expressionsExample.function.form.args.buttonLabel.default', { + defaultMessage: 'Submit', + }), + }, + }, + fn: (input, args) => { + return { + type: 'render', + as: 'quick-form-renderer', + value: { ...args }, + }; + }, +}); diff --git a/examples/expressions_example/common/expression_functions/action/quick_form_renderer.tsx b/examples/expressions_example/common/expression_functions/action/quick_form_renderer.tsx new file mode 100644 index 000000000000..5c987595e1f2 --- /dev/null +++ b/examples/expressions_example/common/expression_functions/action/quick_form_renderer.tsx @@ -0,0 +1,61 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import React, { useCallback, useState } from 'react'; +import { EuiForm, EuiFormRow, EuiButton, EuiFieldText } from '@elastic/eui'; +import { i18n } from '@osd/i18n'; +import { render, unmountComponentAtNode } from 'react-dom'; +import { ExpressionRenderDefinition } from '../../../../../src/plugins/expressions/public'; + +export interface QuickFormRenderValue { + label: string; + buttonLabel: string; +} + +export const quickFormRenderer: ExpressionRenderDefinition = { + name: 'quick-form-renderer', + displayName: i18n.translate('expressionsExample.form.render.help', { + defaultMessage: 'Render a simple input form', + }), + reuseDomNode: true, + render: (domNode, config, handlers) => { + handlers.onDestroy(() => { + unmountComponentAtNode(domNode); + }); + + render( + + handlers.event({ + data: value, + }) + } + />, + domNode, + handlers.done + ); + }, +}; + +interface QuickFormProps extends QuickFormRenderValue { + onSubmit: Function; +} + +const QuickForm = ({ onSubmit, buttonLabel, label }: QuickFormProps) => { + const [value, setValue] = useState(''); + const handleClick = useCallback(() => { + onSubmit(value); + }, [onSubmit, value]); + + return ( + + + setValue(e.target.value)} /> + + {buttonLabel} + + ); +}; diff --git a/examples/expressions_example/common/expression_functions/basic/index.ts b/examples/expressions_example/common/expression_functions/basic/index.ts new file mode 100644 index 000000000000..551f8e4f2d59 --- /dev/null +++ b/examples/expressions_example/common/expression_functions/basic/index.ts @@ -0,0 +1,7 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +export * from './sleep'; +export * from './square'; diff --git a/examples/expressions_example/common/expression_functions/basic/sleep.ts b/examples/expressions_example/common/expression_functions/basic/sleep.ts new file mode 100644 index 000000000000..5722369920b5 --- /dev/null +++ b/examples/expressions_example/common/expression_functions/basic/sleep.ts @@ -0,0 +1,31 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import { i18n } from '@osd/i18n'; +import { ExpressionFunctionDefinition } from '../../../../../src/plugins/expressions/public'; + +interface Arguments { + time: number; +} + +export const sleep = (): ExpressionFunctionDefinition<'sleep', any, Arguments, any> => ({ + name: 'sleep', + help: i18n.translate('expressionsExample.function.sleep.help', { + defaultMessage: 'Generates range object', + }), + args: { + time: { + types: ['number'], + help: i18n.translate('expressionsExample.function.sleep.time.help', { + defaultMessage: 'Time for settimeout', + }), + required: false, + }, + }, + fn: async (input, args, context) => { + await new Promise((r) => setTimeout(r, args.time)); + return input; + }, +}); diff --git a/examples/expressions_example/common/expression_functions/basic/square.ts b/examples/expressions_example/common/expression_functions/basic/square.ts new file mode 100644 index 000000000000..899afed37e05 --- /dev/null +++ b/examples/expressions_example/common/expression_functions/basic/square.ts @@ -0,0 +1,18 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import { i18n } from '@osd/i18n'; +import { ExpressionFunctionDefinition } from '../../../../../src/plugins/expressions/public'; + +export const square = (): ExpressionFunctionDefinition<'square', number, {}, any> => ({ + name: 'square', + help: i18n.translate('expressionsExample.function.square.help', { + defaultMessage: 'Squares the input', + }), + args: {}, + fn: async (input, args, context) => { + return input * input; + }, +}); diff --git a/examples/expressions_example/common/expression_functions/index.ts b/examples/expressions_example/common/expression_functions/index.ts new file mode 100644 index 000000000000..2bf7e68d0038 --- /dev/null +++ b/examples/expressions_example/common/expression_functions/index.ts @@ -0,0 +1,8 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +export * from './basic'; +export * from './render'; +export * from './action'; diff --git a/examples/expressions_example/common/expression_functions/render/avatar_fn.ts b/examples/expressions_example/common/expression_functions/render/avatar_fn.ts new file mode 100644 index 000000000000..004325bec367 --- /dev/null +++ b/examples/expressions_example/common/expression_functions/render/avatar_fn.ts @@ -0,0 +1,52 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import { i18n } from '@osd/i18n'; +import { + ExpressionFunctionDefinition, + Render, +} from '../../../../../src/plugins/expressions/public'; +import { AvatarRenderValue } from './avatar_renderer'; + +type Arguments = AvatarRenderValue; + +export const avatarFn = (): ExpressionFunctionDefinition< + 'avatar', + unknown, + Arguments, + Render +> => ({ + name: 'avatar', + type: 'render', + help: i18n.translate('expressionsExample.function.avatar.help', { + defaultMessage: 'Avatar expression function', + }), + args: { + name: { + types: ['string'], + help: i18n.translate('expressionsExample.function.avatar.args.name.help', { + defaultMessage: 'Enter Name', + }), + required: true, + }, + size: { + types: ['string'], + help: i18n.translate('expressionsExample.function.avatar.args.size.help', { + defaultMessage: 'Size of the avatar', + }), + default: 'l', + }, + }, + fn: (input, args) => { + return { + type: 'render', + as: 'avatar', // the expression renderer to use + value: { + name: args.name, + size: args.size, + }, + }; + }, +}); diff --git a/examples/expressions_example/common/expression_functions/render/avatar_renderer.tsx b/examples/expressions_example/common/expression_functions/render/avatar_renderer.tsx new file mode 100644 index 000000000000..8b2fb3e8efaa --- /dev/null +++ b/examples/expressions_example/common/expression_functions/render/avatar_renderer.tsx @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import React from 'react'; +import { EuiAvatar, EuiAvatarProps } from '@elastic/eui'; +import { i18n } from '@osd/i18n'; +import { render, unmountComponentAtNode } from 'react-dom'; +import { ExpressionRenderDefinition } from '../../../../../src/plugins/expressions/public'; + +export interface AvatarRenderValue { + name: string; + size: EuiAvatarProps['size']; +} + +export const avatar: ExpressionRenderDefinition = { + name: 'avatar', + displayName: i18n.translate('expressionsExample.render.help', { + defaultMessage: 'Render an avatar', + }), + reuseDomNode: true, + render: (domNode, { name, size }, handlers) => { + handlers.onDestroy(() => { + unmountComponentAtNode(domNode); + }); + + render(, domNode, handlers.done); + }, +}; diff --git a/examples/expressions_example/common/expression_functions/render/index.ts b/examples/expressions_example/common/expression_functions/render/index.ts new file mode 100644 index 000000000000..437b2ac9512b --- /dev/null +++ b/examples/expressions_example/common/expression_functions/render/index.ts @@ -0,0 +1,7 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +export * from './avatar_fn'; +export * from './avatar_renderer'; diff --git a/examples/expressions_example/common/index.ts b/examples/expressions_example/common/index.ts new file mode 100644 index 000000000000..3208d933b77c --- /dev/null +++ b/examples/expressions_example/common/index.ts @@ -0,0 +1,7 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +export const PLUGIN_ID = 'expressionsExample'; +export const PLUGIN_NAME = 'expressions_example'; diff --git a/examples/expressions_example/opensearch_dashboards.json b/examples/expressions_example/opensearch_dashboards.json new file mode 100644 index 000000000000..1babbbf31f62 --- /dev/null +++ b/examples/expressions_example/opensearch_dashboards.json @@ -0,0 +1,15 @@ +{ + "id": "expressionsExample", + "version": "1.0.0", + "opensearchDashboardsVersion": "opensearchDashboards", + "server": false, + "ui": true, + "requiredPlugins": [ + "navigation", + "expressions", + "visualizations", + "developerExamples", + "opensearchDashboardsReact" + ], + "optionalPlugins": [] +} \ No newline at end of file diff --git a/examples/expressions_example/public/application.tsx b/examples/expressions_example/public/application.tsx new file mode 100644 index 000000000000..15953cf73ce4 --- /dev/null +++ b/examples/expressions_example/public/application.tsx @@ -0,0 +1,32 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import React from 'react'; +import ReactDOM from 'react-dom'; +import { AppMountParameters, CoreStart } from '../../../src/core/public'; +import { ExpressionsExampleStartDependencies } from './types'; +import { ExpressionsExampleApp } from './components/app'; +import { OpenSearchDashboardsContextProvider } from '../../../src/plugins/opensearch_dashboards_react/public'; + +export const renderApp = ( + { notifications, http }: CoreStart, + { navigation, expressions }: ExpressionsExampleStartDependencies, + { appBasePath, element }: AppMountParameters +) => { + const services = { expressions, notifications }; + ReactDOM.render( + + + , + element + ); + + return () => ReactDOM.unmountComponentAtNode(element); +}; diff --git a/examples/expressions_example/public/components/actions_tab.tsx b/examples/expressions_example/public/components/actions_tab.tsx new file mode 100644 index 000000000000..0d1d9a699c36 --- /dev/null +++ b/examples/expressions_example/public/components/actions_tab.tsx @@ -0,0 +1,53 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import { EuiCallOut, EuiCodeBlock, EuiFormLabel, EuiSpacer } from '@elastic/eui'; +import { i18n } from '@osd/i18n'; +import { FormattedMessage } from '@osd/i18n/react'; +import React, { useCallback } from 'react'; +import { ReactExpressionRenderer } from '../../../../src/plugins/expressions/public'; +import { useOpenSearchDashboards } from '../../../../src/plugins/opensearch_dashboards_react/public'; +import { ExpressionsExampleServices } from '../types'; + +export function ActionsTab() { + const { + services: { notifications }, + } = useOpenSearchDashboards(); + const handleEvent = useCallback( + ({ data }) => { + notifications.toasts.addSuccess(data); + }, + [notifications.toasts] + ); + + const expressionString = `quick-form label="Toast message" buttonLabel="Toast"`; + + return ( + <> + + + + + + + + + {expressionString} + + + + ); +} diff --git a/examples/expressions_example/public/components/app.tsx b/examples/expressions_example/public/components/app.tsx new file mode 100644 index 000000000000..99db0d40765f --- /dev/null +++ b/examples/expressions_example/public/components/app.tsx @@ -0,0 +1,138 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import React, { useMemo } from 'react'; +import { FormattedMessage, I18nProvider } from '@osd/i18n/react'; +import { BrowserRouter as Router } from 'react-router-dom'; + +import { + EuiPage, + EuiPageBody, + EuiPageContent, + EuiPageContentBody, + EuiPageContentHeader, + EuiPageHeader, + EuiTitle, + EuiText, + EuiTabbedContent, +} from '@elastic/eui'; + +import { CoreStart } from '../../../../src/core/public'; +import { NavigationPublicPluginStart } from '../../../../src/plugins/navigation/public'; + +import { BasicTab } from './basic_tab'; +import { RenderTab } from './render_tab'; +import { ActionsTab } from './actions_tab'; +import { PlaygroundTab } from './playground_tab'; +import { ExplorerTab } from './explorer_tab'; + +interface ExpressionsExampleAppDeps { + basename: string; + notifications: CoreStart['notifications']; + http: CoreStart['http']; + navigation: NavigationPublicPluginStart; +} + +export const ExpressionsExampleApp = ({ basename }: ExpressionsExampleAppDeps) => { + const tabs = useMemo( + () => [ + { + id: 'demo-1', + name: ( + + ), + content: , + }, + { + id: 'demo-2', + name: ( + + ), + content: , + }, + { + id: 'demo-3', + name: ( + + ), + content: , + }, + { + id: 'playground', + name: ( + + ), + content: , + }, + { + id: 'explorer', + name: ( + + ), + content: , + }, + ], + [] + ); + // Render the application DOM. + return ( + + + <> + + + + +

+ +

+
+
+ + + +

+ +

+
+
+ + + +
+
+
+ +
+
+ ); +}; diff --git a/examples/expressions_example/public/components/basic_tab.tsx b/examples/expressions_example/public/components/basic_tab.tsx new file mode 100644 index 000000000000..06005b7ca8d6 --- /dev/null +++ b/examples/expressions_example/public/components/basic_tab.tsx @@ -0,0 +1,107 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import { + EuiCodeBlock, + EuiFieldNumber, + EuiForm, + EuiFormRow, + EuiSpacer, + EuiStat, + EuiFormLabel, + EuiCallOut, + EuiProgress, +} from '@elastic/eui'; +import { i18n } from '@osd/i18n'; +import { FormattedMessage } from '@osd/i18n/react'; +import React, { useEffect, useState } from 'react'; +import { useOpenSearchDashboards } from '../../../../src/plugins/opensearch_dashboards_react/public'; +import { ExpressionsExampleServices } from '../types'; + +export function BasicTab() { + const { + services: { expressions }, + } = useOpenSearchDashboards(); + const [input, setInput] = useState(2); + const [loading, setLoading] = useState(false); + const [result, setResult] = useState( + i18n.translate('expressionsExample.tab.demo1.loading', { + defaultMessage: 'Still sleeping', + }) + ); + const expression = `sleep time=2000 | square`; + + useEffect(() => { + let isMounted = true; + + try { + setLoading(true); + const execution = expressions.execute(expression, input); + execution.getData().then((data: any) => { + if (!isMounted) return; + + const value = + data?.type === 'error' + ? `Error: ${data?.error?.message ?? 'Something went wrong'}` + : data; + + setLoading(false); + setResult(String(value)); + }); + } catch (error) { + setLoading(false); + setResult(String(error)); + } + + return () => { + isMounted = false; + }; + }, [expressions, input, expression]); + + return ( + <> + + + + + + + + setInput(Number(e.target.value))} /> + + + + + + + + {loading && } + {expression} + + + + + ); +} diff --git a/examples/expressions_example/public/components/explorer_section.tsx b/examples/expressions_example/public/components/explorer_section.tsx new file mode 100644 index 000000000000..b6b04efc61d4 --- /dev/null +++ b/examples/expressions_example/public/components/explorer_section.tsx @@ -0,0 +1,78 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import { + EuiCallOut, + EuiDescriptionList, + EuiPanel, + EuiSpacer, + EuiTitle, + EuiBasicTable, + EuiText, + EuiBadge, +} from '@elastic/eui'; +import { i18n } from '@osd/i18n'; +import { FormattedMessage } from '@osd/i18n/react'; +import React, { useMemo } from 'react'; +import { ExpressionFunction } from '../../../../src/plugins/expressions'; + +interface Props { + fn: ExpressionFunction; +} + +export function ExplorerSection({ fn }: Props) { + const argumentItems = useMemo( + () => + Object.values(fn.args).map((arg) => ({ + name: arg.name, + default: arg.default, + types: String(arg.types), + required: arg.required, + help: arg.help, + })), + [fn] + ); + + return ( + + {/* arguments */} + +

+ +

+
+ +
+ ); +} diff --git a/examples/expressions_example/public/components/explorer_tab.tsx b/examples/expressions_example/public/components/explorer_tab.tsx new file mode 100644 index 000000000000..14030751e5b3 --- /dev/null +++ b/examples/expressions_example/public/components/explorer_tab.tsx @@ -0,0 +1,163 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import { + EuiCallOut, + EuiFieldSearch, + EuiFlexGroup, + EuiFlexItem, + EuiForm, + EuiFormRow, + EuiSelect, + EuiSpacer, + EuiBasicTable, + EuiButtonIcon, +} from '@elastic/eui'; +import { i18n } from '@osd/i18n'; +import { FormattedMessage } from '@osd/i18n/react'; +import React, { useMemo, useState } from 'react'; +import { RIGHT_ALIGNMENT } from '@elastic/eui/lib/services'; +import { useOpenSearchDashboards } from '../../../../src/plugins/opensearch_dashboards_react/public'; +import { ExpressionsExampleServices } from '../types'; +import { ExplorerSection } from './explorer_section'; + +interface ExpressionFunctionItem { + name: string; + type: string; + help: string; +} + +export function ExplorerTab() { + const { + services: { expressions }, + } = useOpenSearchDashboards(); + const [search, setSearch] = useState(''); + const [filter, setFilter] = useState('all'); + const [itemIdToExpandedRowMap, setItemIdToExpandedRowMap] = useState({}); + + const functions = expressions.getFunctions(); + + const types = useMemo(() => { + const allTypes = new Set(Object.values(functions).map((fn) => fn.type)); + + // Catch all filter and remove + allTypes.delete(undefined); + allTypes.add('all'); + + return [...allTypes].map((type) => ({ text: type })); + }, [functions]); + + const items = useMemo( + () => + Object.values(functions) + .filter((fn) => fn.name.includes(search)) + .filter((fn) => (filter === 'all' ? true : fn.type === filter)) + .map((fn) => ({ + name: fn.name, + type: fn.type, + help: fn.help, + })), + [filter, functions, search] + ); + + const toggleDetails = (item: ExpressionFunctionItem) => { + const { name: id } = item; + const itemIdToExpandedRowMapValues = { ...itemIdToExpandedRowMap }; + if (itemIdToExpandedRowMapValues[id]) { + delete itemIdToExpandedRowMapValues[id]; + } else { + itemIdToExpandedRowMapValues[id] = ; + } + setItemIdToExpandedRowMap(itemIdToExpandedRowMapValues); + }; + + return ( + <> + + + + + + + + + + + setSearch(e.target.value)} + /> + + + + + setFilter(e.target.value)} + /> + + + + + + + ( + toggleDetails(item)} + aria-label={itemIdToExpandedRowMap[item.name] ? 'Collapse' : 'Expand'} + iconType={itemIdToExpandedRowMap[item.name] ? 'arrowUp' : 'arrowDown'} + /> + ), + }, + ]} + items={items} + /> + + {/* {sections} */} + + ); +} diff --git a/examples/expressions_example/public/components/playground_section.tsx b/examples/expressions_example/public/components/playground_section.tsx new file mode 100644 index 000000000000..503074040f32 --- /dev/null +++ b/examples/expressions_example/public/components/playground_section.tsx @@ -0,0 +1,147 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import { + EuiCodeBlock, + EuiFormLabel, + EuiSpacer, + EuiCodeEditor, + EuiPanel, + EuiForm, + EuiFormRow, + EuiFieldText, + EuiTitle, + EuiProgress, + EuiCallOut, +} from '@elastic/eui'; +import { i18n } from '@osd/i18n'; +import { FormattedMessage } from '@osd/i18n/react'; +import React, { useEffect, useMemo, useState } from 'react'; +import { ReactExpressionRenderer } from '../../../../src/plugins/expressions/public'; +import { useOpenSearchDashboards } from '../../../../src/plugins/opensearch_dashboards_react/public'; +import { PersistedState } from '../../../../src/plugins/visualizations/public'; +import { ExpressionsExampleServices } from '../types'; + +interface Props { + title: string; + defaultInput?: string; + defaultExpression: string; + renderType?: boolean; +} + +export function PlaygroundSection({ + title, + defaultExpression, + defaultInput = '10', + renderType = false, +}: Props) { + const { + services: { expressions }, + } = useOpenSearchDashboards(); + const [loading, setLoading] = useState(false); + const [input, setInput] = useState(defaultInput); + const [expression, setExpression] = useState(defaultExpression); + const [result, setResult] = useState(''); + // Visualizations require the uiState to persist even when the expression changes + const uiState = useMemo(() => new PersistedState(), []); + + useEffect(() => { + let isMounted = true; + if (renderType) return; + + try { + setLoading(true); + const execution = expressions.execute(expression, input); + execution.getData().then((data: any) => { + if (!isMounted) return; + + const value = + data?.type === 'error' + ? `Error: ${data?.error?.message ?? 'Something went wrong'}` + : data; + + const parsedValue = typeof value === 'object' ? JSON.stringify(value, null, 2) : value; + + setLoading(false); + setResult(parsedValue); + }); + } catch (error) { + setLoading(false); + setResult(String(error)); + } + + return () => { + isMounted = false; + }; + }, [expressions, input, expression, renderType]); + + return ( + <> + + +

{title}

+
+ + {/* Rendered the input field only for non renderable expressions */} + {!renderType && ( + <> + + + setInput(e.target.value)} /> + + + + + )} + + + + setExpression(value)} + /> + + + + + {renderType ? ( + <> + + + + + ) : ( + + {loading && } + {result} + + )} +
+ + ); +} diff --git a/examples/expressions_example/public/components/playground_tab.tsx b/examples/expressions_example/public/components/playground_tab.tsx new file mode 100644 index 000000000000..9acdbfa89796 --- /dev/null +++ b/examples/expressions_example/public/components/playground_tab.tsx @@ -0,0 +1,53 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import { EuiCallOut, EuiSpacer } from '@elastic/eui'; +import { i18n } from '@osd/i18n'; +import { FormattedMessage } from '@osd/i18n/react'; +import React from 'react'; +import { PlaygroundSection } from './playground_section'; + +export function PlaygroundTab() { + return ( + <> + + + + + + + + + + + + + ); +} diff --git a/examples/expressions_example/public/components/render_tab.tsx b/examples/expressions_example/public/components/render_tab.tsx new file mode 100644 index 000000000000..30342da63081 --- /dev/null +++ b/examples/expressions_example/public/components/render_tab.tsx @@ -0,0 +1,89 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import { + EuiCodeBlock, + EuiFieldText, + EuiForm, + EuiFormLabel, + EuiFormRow, + EuiSpacer, + EuiSelect, + EuiCallOut, +} from '@elastic/eui'; +import { i18n } from '@osd/i18n'; +import { FormattedMessage } from '@osd/i18n/react'; +import React, { useState } from 'react'; +import { ReactExpressionRenderer } from '../../../../src/plugins/expressions/public'; + +export function RenderTab() { + const [value, setValue] = useState('OpenSearch Dashboards'); + const [size, setSize] = useState('xl'); + const expressionString = `avatar name="${value}" size="${size}"`; + + return ( + <> + + + + + + + + setValue(String(e.target.value))} /> + + + setSize(String(e.target.value))} + /> + + + + + + + {expressionString} + + + + + + + ); +} diff --git a/examples/expressions_example/public/index.scss b/examples/expressions_example/public/index.scss new file mode 100644 index 000000000000..e33c1b1f588e --- /dev/null +++ b/examples/expressions_example/public/index.scss @@ -0,0 +1,13 @@ +.expressions-demo { + .explorer_list .euiDescriptionList__title { + max-width: 400px; + } + + .explorer_section_type > code { + margin-left: $euiSizeXS; + } + + .playgroundRenderer { + height: 500px; // Visualizations require the container to have a valid width and height to render + } +} diff --git a/examples/expressions_example/public/index.ts b/examples/expressions_example/public/index.ts new file mode 100644 index 000000000000..b930fc76eb65 --- /dev/null +++ b/examples/expressions_example/public/index.ts @@ -0,0 +1,15 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import './index.scss'; + +import { ExpressionsExamplePlugin } from './plugin'; + +// This exports static code and TypeScript types, +// as well as, OpenSearch Dashboards Platform `plugin()` initializer. +export function plugin() { + return new ExpressionsExamplePlugin(); +} +export { ExpressionsExamplePluginSetup, ExpressionsExamplePluginStart } from './types'; diff --git a/examples/expressions_example/public/plugin.ts b/examples/expressions_example/public/plugin.ts new file mode 100644 index 000000000000..47e02ae1d006 --- /dev/null +++ b/examples/expressions_example/public/plugin.ts @@ -0,0 +1,92 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import { i18n } from '@osd/i18n'; +import { + AppMountParameters, + AppNavLinkStatus, + CoreSetup, + CoreStart, + Plugin, +} from '../../../src/core/public'; +import { + ExpressionsExamplePluginSetup, + ExpressionsExamplePluginStart, + ExpressionsExampleSetupDependencies, + ExpressionsExampleStartDependencies, +} from './types'; +import { PLUGIN_NAME } from '../common'; + +import { + sleep, + square, + avatar, + avatarFn, + quickFormFn, + quickFormRenderer, +} from '../common/expression_functions'; + +export class ExpressionsExamplePlugin + implements Plugin { + public setup( + core: CoreSetup, + { expressions, developerExamples }: ExpressionsExampleSetupDependencies + ): ExpressionsExamplePluginSetup { + // Register an application into the side navigation menu + core.application.register({ + id: 'expressions-example', + title: PLUGIN_NAME, + navLinkStatus: AppNavLinkStatus.hidden, + async mount(params: AppMountParameters) { + // Load application bundle + const { renderApp } = await import('./application'); + // Get start services as specified in opensearch_dashboards.json + const [coreStart, depsStart] = await core.getStartServices(); + // Render the application + return renderApp(coreStart, depsStart as ExpressionsExampleStartDependencies, params); + }, + }); + + const expressionFunctions = [sleep, square, avatarFn, quickFormFn]; + const expressionRenderers = [avatar, quickFormRenderer]; + + expressionFunctions.forEach((createExpressionFunction) => { + expressions.registerFunction(createExpressionFunction); + }); + + expressionRenderers.forEach((createExpressionRenderer) => { + expressions.registerRenderer(createExpressionRenderer); + }); + + developerExamples.register({ + appId: 'expressions-example', + title: i18n.translate('expressionsExample.developerExamples.title', { + defaultMessage: 'Expressions', + }), + description: i18n.translate('expressionsExample.developerExamples.description', { + defaultMessage: + 'Examples showing you how the expressions plugin is used to chain functions and render content', + }), + links: [ + { + label: 'README', + href: + 'https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/src/plugins/expressions/README.md', + iconType: 'logoGithub', + target: '_blank', + size: 's', + }, + ], + }); + + return {}; + } + + public start(core: CoreStart): ExpressionsExamplePluginStart { + return {}; + } + + public stop() {} +} diff --git a/examples/expressions_example/public/types.ts b/examples/expressions_example/public/types.ts new file mode 100644 index 000000000000..ea32b4783283 --- /dev/null +++ b/examples/expressions_example/public/types.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import { CoreStart, NotificationsStart } from '../../../src/core/public'; +import { ExpressionsSetup, ExpressionsStart } from '../../../src/plugins/expressions/public'; +import { NavigationPublicPluginStart } from '../../../src/plugins/navigation/public'; +import { DeveloperExamplesSetup } from '../../developer_examples/public'; + +// eslint-disable-next-line @typescript-eslint/no-empty-interface +export interface ExpressionsExamplePluginSetup {} + +// eslint-disable-next-line @typescript-eslint/no-empty-interface +export interface ExpressionsExamplePluginStart {} + +export interface ExpressionsExampleSetupDependencies { + expressions: ExpressionsSetup; + developerExamples: DeveloperExamplesSetup; +} + +export interface ExpressionsExampleStartDependencies { + navigation: NavigationPublicPluginStart; + expressions: ExpressionsStart; +} + +export interface ExpressionsExampleServices extends CoreStart { + expressions: ExpressionsStart; + notifications: NotificationsStart; +} diff --git a/package.json b/package.json index 384575d94d82..3c8bfc6e1354 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "dashboarding" ], "private": true, - "version": "1.3.17", + "version": "1.3.18", "branch": "1.3", "types": "./opensearch_dashboards.d.ts", "tsdocMetadata": "./build/tsdoc-metadata.json", diff --git a/packages/osd-plugin-helpers/src/build_context.ts b/packages/osd-plugin-helpers/src/build_context.ts new file mode 100644 index 000000000000..dd5a837ca5ca --- /dev/null +++ b/packages/osd-plugin-helpers/src/build_context.ts @@ -0,0 +1,43 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + * Any modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { ToolingLog } from '@osd/dev-utils'; + +import { Plugin } from './load_opensearch_dashboards_platform_plugin'; +import { Config } from './config'; + +export interface BuildContext { + log: ToolingLog; + plugin: Plugin; + config: Config; + sourceDir: string; + buildDir: string; + opensearchDashboardsVersion: string; +} diff --git a/packages/osd-utils/src/repo_root.ts b/packages/osd-utils/src/repo_root.ts new file mode 100644 index 000000000000..e46f62746b01 --- /dev/null +++ b/packages/osd-utils/src/repo_root.ts @@ -0,0 +1,90 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + * Any modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import Path from 'path'; +import Fs from 'fs'; + +import loadJsonFile from 'load-json-file'; + +const readOpenSearchDashboardsPkgJson = (dir: string) => { + try { + const path = Path.resolve(dir, 'package.json'); + const json = loadJsonFile.sync(path); + if ( + json && + typeof json === 'object' && + 'name' in json && + json.name === 'opensearch-dashboards' + ) { + return json; + } + } catch (error) { + if (error && error.code === 'ENOENT') { + return; + } + + throw error; + } +}; + +const findOpenSearchDashboardsPackageJson = () => { + // search for the opensearch-dashboards directory, since this file is moved around it might + // not be where we think but should always be a relatively close parent + // of this directory + const startDir = Fs.realpathSync(__dirname); + const { root: rootDir } = Path.parse(startDir); + let cursor = startDir; + while (true) { + const opensearchDashboardsPkgJson = readOpenSearchDashboardsPkgJson(cursor); + if (opensearchDashboardsPkgJson) { + return { + opensearchDashboardsDir: cursor, + opensearchDashboardsPkgJson: opensearchDashboardsPkgJson as { + name: string; + branch: string; + }, + }; + } + + const parent = Path.dirname(cursor); + if (parent === rootDir) { + throw new Error(`unable to find opensearch-dashboards directory from ${startDir}`); + } + cursor = parent; + } +}; + +const { + opensearchDashboardsDir, + opensearchDashboardsPkgJson, +} = findOpenSearchDashboardsPackageJson(); + +export const REPO_ROOT = opensearchDashboardsDir; +export const UPSTREAM_BRANCH = opensearchDashboardsPkgJson.branch; diff --git a/release-notes/opensearch-dashboards.release-notes-1.1.0.md b/release-notes/opensearch-dashboards.release-notes-1.1.0.md new file mode 100644 index 000000000000..73238dbc186e --- /dev/null +++ b/release-notes/opensearch-dashboards.release-notes-1.1.0.md @@ -0,0 +1,773 @@ +## Version 1.1.0 Release Notes + +* __[1.1] Fix yarn build docs and update test (#844)__ + + [Anan](mailto:79961084+ananzh@users.noreply.github.com) - Tue, 5 Oct 2021 12:55:30 -0700 + + yarn build flags in /src/dev/build/cli.ts are not updated to match the renamed flags in de-couple PR (#795). This PR fixes the issue + and update the tests. Also modify words in DEVELOPER_GUIDE.md. + + PR resolved: + https://github.com/opensearch-project/OpenSearch-Dashboards/issues/836 + + Backport PR: + https://github.com/opensearch-project/OpenSearch-Dashboards/pull/840 + + Signed-off-by: Anan Zhuang <ananzh@amazon.com> + +* __[1.1] Ensure DCO Workflow Check (#846)__ + + [Anan](mailto:79961084+ananzh@users.noreply.github.com) - Tue, 5 Oct 2021 12:55:08 -0700 + + Issue Resolved: + https://github.com/opensearch-project/OpenSearch-Dashboards/issues/834 + + Backport PR: + https://github.com/opensearch-project/OpenSearch-Dashboards/pull/841 + + Signed-off-by: Anan Zhuang <ananzh@amazon.com> + +* __[1.1] De-Couple Dashboards linux building process (#843)__ + + [Anan](mailto:79961084+ananzh@users.noreply.github.com) - Tue, 5 Oct 2021 11:44:48 -0700 + + When running yarn build --skip-os-packages it will build 4 tarballs for Dashboards (2x linux, 1x macOS, 1x windows) and takes 10+min to do so. + + In this PR, we break the building process to allow single linux to build. If run `yarn build-platform --linux-x64` only linux x64 tarball is created. Same for linux arm64 and darwin x64. You could run `yarn build-platform + --linux-arm64` and `yarn build-platform darwin-x64`. + + partially solved: + https://github.com/opensearch-project/OpenSearch-Dashboards/issues/473 + + backport PR: + https://github.com/opensearch-project/OpenSearch-Dashboards/pull/795 + + Signed-off-by: Anan Zhuang <ananzh@amazon.com> + +* __[1.1][Bug] Restore timeline legacy functions and filters__ + + [Kawika Avilla](mailto:kavilla414@gmail.com) - Tue, 28 Sep 2021 12:38:11 -0700 + + While renaming we changed values from legacy naming schema to OpenSearch + Dashboards naming schema. However, after realizing we impacted backwards + compatibility, we restored some of the + "under the hood" components backed to legacy application to allow for seemless + migration. + + However, upon attempting to restore Timeline to work with saved objects we + neglected to restore the Timeline functions. + + Previously users could set kibana=false to ignore filters on the dashboards + being applied to their Timeline visualizations. Now, if users tried to set it + then it would fail because it didn't know what that function was. + + This commit fixes this issue by keeping the update since we do not want to + impact people who have now updated their functions and re-added the legacy + functions. + + In this commit, I also restore the aliases for "elasticsearch" and now included + "opensearch" for Timeline queries. + + Finally, the key was incorrect for actually accessing the filter so it never + applied the filters in the default state. + + Issue resolved: + https://github.com/opensearch-project/OpenSearch-Dashboards/issues/820 + + Backport PR: + https://github.com/opensearch-project/OpenSearch-Dashboards/pull/825 + + Signed-off-by: Kawika Avilla <kavilla414@gmail.com> + +* __[1.1] Update release notes for 1.1 release (#822)__ + + [Anan](mailto:79961084+ananzh@users.noreply.github.com) - Mon, 27 Sep 2021 11:07:07 -0500 + + Backport PR: + https://github.com/opensearch-project/OpenSearch-Dashboards/pull/821 + + Signed-off-by: Anan Zhuang <ananzh@amazon.com> + +* __Bump prismjs from 1.24.0 to 1.25.0 (#805) (#817)__ + + [Tommy Markley](mailto:markleyt@amazon.com) - Fri, 24 Sep 2021 15:46:06 -0500 + + Bumps [prismjs](https://github.com/PrismJS/prism) from 1.24.0 to 1.25.0. + - [Release notes](https://github.com/PrismJS/prism/releases) + - [Changelog](https://github.com/PrismJS/prism/blob/master/CHANGELOG.md) + - [Commits](https://github.com/PrismJS/prism/compare/v1.24.0...v1.25.0) + + --- + updated-dependencies: + - dependency-name: prismjs + dependency-type: indirect + ... + Signed-off-by: dependabot[bot] <support@github.com> + +* __Bump tmpl from 1.0.4 to 1.0.5 (#807) (#819)__ + + [Tommy Markley](mailto:markleyt@amazon.com) - Fri, 24 Sep 2021 15:45:18 -0500 + + + Bumps [tmpl](https://github.com/daaku/nodejs-tmpl) from 1.0.4 to 1.0.5. + - [Release notes](https://github.com/daaku/nodejs-tmpl/releases) + - [Commits](https://github.com/daaku/nodejs-tmpl/commits/v1.0.5) + + --- + updated-dependencies: + - dependency-name: tmpl + dependency-type: indirect + ... + Signed-off-by: dependabot[bot] <support@github.com> + +* __Revert "[1.1] Upgrade `immer` from 8.0.1 to 9.0.6 (#788)" (#813)__ + + [Tommy Markley](mailto:markleyt@amazon.com) - Fri, 24 Sep 2021 15:13:59 -0500 + + + This reverts commit 9f57b182e159e23838fa04ae85e141d6bd518a2f. + This introduces breaking changes; it will need to wait for 2.0. + Signed-off-by: Tommy Markley <markleyt@amazon.com> + + +* __Bump `axios` from 0.21.1 to 0.21.4 (#779)__ + + [Tommy Markley](mailto:markleyt@amazon.com) - Fri, 10 Sep 2021 08:35:07 -0700 + + Addresses https://github.com/advisories/GHSA-cph5-m8f7-6c5x + Bumps [axios](https://github.com/axios/axios) from 0.21.1 to 0.21.4 + - [Release notes](https://github.com/axios/axios/releases/tag/v0.21.4) + - [Changelog](https://github.com/axios/axios/blob/v0.21.4/CHANGELOG.md) + - [Commits](https://github.com/axios/axios/compare/v0.21.1...v0.21.4) + Signed-off-by: Tommy Markley <markleyt@amazon.com> + +* __Upgrade `immer` from 8.0.1 to 9.0.6 (#780)__ + + [Tommy Markley](mailto:markleyt@amazon.com) - Fri, 10 Sep 2021 08:32:48 -0700 + + Addresses: + - https://github.com/advisories/GHSA-c36v-fmgq-m8hx + - https://github.com/advisories/GHSA-33f9-j839-rf8h + Upgrades [immer](https://github.com/immerjs/immer) from 8.0.1 to 9.0.6 + - [Release notes](https://github.com/immerjs/immer/releases) + - [Commits](https://github.com/immerjs/immer/compare/v8.0.1...v9.0.6) + Signed-off-by: Tommy Markley <markleyt@amazon.com> + +* __Update TESTING.md (#770)__ + + [Bishoy Boktor](mailto:65934617+boktorbb-amzn@users.noreply.github.com) - Wed, 8 Sep 2021 12:00:31 -0700 + + Signed-off-by: Bishoy Boktor <boktorbb@amazon.com> + +* __Correct copyright notices in README (#712)__ + + [Tommy Markley](mailto:markleyt@amazon.com) - Tue, 7 Sep 2021 13:20:44 -0500 + + Resolves https://github.com/opensearch-project/OpenSearch-Dashboards/issues/711 + + Signed-off-by: Tommy Markley <markleyt@amazon.com> + +* __Bump `tar` from 6.1.6 to 6.1.11 (#762)__ + + [Tommy Markley](mailto:markleyt@amazon.com) - Thu, 2 Sep 2021 13:48:15 -0500 + + Addresses https://github.com/advisories/GHSA-5955-9wpr-37jh + Bumps [tar](https://github.com/npm/node-tar) from 6.1.6 to 6.1.11. + - [Release notes](https://github.com/npm/node-tar/releases) + - [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md) + - [Commits](https://github.com/npm/node-tar/compare/v6.1.6...v6.1.11) + Signed-off-by: Tommy Markley <markleyt@amazon.com> + +* __Upgrade `tar` from 4.4.13/6.0.2 to 6.1.6 (#704)__ + + [Tommy Markley](mailto:markleyt@amazon.com) - Wed, 1 Sep 2021 13:51:36 -0500 + + Addresses https://github.com/advisories/GHSA-3jfq-g458-7qm9 + Requires [tar](https://github.com/npm/node-tar) 6.1.6 - upgrade from 4.4.13 + and 6.0.2 + - [Release notes](https://github.com/npm/node-tar/releases/tag/v6.1.6) + - [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md) + - [Commits](https://github.com/npm/node-tar/compare/v4.4.13...v6.1.6) + There are no breaking changes from 4.4 to 6.0, so I chose to upgrade + instead of bumping each of the minor versions. + Signed-off-by: Tommy Markley <markleyt@amazon.com> + +* __Bump jszip from 3.3.0 to 3.7.1 (#728)__ + + [dependabot[bot]](mailto:49699333+dependabot[bot]@users.noreply.github.com) - Wed, 1 Sep 2021 13:43:19 -0500 + + Bumps [jszip](https://github.com/Stuk/jszip) from 3.3.0 to 3.7.1. + - [Release notes](https://github.com/Stuk/jszip/releases) + - [Changelog](https://github.com/Stuk/jszip/blob/master/CHANGES.md) + - [Commits](https://github.com/Stuk/jszip/compare/v3.3.0...v3.7.1) + + updated-dependencies: + - dependency-name: jszip + dependency-type: indirect + + Signed-off-by: dependabot[bot] <support@github.com> + +* __Bump url-parse from 1.5.1 to 1.5.3 (#727)__ + + [dependabot[bot]](mailto:49699333+dependabot[bot]@users.noreply.github.com) - Wed, 1 Sep 2021 13:42:29 -0500 + + Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.1 to 1.5.3. + - [Release notes](https://github.com/unshiftio/url-parse/releases) + - [Commits](https://github.com/unshiftio/url-parse/compare/1.5.1...1.5.3) + + updated-dependencies: + - dependency-name: url-parse + dependency-type: indirect + + Signed-off-by: dependabot[bot] <support@github.com> + +* __[Build] use saved legacy config for 1.x (#743)__ + + [Kawika Avilla](mailto:kavilla414@gmail.com) - Tue, 31 Aug 2021 15:29:23 -0700 + + + An original update to enable taking settings from a valid legacy version and + applying to current OpenSearch Dashboards was made here: + https://github.com/opensearch-project/OpenSearch-Dashboards/pull/485 + However, it explicitly checked for current version being 1.0.0, which is too strict because ideally all versions of 1.x is compatible. + This makes the config check more relaxed and will taking settings from a legacy version if the current version is 1.x. + + Issue resolved: + + https://github.com/opensearch-project/OpenSearch-Dashboards/issues/741 + + Signed-off-by: Kawika Avilla <kavilla414@gmail.com> + +* __[Purify] Remove deprecation message in batchSearches settings (#735)__ + + [Kawika Avilla](mailto:kavilla414@gmail.com) - Mon, 30 Aug 2021 21:33:29 -0700 + + Remove deprecation message from batchSearches in advanced settings. + It referenced OpenSearch Dashboards 8.0, which is just from the legacy application. No plan to deprecate yet. + + Issue resolved: + + https://github.com/opensearch-project/OpenSearch-Dashboards/issues/363 + + Signed-off-by: Kawika Avilla <kavilla414@gmail.com> + +* __[Build] build:types and uiFramework run successfully (#734)__ + + [Kawika Avilla](mailto:kavilla414@gmail.com) - Mon, 30 Aug 2021 21:33:03 -0700 + + Allowing for the following builds to complete successfully: + * `yarn build:types` + * `yarn uiFramework:build` + * `yarn uiFramework:start` + + Not positive about the expected results when running uiFramework:start + but it seems to be on par with the legacy 7.10.2 version. + + Issue resolved: + + https://github.com/opensearch-project/OpenSearch-Dashboards/issues/680 + + Signed-off-by: Kawika Avilla <kavilla414@gmail.com> + +* __[Docs] Update doc refs from beta to prod (#733)__ + + [Kawika Avilla](mailto:kavilla414@gmail.com) - Thu, 26 Aug 2021 19:51:39 -0700 + + Updating references to the doc site from docs-beta.opensearch.org to the production site of opensearch.org/docs. Did not remove the TODOs because we do not have replacements for the content yet. + + Issue partially resolved: + + https://github.com/opensearch-project/OpenSearch-Dashboards/issues/335 + + Signed-off-by: Kawika Avilla <kavilla414@gmail.com> + +* __[Build] Dashboards working with legacy engines 7.10.2 (#724)__ + + [Kawika Avilla](mailto:kavilla414@gmail.com) - Mon, 23 Aug 2021 18:12:26 -0700 + + Enables the version check to work specifically in the case of OSD 1.X and legacy 7.10.2. This will avoid conflicts in future versions of the application where Dashboards is not compatible with the Engines on version differences. Testing for verifying compatible legacy version. + + Issues resolved: + + https://github.com/opensearch-project/OpenSearch-Dashboards/issues/720 + + Signed-off-by: Kawika Avilla <kavilla414@gmail.com> + +* __docs(docker): add .dockerignore, add build instructions (#299)__ + + [Denys Vitali](mailto:denys@denv.it) - Sat, 21 Aug 2021 22:51:11 -0500 + + + Signed-off-by: Denys Vitali <denys@denv.it> + +* __[Build] Version bump for 1.1 release (#722)__ + + [Kawika Avilla](mailto:kavilla414@gmail.com) - Wed, 18 Aug 2021 15:10:59 -0700 + + Bumps the minor to 1.1 for the 1.0 release.Needed to modify the artifact.js file to the newly formatted artifact URL so that tests work out of the box. + + Issue resolved: + + https://github.com/opensearch-project/OpenSearch-Dashboards/issues/681 + + Signed-off-by: Kawika Avilla <kavilla414@gmail.com> + +* __[Docs] Improve the getting started section of the developer guide (#710)__ + + [Rémi Weislinger](mailto:2735603+closingin@users.noreply.github.com) - Wed, 18 Aug 2021 15:06:34 -0700 + + - Add more detailed explanations to setup a dev environment + - Recommend the docker version of OpenSearch as the default backend + - Improve the UI of the guide with a new header + - Remove the nvm installation section, and link to its docs instead + + Signed-off-by: closingin <2735603+closingin@users.noreply.github.com> + +* __[Docs] Added SECURITY.md (#715)__ + + [Kawika Avilla](mailto:kavilla414@gmail.com) - Wed, 18 Aug 2021 14:57:30 -0700 + + Adding SECURITY.md as it is defined in the README. Will inform developers how to report security issues. + + Issue resolved: + + https://github.com/opensearch-project/OpenSearch-Dashboards/issues/714 + + Signed-off-by: Kawika Avilla <kavilla414@gmail.com> + +* __[Docs] Added TESTING.md (#713)__ + + [Kawika Avilla](mailto:kavilla414@gmail.com) - Thu, 12 Aug 2021 11:02:26 -0700 + + Adding TESTING.md to the project as referenced in the README. The content is some general information about testing and should not + be considered exhaustive. + + Issue resolved: + + https://github.com/opensearch-project/OpenSearch-Dashboards/issues/667 + + Signed-off-by: Kawika Avilla <kavilla414@gmail.com> + +* __[Bug] remove tutorials from router temporarily (#675)__ + + [Kawika Avilla](mailto:kavilla414@gmail.com) - Wed, 4 Aug 2021 16:27:21 -0700 + + We removed the ability to access the tutorials page because we do not have replacement for the links provided by the tutorials.However, users could directly navigate to those pages if they typed + into the browser or had a bookmark. This removes those routes from the router. + + Issues resolved: + + https://github.com/opensearch-project/OpenSearch-Dashboards/issues/647 + + Signed-off-by: Kawika Avilla <kavilla414@gmail.com> + +* __Bump `ws` from 7.3.1 to 7.5.3 (#699)__ + + [Tommy Markley](mailto:markleyt@amazon.com) - Wed, 4 Aug 2021 14:48:05 -0500 + + Addresses https://github.com/advisories/GHSA-6fc8-4gx4-v693 + Bumps [ws](https://github.com/websockets/ws) from 7.3.1 to 7.5.3 + - [Release notes](https://github.com/websockets/ws/releases/tag/7.5.3) + - [Commits](https://github.com/websockets/ws/compare/7.3.1...7.5.3) + + Signed-off-by: Tommy Markley <markleyt@amazon.com> + +* __Bump `postcss` from 7.0.32 to 7.0.36 (#698)__ + + [Tommy Markley](mailto:markleyt@amazon.com) - Wed, 4 Aug 2021 14:47:38 -0500 + + Addresses https://github.com/advisories/GHSA-hwj9-h5mp-3pm3 + Bumps [postcss](https://github.com/postcss/postcss) from 7.0.32 to 7.0.36 + - [Release notes](https://github.com/postcss/postcss/releases/tag/7.0.36) + - [Changelog](https://github.com/postcss/postcss/blob/7.0.36/CHANGELOG.md) + - [Commits](https://github.com/postcss/postcss/compare/7.0.32...7.0.36) + + Signed-off-by: Tommy Markley <markleyt@amazon.com> + +* __Update FieldEditor test snapshots (#691)__ + + [Tommy Markley](mailto:markleyt@amazon.com) - Wed, 4 Aug 2021 14:47:10 -0500 + + Previous PR #674 did not include updated snapshots.Related to + https://github.com/opensearch-project/OpenSearch-Dashboards/issues/673 + + Signed-off-by: Tommy Markley <markleyt@amazon.com> + +* __Add Getting Started section to the Developer Guide (#685)__ + + [Tommy Markley](mailto:markleyt@amazon.com) - Tue, 3 Aug 2021 12:18:07 -0500 + + * Add development environment setup link to Welcome section of the README. + * Remove broken Admin Responsibilities link from the README. + + Resolves + https://github.com/opensearch-project/OpenSearch-Dashboards/issues/666 + + Signed-off-by: Tommy Markley <markleyt@amazon.com> + +* __[BUG] fix CODE_OF_CONDUCT link in README.md (#676) (#677)__ + + [Sagar Rout](mailto:sagar_rout@hotmail.com) - Wed, 28 Jul 2021 13:19:37 -0700 + + Add CODE_OF_CONDUCT file, Copy CODE_OF_CONDUCT file from https://github.com/opensearch-project/OpenSearch repository. + + Signed-off-by: Sagar Rout <sagar@sagarrout.com> + +* __[Test] Fix console warning in field_editor.test.tsx (#674)__ + + [Anan](mailto:79961084+ananzh@users.noreply.github.com) - Wed, 28 Jul 2021 11:15:42 -0700 + + Currently, unit test field_editor.test.tsx shows a console warning: + + `React.createElement: type is invalid -- expected a string + (for built-in components) or a class/function (for composite components) + but got: undefined. ` + + This warning is because EuiCodeEditor is missing in the mock of elastic/eui, which causes undefined EuiCodeEditor in the test. + + PR Resolved: + + https://github.com/opensearch-project/OpenSearch-Dashboards/issues/673 + + Signed-off-by: Anan Zhuang <ananzh@amazon.com> + +* __[Test] Fix console error in search_service.test.ts  (#595)__ + + [Anan](mailto:79961084+ananzh@users.noreply.github.com) - Mon, 26 Jul 2021 08:33:16 -0700 + + Run unit test suite search_service.test.ts has a console error: + ``` + UnhandledPromiseRejectionWarning: TypeError: Cannot read aggs property of undefined + ``` + + This is caused by a missing promise result check in the setup fun + in search_service.ts. If the promise result is empty (or null/undefined), then any properties of the empty result is undefined. In our case, + `aggs` in `if (value.search.aggs.shardDelay.enabled)` is undefined. + In this PR, we fixed this issue by adding a value check in setup fun. + + Issues resolved: + + https://github.com/opensearch-project/OpenSearch-Dashboards/issues/594 + + Signed-off-by: Anan Zhuang <ananzh@amazon.com> + +* __[Bug] fix timeline icon in Visualize list (#659)__ + + [Kawika Avilla](mailto:kavilla414@gmail.com) - Mon, 26 Jul 2021 08:24:01 -0700 + + Icon was not loading in the Visualize list because it was + referencing a non-existant icon. Other parts of the code loads the icon correctly, so updated the icon to an existing + icon. + + Issues resolved: + + https://github.com/opensearch-project/OpenSearch-Dashboards/issues/658 + + Signed-off-by: Kawika Avilla <kavilla414@gmail.com> + +* __Update MAINTAINERS.md (#600)__ + + [Andrew Hopp](mailto:andrew.hopp@me.com) - Fri, 23 Jul 2021 12:41:53 -0500 + + * Add path to .github maintainer doc + * Add path to CONTRIBUTING.md + + Signed-off-by: Tommy Markley <markleyt@amazon.com> + Co-authored-by: Tommy Markley <markleyt@amazon.com> + +* __Update CONTRIBUTING.md (#598)__ + + [Andrew Hopp](mailto:andrew.hopp@me.com) - Fri, 23 Jul 2021 12:41:10 -0500 + + * Move ToC to top to match the OpenSearch repo + * Minor formatting changes + * Remove reference to pre-alpha state + * Add links for opening issues + * Remove "w00t!!!" from end of file + + Signed-off-by: Tommy Markley <markleyt@amazon.com> + Co-authored-by: Tommy Markley <markleyt@amazon.com> + +* __Clean up README.md (#596)__ + + [Andrew Hopp](mailto:andrew.hopp@me.com) - Fri, 23 Jul 2021 12:36:12 -0500 + + * Add darkmode logo + * Add a ToC and relevant sections + * Add Project Resources to replace how can you help", "running tests", "guiding + principles", etc. + * Add CoC + * Add License + * Add Copyright + + Signed-off-by: Tommy Markley <markleyt@amazon.com> + Co-authored-by: Andrew Hopp <andrew.hopp@me.com> + +* __[Test] Wrap FunComponent in unit test with IntlProvider (#654)__ + + [Anan](mailto:79961084+ananzh@users.noreply.github.com) - Fri, 23 Jul 2021 09:01:00 -0700 + + In the FunctionComponent unit tests, we see many console errors: + `Could not find required intl object. <IntlProvider> needs to + exist in the + component ancestry. ` + This is because for some unit tests, we mount the FunctionComponent + (with Enzyme's mount()) , which access to the react-intl context by + + FormattedMessage without their <IntlProvider /> parent wrapper. + This PR solves 7 out of 8 unit tests with this issue by wrapping the <IntlProvider /> either through original enzyme_helper functions or a simple wrapper wrapWithIntl. + + Partically Resolved: + + https://github.com/opensearch-project/OpenSearch-Dashboards/issues/593 + + Signed-off-by: Anan Zhuang <ananzh@amazon.com> + +* __Increase filters popover size and use full width in form components (#352)__ + + [Gal Angel](mailto:gal0angel@gmail.com) - Tue, 20 Jul 2021 10:33:10 -0700 + + * use full width + Signed-off-by: galangel <gal0angel@gmail.com> + + * Update width + Signed-off-by: galangel <gal0angel@gmail.com> + + * observer + + Signed-off-by: galangel <gal0angel@gmail.com> + +* __[Purify] update general info in run_fpm (#644)__ + + [Kawika Avilla](mailto:kavilla414@gmail.com) - Mon, 19 Jul 2021 09:41:35 -0700 + + Updating references from Elastic to OpenSearch for building + and packaging. + Originated from the error message from: + + https://github.com/opensearch-project/OpenSearch-Dashboards/issues/601 + + Signed-off-by: Kawika Avilla <kavilla414@gmail.com> + +* __[Tests] ARM64 artifacts for testing (#641)__ + + [Kawika Avilla](mailto:kavilla414@gmail.com) - Tue, 13 Jul 2021 09:34:30 -0700 + + Removing the graceful failures for ARM64 snapshot testing and + updating tests. + Previously, snapshots for ARM64 were not available but now they are + so this allows developers to run tests for that arch out of the box + whereas before + they had to set the snapshot manually. + + Partially resolves: + + https://github.com/opensearch-project/OpenSearch-Dashboards/issues/475 + + Signed-off-by: Kawika Avilla <kavilla414@gmail.com> + +* __[Bug] Replace kibana issue in /packages/osd-optimizer/README.md (#608)__ + + [Anan](mailto:79961084+ananzh@users.noreply.github.com) - Mon, 12 Jul 2021 14:37:36 -0700 + + /packages/osd-optimizer/README.md has a kibana issue reference. This PR replaces the kibana issue with an open discuss issue. + + Partically Resolved: + + https://github.com/opensearch-project/OpenSearch-Dashboards/issues/592 + + Signed-off-by: Anan Zhuang <ananzh@amazon.com> + +* __[PURIFY] Remove certs and PKCS12 files temporarily (#616)__ + + [Kawika Avilla](mailto:kavilla414@gmail.com) - Fri, 9 Jul 2021 11:42:06 -0700 + + + Removed the generated keys from Elastic. Since we did not own those + and do not + have the private key for the cert authority then it will + be safer. + This should not have any impact on runtime, might impact security + related to x-pack with demo certs but none of the certs where + for production. Otherwise, + this is strictly for testing. + + To be clear, this can be emptied out because it is ONLY for demo + and testing purposes. The demo security can be accomplished by + using: + + https://github.com/opensearch-project/security/blob/main/tools/install_demo_configuration.sh + + Eventually we should take the certs from that file and copy those over but will just ignore the tests for now. + + Signed-off-by: Kawika Avilla <kavilla414@gmail.com> + +* __[Bug] Remove license concepts in packages/osd-opensearch (#602)__ + + [Anan](mailto:79961084+ananzh@users.noreply.github.com) - Fri, 9 Jul 2021 11:31:04 -0700 + + Currenlty, /packages/osd-opensearch/README.md still have license + concepts. + This PR cleans the concepts. + Partially Resolved: + + https://github.com/opensearch-project/OpenSearch-Dashboards/issues/592 + + Signed-off-by: Anan Zhuang <ananzh@amazon.com> + +* __[Bug] Fix broken links in packages/opensearch-safter-lodash-set (#607)__ + + [Anan](mailto:79961084+ananzh@users.noreply.github.com) - Fri, 9 Jul 2021 11:08:52 -0700 + + + Both LICENSE and package.json in packages/opensearch-safter-lodash-set + have + broken links. This PR fixes links in these two files. + + Partically Resolved: + + https://github.com/opensearch-project/OpenSearch-Dashboards/issues/592 + + Signed-off-by: Anan Zhuang <ananzh@amazon.com> + +* __[Bug] Clean elastic-eslint-config-kibana in packages/osd-pm/README.md (#611)__ + + [Anan](mailto:79961084+ananzh@users.noreply.github.com) - Fri, 9 Jul 2021 11:07:27 -0700 + + + Currently, packages/osd-pm/README.md still mentions old package name. + This PR + replaces package name from elastic-eslint-config-kibana + to + opensearch-eslint-config-opensearch-dashboards. Meanwhile, there + is a + duplicate README.md in packages/osd-pm/src which is deleted. + Partically Resolved: + + https://github.com/opensearch-project/OpenSearch-Dashboards/issues/592 + Signed-off-by: Anan Zhuang <ananzh@amazon.com> + +* __[Bug] Clean concepts in packages/osd-plugin-helpers/README.md (#610)__ + + [Anan](mailto:79961084+ananzh@users.noreply.github.com) - Fri, 9 Jul 2021 11:06:34 -0700 + + + The versions in packages/osd-plugin-helpers/README.md are still 6.3 + which + should be updated to 1.0. Meanwhile, there are some old concepts, + like + checking versions, which should be cleaned. This PR fixes the + versions and + cleans out the old concepts. + Partically Resolved: + + https://github.com/opensearch-project/OpenSearch-Dashboards/issues/592 + Signed-off-by: Anan Zhuang <ananzh@amazon.com> + +* __[Bug] Clean concepts in packages/osd-plugin-generator/README.md (#609)__ + + [Anan](mailto:79961084+ananzh@users.noreply.github.com) - Fri, 9 Jul 2021 11:05:41 -0700 + + + The versions in packages/osd-plugin-generator/README.md are still 6.x + which + should be updated to 1.0. Meanwhile, there are some old concepts, + like test + using mocha, which should be cleaned. This PR fixes the versions + and cleans + out the old concepts. + Partically Resolved: + + https://github.com/opensearch-project/OpenSearch-Dashboards/issues/592 + Signed-off-by: Anan Zhuang <ananzh@amazon.com> + +* __[Bug] Replace words in /packages/opensearch-datemath/readme.md (#606)__ + + [Anan](mailto:79961084+ananzh@users.noreply.github.com) - Fri, 9 Jul 2021 11:03:07 -0700 + + + /packages/opensearch-datemath/readme.md still has old concepts. + This PR + replaces the word Kibana to OpenSearch Dashboards. + Partically Resolved: + + https://github.com/opensearch-project/OpenSearch-Dashboards/issues/592 + Signed-off-by: Anan Zhuang <ananzh@amazon.com> + +* __[Bug] Fix broken links in opensearch-eslint-config-opensearch-dashboards (#605)__ + + [Anan](mailto:79961084+ananzh@users.noreply.github.com) - Fri, 9 Jul 2021 11:02:42 -0700 + + + Both package.json and README.md in + /packages/opensearch-eslint-config-opensearch-dashboards + have some broken + links or old concepts. This PR fixes these two files. + Partically Resolved: + + https://github.com/opensearch-project/OpenSearch-Dashboards/issues/592 + + Signed-off-by: Anan Zhuang <ananzh@amazon.com> + +* __[Bug] Fix broken link in package.json (#604)__ + + [Anan](mailto:79961084+ananzh@users.noreply.github.com) - Fri, 9 Jul 2021 11:01:50 -0700 + + + Package.json has a broken homepage link. This PR fixes this link. + Partically Resolved: + + https://github.com/opensearch-project/OpenSearch-Dashboards/issues/592 + Signed-off-by: Anan Zhuang <ananzh@amazon.com> + +* __[Bug] Remove appKey in github-checks-reporter (#603)__ + + [Anan](mailto:79961084+ananzh@users.noreply.github.com) - Fri, 9 Jul 2021 11:01:14 -0700 + + + github-checks-reporter is a task wrapper that provides expressive + CI feedback + via GitHub checks. Currently, we don’t have our own + appKey. To avoid any + confusions, this PR removed the old key. + Partically Resolved: + + https://github.com/opensearch-project/OpenSearch-Dashboards/issues/592 + Signed-off-by: Anan Zhuang <ananzh@amazon.com> + +* __[Bug] remove incorrect reference in testing.md (#597)__ + + [Anan](mailto:79961084+ananzh@users.noreply.github.com) - Fri, 9 Jul 2021 10:58:58 -0700 + + + There is a kibana closed issue reference under test + "authenticated / non-authenticated user access". + We removed the reference in + this PR. + Partially Resolved: + + https://github.com/opensearch-project/OpenSearch-Dashboards/issues/592 + Signed-off-by: Anan Zhuang <ananzh@amazon.com> + +* __[Bug] replace words in PRINCIPLES.md (#599)__ + + [Anan](mailto:79961084+ananzh@users.noreply.github.com) - Fri, 9 Jul 2021 09:17:55 -0700 + + + Partially Resolved: + + https://github.com/opensearch-project/OpenSearch-Dashboards/issues/592 + Signed-off-by: Anan Zhuang <ananzh@amazon.com> + +* __Update readme for dashboards 1.0.0 (#579)__ + + [Anan](mailto:79961084+ananzh@users.noreply.github.com) - Fri, 2 Jul 2021 13:19:38 -0700 + + + Update RC state to GA state + Issues resolved: + + https://github.com/opensearch-project/OpenSearch-Dashboards/issues/577 + Signed-off-by: Anan Zhuang <ananzh@amazon.com> + + diff --git a/release-notes/opensearch-dashboards.release-notes-2.0.0-rc1.md b/release-notes/opensearch-dashboards.release-notes-2.0.0-rc1.md new file mode 100644 index 000000000000..92d0cfab514f --- /dev/null +++ b/release-notes/opensearch-dashboards.release-notes-2.0.0-rc1.md @@ -0,0 +1,94 @@ +## Version 2.0.0-rc1 Release Notes + +### 💥 Breaking Changes in 2.0 + +#### Bump to node version 14.19.1 +* Bumps Node.js from v14.18.2 to v14.19.1 ([#1487](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1487)) +* [Node 14] Upgrades Node version to 14.18.2 ([#1028](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1028)) + +#### Use opensearch-project/opensearch as nodejs client +* [nodejs client] hookup js client with dashboards ([#1342](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1342)) +* [nodejs client] modify tsconfig to route types to new.d.ts ([#1225](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1255)) + +#### Disable telemetry by default +* Fixes search usage telemetry ([#1427](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1427)) + +#### Deprecations +* Deprecates non-inclusive config names ([#1467](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1467)) +* Removes UI Framework KUI doc site ([#1379](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1379)) + +### 🛡 Security +* [CVE-2021-44531] [CVE-2022-21824] [CVE-2022-0778] [CVE-2021-44532] [CVE-2021-44533] Bumps Node.js from v14.18.2 to v14.19.1 ([#1487](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1487)) +* [CVE-2022-0436] Bumps grunt from v1.4.1 to v1.5.2 ([#1451](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1451)) +* [CVE-2021-43138] Resolves async to v3.2.3 ([#1449](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1449)) +* [CVE-2022-24785] Bump moment from 2.29.1 to 2.29.2 ([#1456](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1456)) +* [CVE-2021-3803] Bumps the nested dependency of nth-check to v2.0.1 ([#1422](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1422)) +* [CVE-2022-0144] [WS-2018-0347] [CVE-2021-23807] [CVE-2020-15366] Chore: Replaces sass-lint with stylelint ([#1413](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1413)) +* [CVE-2021-3918] Bumps json-schema from 0.2.3 to 0.4.0 ([#1385](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1385)) +* [WS-2020-0208] Removes UI Framework KUI doc site ([#1379](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1379)) +* [CVE-2022-0686] [CVE-2022-0691] Bumps @elastic/eui to v34.6.0 and @elastic/charts to v31.1.0 ([#1370](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1370)) +* [CVE-2022-24433] Bumps simple-git from 1.116.0 to 3.4.0 ([#1359](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1359)) +* [CVE-2021-44907] Resolves all qs dependencies to v6.10.3 ([#1380](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1380)) +* [CVE-2021-44906] Bump minimist from 1.2.5 to 1.2.6 ([#1377](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1377)) +* [CVE-2022-24773] [CVE-2022-24772] [CVE-2022-24771] Bumps node-forge from v1.2.1 to v1.3.0 ([#1369](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1369)) +* [CVE-2020-8203] [CVE-2021-23337] [CVE-2020-28500] Bump lodash-es from 4.17.15 to 4.17.21 ([#1343](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1343)) +* [CVE-2021-3807] Resolves ansi-regex to v5.0.1 ([#1320](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1320)) +* [CVE-2022-0686] [CVE-2022-0639] [CVE-2022-0686] Bump url-parse from 1.5.3 to 1.5.7 ([#1257](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1257)) +* [CVE-2022-0536] Bump follow-redirects from 1.14.7 to 1.14.8 ([#1247](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1247)) +* [CVE-2022-0122] [WS-2022-0008] Upgrades node-forge from v0.10.0 to v1.2.1 ([#1239](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1239)) +* [CVE-2021-23424] Upgrades webpack-dev-server and webpack-cli ([#1229](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1229)) +* [WS-2020-0033] [WS-2020-0035] [WS-2019-0271] [WS-2020-0032] [WS-2020-0026] Upgrades hapi from v17 to v20 ([#1146](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1146)) +* [CVE-2022-21670] Bump markdown-it from 10.0.0 to 12.3.2 ([#1140](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1140)) +* [CVE-2022-0155] Removes deprecated request and @percy/agent ([#1113](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1113)) +* [CVE-2021-23490] Bump parse-link-header from 1.0.1 to 2.0.0 ([#1108](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1108)) +* [CVE-2021-3765] Bumps @microsoft/api-documenter and @microsoft/api-extractor ([#1106](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1106)) +* [CVE-2021-3795] [WS-2019-0307] Removes KUI Generator and related dependencies ([#1105](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1105)) +* [CVE-2021-24033] [CVE-2021-23382] [CVE-2021-23364] Upgrades babel, storybook, and postcss ([#1104](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1104)) +* [CVE-2021-22939] [CVE-2021-3672] [CVE-2021-22931] [CVE-2021-22921] [CVE-2021-22940] [CVE-2021-22918] [CVE-2020-24025] [CVE-2018-11698] [CVE-2020-7608] [CVE-2018-19827] [CVE-2018-20190] [CVE-2019-6283] [CVE-2019-18797] [CVE-2018-20821] [CVE-2019-6286] [CVE-2019-6284] [CVE-2018-11694] [CVE-2018-19837] [CVE-2018-11696] [CVE-2018-11499] [CVE-2018-11697] [CVE-2018-19797] [CVE-2020-24025] [CVE-2020-24025] [CVE-2018-11698] [CVE-2018-11698] [CVE-2018-19839] [CVE-2018-19838] Upgrades Node version to 14.18.2 ([#1028](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1028)) +* [CVE-2021-3757] [CVE-2021-23436] Upgrade immer from 8.0.1 to 9.0.6 ([#780](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/780)) + +### 📈 Enhancements +* [Circuit-Breaker] Add memory circuit breaker configuration ([#1347](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1347)) + +### 🐛 Bug Fixes +* Fix: Re-rendering visualization when expression changes and improves typing ([#1491](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1491)) +* fix(actions): Better type checks for icons ([#1496](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1496)) +* [Bug] fix copy as curl ([#1472](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1472)) +* update re2 build for arm under node 14 ([#1454](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1454)) +* update re2 for linux, darwin, and windows ([#1453](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1453)) +* fix(Tooltip): Fixes tooltip when split series charts are used ([#1324](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1324)) +* bumps chromedriver to v100 ([#1410](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1410)) +* Fixes the header's nav trigger button not closing the nav ([#1394](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1394)) +* Fixes the linting rules to accept only the approved copyright headers ([#1373](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1373)) + +### 🚞 Infrastructure +* [Plugins] fix default path to plugins ([#1468](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1468)) +* Reverts re2 back to 1.15.4 from 1.17.4 to fix build issues ([1419](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1419)) + +### 📝 Documentation +* [Admin] add current maintainers as of 04/2022 ([#1426](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1426)) +* Chore: Exposes testing readme at the root level ([#1420](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1420)) + +### 🛠 Maintenance +* Runs functional test jobs in parallel w/ build job ([#1336](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1356)) +* Removes unnecessary manual resolutions ([#1300](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1300)) +* Removes backport and release-notes scripts ([#1234](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1234)) +* Removes storybook package and related code ([#1172](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1172)) +* [Version] Increment to 2.0 ([#973](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/973/files)) + +### 🪛 Refactoring +* Cleans up changes from memory circuit breaker PR ([#1463](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1463)) +* Fixes interfaced errors across Dashboards ([#1409](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1409)) + +### 🔩 Tests +* [Tests][BWC][CI] update performance analzyer location ([#1474](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1474)) +* [Tests][BWC][CI] use ODFE 1.0.2 ([#1470](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1470)) +* [Tests][BWC][CI] handle distributions with qualifiers ([#1469](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1469)) +* [Tests] BWC test improvements ([#1447](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1447)) +* Fixes inconsistent plugin installation tests ([#1346](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1346)) +* [Tests] fix JUnit Reporter test ([#1338](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1338)) +* [Tests] remove include_type_name from OpenSearch Archiver ([#1334](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1334)) +* Runs GitHub workflow unit tests in band ([#1306](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1306)) +* Upgrades jest to v27 ([#1301](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1301)) +* [Tests] fix mocha tests related to type ([#1299](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1299)) +* [Tests] remove _type from OpenSearch Archiver ([#1289](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1289)) \ No newline at end of file diff --git a/release-notes/opensearch-dashboards.release-notes-2.0.0.md b/release-notes/opensearch-dashboards.release-notes-2.0.0.md new file mode 100644 index 000000000000..e5831d8a826e --- /dev/null +++ b/release-notes/opensearch-dashboards.release-notes-2.0.0.md @@ -0,0 +1,99 @@ +## Version 2.0.0 Release Notes + +### 💥 Breaking Changes in 2.0 + +#### Bump to node version 14.19.1 +* Bumps Node.js from v14.18.2 to v14.19.1 ([#1487](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1487)) +* [Node 14] Upgrades Node version to 14.18.2 ([#1028](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1028)) + +#### Use opensearch-project/opensearch as nodejs client +* [nodejs client] hookup js client with dashboards ([#1342](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1342)) +* [nodejs client] modify tsconfig to route types to new.d.ts ([#1225](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1255)) + +#### Disable telemetry by default +* Fixes search usage telemetry ([#1427](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1427)) + +#### Deprecations +* Deprecates non-inclusive config names ([#1467](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1467)) +* Removes UI Framework KUI doc site ([#1379](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1379)) +* [Purify] hide option for theme version in settings ([#1598](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1598)) + +### 🛡 Security +* [CVE-2022-1537] Resolves grunt to 1.5.3 ([#1580](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1580)) +* [CVE-2022-1214] Bumps chromedriver to v100 and axios to v0.27.2 ([#1552](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1552)) +* [CVE-2022-29078] Bumps ejs from 3.1.6 to 3.1.7 ([#1512](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1512)) +* [CVE-2021-44531] [CVE-2022-21824] [CVE-2022-0778] [CVE-2021-44532] [CVE-2021-44533] Bumps Node.js from v14.18.2 to v14.19.1 ([#1487](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1487)) +* [CVE-2022-0436] Bumps grunt from v1.4.1 to v1.5.2 ([#1451](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1451)) +* [CVE-2021-43138] Resolves async to v3.2.3 ([#1449](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1449)) +* [CVE-2022-24785] Bump moment from 2.29.1 to 2.29.2 ([#1456](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1456)) +* [CVE-2021-3803] Bumps the nested dependency of nth-check to v2.0.1 ([#1422](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1422)) +* [CVE-2022-0144] [WS-2018-0347] [CVE-2021-23807] [CVE-2020-15366] Chore: Replaces sass-lint with stylelint ([#1413](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1413)) +* [CVE-2021-3918] Bumps json-schema from 0.2.3 to 0.4.0 ([#1385](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1385)) +* [WS-2020-0208] Removes UI Framework KUI doc site ([#1379](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1379)) +* [CVE-2022-0686] [CVE-2022-0691] Bumps @elastic/eui to v34.6.0 and @elastic/charts to v31.1.0 ([#1370](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1370)) +* [CVE-2022-24433] Bumps simple-git from 1.116.0 to 3.4.0 ([#1359](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1359)) +* [CVE-2021-44907] Resolves all qs dependencies to v6.10.3 ([#1380](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1380)) +* [CVE-2021-44906] Bump minimist from 1.2.5 to 1.2.6 ([#1377](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1377)) +* [CVE-2022-24773] [CVE-2022-24772] [CVE-2022-24771] Bumps node-forge from v1.2.1 to v1.3.0 ([#1369](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1369)) +* [CVE-2020-8203] [CVE-2021-23337] [CVE-2020-28500] Bump lodash-es from 4.17.15 to 4.17.21 ([#1343](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1343)) +* [CVE-2021-3807] Resolves ansi-regex to v5.0.1 ([#1320](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1320)) +* [CVE-2022-0686] [CVE-2022-0639] [CVE-2022-0686] Bump url-parse from 1.5.3 to 1.5.7 ([#1257](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1257)) +* [CVE-2022-0536] Bump follow-redirects from 1.14.7 to 1.14.8 ([#1247](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1247)) +* [CVE-2022-0122] [WS-2022-0008] Upgrades node-forge from v0.10.0 to v1.2.1 ([#1239](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1239)) +* [CVE-2021-23424] Upgrades webpack-dev-server and webpack-cli ([#1229](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1229)) +* [WS-2020-0033] [WS-2020-0035] [WS-2019-0271] [WS-2020-0032] [WS-2020-0026] Upgrades hapi from v17 to v20 ([#1146](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1146)) +* [CVE-2022-21670] Bump markdown-it from 10.0.0 to 12.3.2 ([#1140](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1140)) +* [CVE-2022-0155] Removes deprecated request and @percy/agent ([#1113](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1113)) +* [CVE-2021-23490] Bump parse-link-header from 1.0.1 to 2.0.0 ([#1108](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1108)) +* [CVE-2021-3765] Bumps @microsoft/api-documenter and @microsoft/api-extractor ([#1106](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1106)) +* [CVE-2021-3795] [WS-2019-0307] Removes KUI Generator and related dependencies ([#1105](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1105)) +* [CVE-2021-24033] [CVE-2021-23382] [CVE-2021-23364] Upgrades babel, storybook, and postcss ([#1104](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1104)) +* [CVE-2021-22939] [CVE-2021-3672] [CVE-2021-22931] [CVE-2021-22921] [CVE-2021-22940] [CVE-2021-22918] [CVE-2020-24025] [CVE-2018-11698] [CVE-2020-7608] [CVE-2018-19827] [CVE-2018-20190] [CVE-2019-6283] [CVE-2019-18797] [CVE-2018-20821] [CVE-2019-6286] [CVE-2019-6284] [CVE-2018-11694] [CVE-2018-19837] [CVE-2018-11696] [CVE-2018-11499] [CVE-2018-11697] [CVE-2018-19797] [CVE-2020-24025] [CVE-2020-24025] [CVE-2018-11698] [CVE-2018-11698] [CVE-2018-19839] [CVE-2018-19838] Upgrades Node version to 14.18.2 ([#1028](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1028)) +* [CVE-2021-3757] [CVE-2021-23436] Upgrade immer from 8.0.1 to 9.0.6 ([#780](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/780)) + +### 📈 Enhancements +* [Circuit-Breaker] Add memory circuit breaker configuration ([#1347](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1347)) + +### 🐛 Bug Fixes +* Removes irrelevant upsell in the timeout message ([#1599](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1599)) +* [Bug] fix missing discover context icon ([#1545](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1545)) +* Fix: Re-rendering visualization when expression changes and improves typing ([#1491](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1491)) +* fix(actions): Better type checks for icons ([#1496](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1496)) +* [Bug] fix copy as curl ([#1472](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1472)) +* update re2 build for arm under node 14 ([#1454](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1454)) +* update re2 for linux, darwin, and windows ([#1453](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1453)) +* fix(Tooltip): Fixes tooltip when split series charts are used ([#1324](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1324)) +* Fixes the header's nav trigger button not closing the nav ([#1394](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1394)) +* Fixes the linting rules to accept only the approved copyright headers ([#1373](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1373)) + +### 🚞 Infrastructure +* [Plugins] fix default path to plugins ([#1468](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1468)) +* Reverts re2 back to 1.15.4 from 1.17.4 to fix build issues ([1419](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1419)) + +### 📝 Documentation +* [Admin] add current maintainers as of 04/2022 ([#1426](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1426)) +* Chore: Exposes testing readme at the root level ([#1420](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1420)) + +### 🛠 Maintenance +* Runs functional test jobs in parallel w/ build job ([#1336](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1356)) +* Removes unnecessary manual resolutions ([#1300](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1300)) +* Removes backport and release-notes scripts ([#1234](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1234)) +* Removes storybook package and related code ([#1172](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1172)) +* [Version] Increment to 2.0 ([#973](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/973/files)) + +### 🪛 Refactoring +* Fixes interfaced errors across Dashboards ([#1409](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1409)) + +### 🔩 Tests +* [Tests][BWC][CI] update performance analzyer location ([#1474](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1474)) +* [Tests][BWC][CI] use ODFE 1.0.2 ([#1470](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1470)) +* [Tests][BWC][CI] handle distributions with qualifiers ([#1469](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1469)) +* [Tests] BWC test improvements ([#1447](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1447)) +* [Tests] [CI] bumps chromedriver to v100 ([#1410](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1410)) +* Fixes inconsistent plugin installation tests ([#1346](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1346)) +* [Tests] fix JUnit Reporter test ([#1338](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1338)) +* [Tests] remove include_type_name from OpenSearch Archiver ([#1334](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1334)) +* Runs GitHub workflow unit tests in band ([#1306](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1306)) +* Upgrades jest to v27 ([#1301](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1301)) +* [Tests] fix mocha tests related to type ([#1299](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1299)) +* [Tests] remove _type from OpenSearch Archiver ([#1289](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1289)) diff --git a/renovate.json5 b/renovate.json5 new file mode 100644 index 000000000000..642ba9540cca --- /dev/null +++ b/renovate.json5 @@ -0,0 +1,1123 @@ +/** + * PLEASE DO NOT MODIFY + * + * This file is automatically generated by running `node scripts/build_renovate_config` + * + */ +{ + extends: [ + 'config:base', + ], + includePaths: [ + 'package.json', + 'packages/*/package.json', + 'examples/*/package.json', + 'test/plugin_functional/plugins/*/package.json', + 'test/interpreter_functional/plugins/*/package.json', + ], + baseBranches: [ + 'master', + ], + labels: [ + 'release_note:skip', + 'Team:Operations', + 'renovate', + 'v8.0.0', + 'v7.9.0', + ], + major: { + labels: [ + 'release_note:skip', + 'Team:Operations', + 'renovate', + 'v8.0.0', + 'v7.9.0', + 'renovate:major', + ], + }, + separateMajorMinor: false, + masterIssue: true, + masterIssueApproval: true, + rangeStrategy: 'bump', + npm: { + lockFileMaintenance: { + enabled: false, + }, + packageRules: [ + { + groupSlug: '@elastic/charts', + groupName: '@elastic/charts related packages', + packageNames: [ + '@elastic/charts', + '@types/elastic__charts', + ], + reviewers: [ + 'markov00', + ], + masterIssueApproval: false, + }, + { + groupSlug: '@reach/router', + groupName: '@reach/router related packages', + packageNames: [ + '@reach/router', + '@types/reach__router', + ], + }, + { + groupSlug: '@testing-library/dom', + groupName: '@testing-library/dom related packages', + packageNames: [ + '@testing-library/dom', + '@types/testing-library__dom', + ], + }, + { + groupSlug: 'angular', + groupName: 'angular related packages', + packagePatterns: [ + '(\\b|_)angular(\\b|_)', + ], + }, + { + groupSlug: 'api-documenter', + groupName: 'api-documenter related packages', + packageNames: [ + '@microsoft/api-documenter', + '@types/microsoft__api-documenter', + '@microsoft/api-extractor', + '@types/microsoft__api-extractor', + ], + enabled: false, + }, + { + groupSlug: 'archiver', + groupName: 'archiver related packages', + packageNames: [ + 'archiver', + '@types/archiver', + ], + }, + { + groupSlug: 'babel', + groupName: 'babel related packages', + packagePatterns: [ + '(\\b|_)babel(\\b|_)', + ], + packageNames: [ + 'core-js', + '@types/core-js', + '@babel/preset-react', + '@types/babel__preset-react', + '@babel/preset-typescript', + '@types/babel__preset-typescript', + ], + }, + { + groupSlug: 'base64-js', + groupName: 'base64-js related packages', + packageNames: [ + 'base64-js', + '@types/base64-js', + ], + }, + { + groupSlug: 'bluebird', + groupName: 'bluebird related packages', + packageNames: [ + 'bluebird', + '@types/bluebird', + ], + }, + { + groupSlug: 'browserslist-useragent', + groupName: 'browserslist-useragent related packages', + packageNames: [ + 'browserslist-useragent', + '@types/browserslist-useragent', + ], + }, + { + groupSlug: 'chance', + groupName: 'chance related packages', + packageNames: [ + 'chance', + '@types/chance', + ], + }, + { + groupSlug: 'cheerio', + groupName: 'cheerio related packages', + packageNames: [ + 'cheerio', + '@types/cheerio', + ], + }, + { + groupSlug: 'chroma-js', + groupName: 'chroma-js related packages', + packageNames: [ + 'chroma-js', + '@types/chroma-js', + ], + }, + { + groupSlug: 'chromedriver', + groupName: 'chromedriver related packages', + packageNames: [ + 'chromedriver', + '@types/chromedriver', + ], + }, + { + groupSlug: 'classnames', + groupName: 'classnames related packages', + packageNames: [ + 'classnames', + '@types/classnames', + ], + }, + { + groupSlug: 'cmd-shim', + groupName: 'cmd-shim related packages', + packageNames: [ + 'cmd-shim', + '@types/cmd-shim', + ], + }, + { + groupSlug: 'color', + groupName: 'color related packages', + packageNames: [ + 'color', + '@types/color', + ], + }, + { + groupSlug: 'cpy', + groupName: 'cpy related packages', + packageNames: [ + 'cpy', + '@types/cpy', + ], + }, + { + groupSlug: 'cytoscape', + groupName: 'cytoscape related packages', + packageNames: [ + 'cytoscape', + '@types/cytoscape', + ], + }, + { + groupSlug: 'd3', + groupName: 'd3 related packages', + packagePatterns: [ + '(\\b|_)d3(\\b|_)', + ], + }, + { + groupSlug: 'dedent', + groupName: 'dedent related packages', + packageNames: [ + 'dedent', + '@types/dedent', + ], + }, + { + groupSlug: 'deep-freeze-strict', + groupName: 'deep-freeze-strict related packages', + packageNames: [ + 'deep-freeze-strict', + '@types/deep-freeze-strict', + ], + }, + { + groupSlug: 'delete-empty', + groupName: 'delete-empty related packages', + packageNames: [ + 'delete-empty', + '@types/delete-empty', + ], + }, + { + groupSlug: 'dragselect', + groupName: 'dragselect related packages', + packageNames: [ + 'dragselect', + '@types/dragselect', + ], + labels: [ + 'release_note:skip', + 'Team:Operations', + 'renovate', + 'v8.0.0', + 'v7.9.0', + ':ml', + ], + }, + { + groupSlug: 'elasticsearch', + groupName: 'elasticsearch related packages', + packageNames: [ + 'elasticsearch', + '@types/elasticsearch', + ], + }, + { + groupSlug: 'eslint', + groupName: 'eslint related packages', + packagePatterns: [ + '(\\b|_)eslint(\\b|_)', + ], + }, + { + groupSlug: 'estree', + groupName: 'estree related packages', + packageNames: [ + 'estree', + '@types/estree', + ], + }, + { + groupSlug: 'fancy-log', + groupName: 'fancy-log related packages', + packageNames: [ + 'fancy-log', + '@types/fancy-log', + ], + }, + { + groupSlug: 'fetch-mock', + groupName: 'fetch-mock related packages', + packageNames: [ + 'fetch-mock', + '@types/fetch-mock', + ], + }, + { + groupSlug: 'file-saver', + groupName: 'file-saver related packages', + packageNames: [ + 'file-saver', + '@types/file-saver', + ], + }, + { + groupSlug: 'flot', + groupName: 'flot related packages', + packageNames: [ + 'flot', + '@types/flot', + ], + }, + { + groupSlug: 'geojson', + groupName: 'geojson related packages', + packageNames: [ + 'geojson', + '@types/geojson', + ], + }, + { + groupSlug: 'getopts', + groupName: 'getopts related packages', + packageNames: [ + 'getopts', + '@types/getopts', + ], + }, + { + groupSlug: 'getos', + groupName: 'getos related packages', + packageNames: [ + 'getos', + '@types/getos', + ], + }, + { + groupSlug: 'git-url-parse', + groupName: 'git-url-parse related packages', + packageNames: [ + 'git-url-parse', + '@types/git-url-parse', + ], + }, + { + groupSlug: 'glob', + groupName: 'glob related packages', + packageNames: [ + 'glob', + '@types/glob', + ], + }, + { + groupSlug: 'globby', + groupName: 'globby related packages', + packageNames: [ + 'globby', + '@types/globby', + ], + }, + { + groupSlug: 'graphql', + groupName: 'graphql related packages', + packagePatterns: [ + '(\\b|_)graphql(\\b|_)', + '(\\b|_)apollo(\\b|_)', + ], + }, + { + groupSlug: 'grunt', + groupName: 'grunt related packages', + packagePatterns: [ + '(\\b|_)grunt(\\b|_)', + ], + }, + { + groupSlug: 'gulp', + groupName: 'gulp related packages', + packagePatterns: [ + '(\\b|_)gulp(\\b|_)', + ], + }, + { + groupSlug: 'hapi', + groupName: 'hapi related packages', + packagePatterns: [ + '(\\b|_)hapi(\\b|_)', + ], + packageNames: [ + 'hapi', + '@types/hapi', + 'joi', + '@types/joi', + 'boom', + '@types/boom', + 'hoek', + '@types/hoek', + 'h2o2', + '@types/h2o2', + '@elastic/good', + '@types/elastic__good', + 'good-squeeze', + '@types/good-squeeze', + 'inert', + '@types/inert', + 'accept', + '@types/accept', + ], + }, + { + groupSlug: 'has-ansi', + groupName: 'has-ansi related packages', + packageNames: [ + 'has-ansi', + '@types/has-ansi', + ], + }, + { + groupSlug: 'he', + groupName: 'he related packages', + packageNames: [ + 'he', + '@types/he', + ], + }, + { + groupSlug: 'history', + groupName: 'history related packages', + packageNames: [ + 'history', + '@types/history', + ], + }, + { + groupSlug: 'hjson', + groupName: 'hjson related packages', + packageNames: [ + 'hjson', + '@types/hjson', + ], + }, + { + groupSlug: 'inquirer', + groupName: 'inquirer related packages', + packageNames: [ + 'inquirer', + '@types/inquirer', + ], + }, + { + groupSlug: 'intl-relativeformat', + groupName: 'intl-relativeformat related packages', + packageNames: [ + 'intl-relativeformat', + '@types/intl-relativeformat', + ], + }, + { + groupSlug: 'jest', + groupName: 'jest related packages', + packagePatterns: [ + '(\\b|_)jest(\\b|_)', + ], + }, + { + groupSlug: 'jquery', + groupName: 'jquery related packages', + packageNames: [ + 'jquery', + '@types/jquery', + ], + }, + { + groupSlug: 'js-search', + groupName: 'js-search related packages', + packageNames: [ + 'js-search', + '@types/js-search', + ], + }, + { + groupSlug: 'js-yaml', + groupName: 'js-yaml related packages', + packageNames: [ + 'js-yaml', + '@types/js-yaml', + ], + }, + { + groupSlug: 'jsdom', + groupName: 'jsdom related packages', + packageNames: [ + 'jsdom', + '@types/jsdom', + ], + }, + { + groupSlug: 'json-stable-stringify', + groupName: 'json-stable-stringify related packages', + packageNames: [ + 'json-stable-stringify', + '@types/json-stable-stringify', + ], + }, + { + groupSlug: 'json5', + groupName: 'json5 related packages', + packageNames: [ + 'json5', + '@types/json5', + ], + }, + { + groupSlug: 'jsonwebtoken', + groupName: 'jsonwebtoken related packages', + packageNames: [ + 'jsonwebtoken', + '@types/jsonwebtoken', + ], + }, + { + groupSlug: 'jsts', + groupName: 'jsts related packages', + packageNames: [ + 'jsts', + '@types/jsts', + ], + allowedVersions: '^1.6.2', + }, + { + groupSlug: 'karma', + groupName: 'karma related packages', + packagePatterns: [ + '(\\b|_)karma(\\b|_)', + ], + }, + { + groupSlug: 'language server', + groupName: 'language server related packages', + packageNames: [ + 'vscode-jsonrpc', + '@types/vscode-jsonrpc', + 'vscode-languageserver', + '@types/vscode-languageserver', + 'vscode-languageserver-types', + '@types/vscode-languageserver-types', + ], + }, + { + groupSlug: 'license-checker', + groupName: 'license-checker related packages', + packageNames: [ + 'license-checker', + '@types/license-checker', + ], + }, + { + groupSlug: 'listr', + groupName: 'listr related packages', + packageNames: [ + 'listr', + '@types/listr', + ], + }, + { + groupSlug: 'lodash', + groupName: 'lodash related packages', + packageNames: [ + 'lodash', + '@types/lodash', + ], + }, + { + groupSlug: 'log-symbols', + groupName: 'log-symbols related packages', + packageNames: [ + 'log-symbols', + '@types/log-symbols', + ], + }, + { + groupSlug: 'lru-cache', + groupName: 'lru-cache related packages', + packageNames: [ + 'lru-cache', + '@types/lru-cache', + ], + }, + { + groupSlug: 'mapbox-gl', + groupName: 'mapbox-gl related packages', + packageNames: [ + 'mapbox-gl', + '@types/mapbox-gl', + ], + }, + { + groupSlug: 'markdown-it', + groupName: 'markdown-it related packages', + packageNames: [ + 'markdown-it', + '@types/markdown-it', + ], + }, + { + groupSlug: 'memoize-one', + groupName: 'memoize-one related packages', + packageNames: [ + 'memoize-one', + '@types/memoize-one', + ], + }, + { + groupSlug: 'mime', + groupName: 'mime related packages', + packageNames: [ + 'mime', + '@types/mime', + ], + }, + { + groupSlug: 'minimatch', + groupName: 'minimatch related packages', + packageNames: [ + 'minimatch', + '@types/minimatch', + ], + }, + { + groupSlug: 'mocha', + groupName: 'mocha related packages', + packagePatterns: [ + '(\\b|_)mocha(\\b|_)', + ], + }, + { + groupSlug: 'mock-fs', + groupName: 'mock-fs related packages', + packageNames: [ + 'mock-fs', + '@types/mock-fs', + ], + }, + { + groupSlug: 'moment', + groupName: 'moment related packages', + packagePatterns: [ + '(\\b|_)moment(\\b|_)', + ], + }, + { + groupSlug: 'mustache', + groupName: 'mustache related packages', + packageNames: [ + 'mustache', + '@types/mustache', + ], + }, + { + groupSlug: 'ncp', + groupName: 'ncp related packages', + packageNames: [ + 'ncp', + '@types/ncp', + ], + }, + { + groupSlug: 'nock', + groupName: 'nock related packages', + packageNames: [ + 'nock', + '@types/nock', + ], + }, + { + groupSlug: 'node', + groupName: 'node related packages', + packageNames: [ + 'node', + '@types/node', + ], + }, + { + groupSlug: 'node-fetch', + groupName: 'node-fetch related packages', + packageNames: [ + 'node-fetch', + '@types/node-fetch', + ], + }, + { + groupSlug: 'node-forge', + groupName: 'node-forge related packages', + packageNames: [ + 'node-forge', + '@types/node-forge', + ], + }, + { + groupSlug: 'node-sass', + groupName: 'node-sass related packages', + packageNames: [ + 'node-sass', + '@types/node-sass', + ], + }, + { + groupSlug: 'nodemailer', + groupName: 'nodemailer related packages', + packageNames: [ + 'nodemailer', + '@types/nodemailer', + ], + }, + { + groupSlug: 'normalize-path', + groupName: 'normalize-path related packages', + packageNames: [ + 'normalize-path', + '@types/normalize-path', + ], + }, + { + groupSlug: 'object-hash', + groupName: 'object-hash related packages', + packageNames: [ + 'object-hash', + '@types/object-hash', + ], + }, + { + groupSlug: 'opn', + groupName: 'opn related packages', + packageNames: [ + 'opn', + '@types/opn', + ], + }, + { + groupSlug: 'ora', + groupName: 'ora related packages', + packageNames: [ + 'ora', + '@types/ora', + ], + }, + { + groupSlug: 'papaparse', + groupName: 'papaparse related packages', + packageNames: [ + 'papaparse', + '@types/papaparse', + ], + }, + { + groupSlug: 'parse-link-header', + groupName: 'parse-link-header related packages', + packageNames: [ + 'parse-link-header', + '@types/parse-link-header', + ], + }, + { + groupSlug: 'pegjs', + groupName: 'pegjs related packages', + packageNames: [ + 'pegjs', + '@types/pegjs', + ], + }, + { + groupSlug: 'pngjs', + groupName: 'pngjs related packages', + packageNames: [ + 'pngjs', + '@types/pngjs', + ], + }, + { + groupSlug: 'podium', + groupName: 'podium related packages', + packageNames: [ + 'podium', + '@types/podium', + ], + }, + { + groupSlug: 'pretty-ms', + groupName: 'pretty-ms related packages', + packageNames: [ + 'pretty-ms', + '@types/pretty-ms', + ], + }, + { + groupSlug: 'proper-lockfile', + groupName: 'proper-lockfile related packages', + packageNames: [ + 'proper-lockfile', + '@types/proper-lockfile', + ], + }, + { + groupSlug: 'puppeteer', + groupName: 'puppeteer related packages', + packageNames: [ + 'puppeteer', + '@types/puppeteer', + ], + }, + { + groupSlug: 'react', + groupName: 'react related packages', + packagePatterns: [ + '(\\b|_)react(\\b|_)', + '(\\b|_)redux(\\b|_)', + '(\\b|_)enzyme(\\b|_)', + ], + packageNames: [ + 'ngreact', + '@types/ngreact', + 'recompose', + '@types/recompose', + 'prop-types', + '@types/prop-types', + 'typescript-fsa-reducers', + '@types/typescript-fsa-reducers', + 'reselect', + '@types/reselect', + ], + }, + { + groupSlug: 'read-pkg', + groupName: 'read-pkg related packages', + packageNames: [ + 'read-pkg', + '@types/read-pkg', + ], + }, + { + groupSlug: 'reduce-reducers', + groupName: 'reduce-reducers related packages', + packageNames: [ + 'reduce-reducers', + '@types/reduce-reducers', + ], + }, + { + groupSlug: 'request', + groupName: 'request related packages', + packageNames: [ + 'request', + '@types/request', + ], + }, + { + groupSlug: 'selenium-webdriver', + groupName: 'selenium-webdriver related packages', + packageNames: [ + 'selenium-webdriver', + '@types/selenium-webdriver', + ], + }, + { + groupSlug: 'semver', + groupName: 'semver related packages', + packageNames: [ + 'semver', + '@types/semver', + ], + }, + { + groupSlug: 'set-value', + groupName: 'set-value related packages', + packageNames: [ + 'set-value', + '@types/set-value', + ], + }, + { + groupSlug: 'sinon', + groupName: 'sinon related packages', + packageNames: [ + 'sinon', + '@types/sinon', + ], + }, + { + groupSlug: 'stats-lite', + groupName: 'stats-lite related packages', + packageNames: [ + 'stats-lite', + '@types/stats-lite', + ], + }, + { + groupSlug: 'storybook', + groupName: 'storybook related packages', + packagePatterns: [ + '(\\b|_)storybook(\\b|_)', + ], + }, + { + groupSlug: 'strip-ansi', + groupName: 'strip-ansi related packages', + packageNames: [ + 'strip-ansi', + '@types/strip-ansi', + ], + }, + { + groupSlug: 'strong-log-transformer', + groupName: 'strong-log-transformer related packages', + packageNames: [ + 'strong-log-transformer', + '@types/strong-log-transformer', + ], + }, + { + groupSlug: 'styled-components', + groupName: 'styled-components related packages', + packageNames: [ + 'styled-components', + '@types/styled-components', + ], + }, + { + groupSlug: 'supertest', + groupName: 'supertest related packages', + packageNames: [ + 'supertest', + '@types/supertest', + ], + }, + { + groupSlug: 'supertest-as-promised', + groupName: 'supertest-as-promised related packages', + packageNames: [ + 'supertest-as-promised', + '@types/supertest-as-promised', + ], + }, + { + groupSlug: 'tar', + groupName: 'tar related packages', + packageNames: [ + 'tar', + '@types/tar', + ], + }, + { + groupSlug: 'tar-fs', + groupName: 'tar-fs related packages', + packageNames: [ + 'tar-fs', + '@types/tar-fs', + ], + }, + { + groupSlug: 'tempy', + groupName: 'tempy related packages', + packageNames: [ + 'tempy', + '@types/tempy', + ], + }, + { + groupSlug: 'through2', + groupName: 'through2 related packages', + packageNames: [ + 'through2', + '@types/through2', + ], + }, + { + groupSlug: 'through2-map', + groupName: 'through2-map related packages', + packageNames: [ + 'through2-map', + '@types/through2-map', + ], + }, + { + groupSlug: 'tinycolor2', + groupName: 'tinycolor2 related packages', + packageNames: [ + 'tinycolor2', + '@types/tinycolor2', + ], + }, + { + groupSlug: 'type-detect', + groupName: 'type-detect related packages', + packageNames: [ + 'type-detect', + '@types/type-detect', + ], + }, + { + groupSlug: 'typescript', + groupName: 'typescript related packages', + packagePatterns: [ + '(\\b|_)ts(\\b|_)', + '(\\b|_)typescript(\\b|_)', + ], + packageNames: [ + 'tslib', + '@types/tslib', + ], + }, + { + groupSlug: 'use-resize-observer', + groupName: 'use-resize-observer related packages', + packageNames: [ + 'use-resize-observer', + '@types/use-resize-observer', + ], + }, + { + groupSlug: 'uuid', + groupName: 'uuid related packages', + packageNames: [ + 'uuid', + '@types/uuid', + ], + }, + { + groupSlug: 'vega', + groupName: 'vega related packages', + packagePatterns: [ + '(\\b|_)vega(\\b|_)', + ], + enabled: false, + }, + { + groupSlug: 'vinyl', + groupName: 'vinyl related packages', + packageNames: [ + 'vinyl', + '@types/vinyl', + ], + }, + { + groupSlug: 'vinyl-fs', + groupName: 'vinyl-fs related packages', + packageNames: [ + 'vinyl-fs', + '@types/vinyl-fs', + ], + }, + { + groupSlug: 'watchpack', + groupName: 'watchpack related packages', + packageNames: [ + 'watchpack', + '@types/watchpack', + ], + }, + { + groupSlug: 'webpack', + groupName: 'webpack related packages', + packagePatterns: [ + '(\\b|_)webpack(\\b|_)', + '(\\b|_)loader(\\b|_)', + '(\\b|_)acorn(\\b|_)', + '(\\b|_)terser(\\b|_)', + ], + packageNames: [ + 'mini-css-extract-plugin', + '@types/mini-css-extract-plugin', + 'chokidar', + '@types/chokidar', + ], + }, + { + groupSlug: 'write-pkg', + groupName: 'write-pkg related packages', + packageNames: [ + 'write-pkg', + '@types/write-pkg', + ], + }, + { + groupSlug: 'xml-crypto', + groupName: 'xml-crypto related packages', + packageNames: [ + 'xml-crypto', + '@types/xml-crypto', + ], + }, + { + groupSlug: 'xml2js', + groupName: 'xml2js related packages', + packageNames: [ + 'xml2js', + '@types/xml2js', + ], + }, + { + groupSlug: 'zen-observable', + groupName: 'zen-observable related packages', + packageNames: [ + 'zen-observable', + '@types/zen-observable', + ], + }, + { + packagePatterns: [ + '^@osd/.*', + ], + enabled: false, + }, + ], + }, + prConcurrentLimit: 0, + vulnerabilityAlerts: { + enabled: false, + }, + rebaseStalePrs: false, + rebaseConflictedPrs: false, + semanticCommits: false, +} diff --git a/scripts/bwc/opensearch_dashboards_service.sh b/scripts/bwc/opensearch_dashboards_service.sh new file mode 100755 index 000000000000..e3016433b492 --- /dev/null +++ b/scripts/bwc/opensearch_dashboards_service.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +# Copyright OpenSearch Contributors +# SPDX-License-Identifier: Apache-2.0 + +set -e + +function setup_dashboards() { + cd "$DASHBOARDS_DIR" + [ $SECURITY_ENABLED == "false" ] && [ -d "plugins/securityDashboards" ] && ./bin/opensearch-dashboards-plugin remove securityDashboards + [ $SECURITY_ENABLED == "false" ] && rm config/opensearch_dashboards.yml && touch config/opensearch_dashboards.yml + [ $SECURITY_ENABLED == "false" ] && echo "server.host: 0.0.0.0" >> config/opensearch_dashboards.yml + echo "csp.warnLegacyBrowsers: false" >> config/opensearch_dashboards.yml + echo "--max-old-space-size=5120" >> config/node.options +} + +# Starts OpenSearch Dashboards +function run_dashboards() { + echo "[ Attempting to start OpenSearch Dashboards... ]" + cd "$DASHBOARDS_DIR" + spawn_process_and_save_PID "./bin/opensearch-dashboards > ${LOGS_DIR}/opensearch_dashboards.log 2>&1 &" +} + +# Checks the running status of OpenSearch Dashboards +# it calls check_status and passes the OpenSearch Dashboards tmp file path, error msg, url, and arguments +# if success, the while loop in the check_status will end and it prints out "OpenSearch Dashboards is up!" +function check_dashboards_status { + echo "Checking the OpenSearch Dashboards..." + cd "$DIR" + check_status $DASHBOARDS_PATH "$DASHBOARDS_MSG" $DASHBOARDS_URL "" >> /dev/null 2>&1 + echo "OpenSearch Dashboards is up!" +} diff --git a/scripts/bwc/opensearch_service.sh b/scripts/bwc/opensearch_service.sh new file mode 100755 index 000000000000..ecd95990de7e --- /dev/null +++ b/scripts/bwc/opensearch_service.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +# Copyright OpenSearch Contributors +# SPDX-License-Identifier: Apache-2.0 + +set -e + +function setup_opensearch() { + cd "$OPENSEARCH_DIR" + echo "network.host: 0.0.0.0" >> config/opensearch.yml + echo "discovery.type: single-node" >> config/opensearch.yml + [ $SECURITY_ENABLED == "false" ] && [ -d "plugins/opensearch-security" ] && echo "plugins.security.disabled: true" >> config/opensearch.yml + # Required for IM + [ -d "plugins/opensearch-index-management" ] && echo "path.repo: [/tmp]" >> config/opensearch.yml + # Required for Alerting + [ -d "plugins/opensearch-alerting" ] && echo "plugins.destination.host.deny_list: [\"10.0.0.0/8\", \"127.0.0.1\"]" >> config/opensearch.yml + # Required for SQL + [ -d "plugins/opensearch-sql" ] && echo "script.context.field.max_compilations_rate: 1000/1m" >> config/opensearch.yml + # Required for PA + [ -d "plugins/opensearch-performance-analyzer" ] && echo "webservice-bind-host = 0.0.0.0" >> config/opensearch-performance-analyzer/performance-analyzer.properties +} + +# Starts OpenSearch, if verifying a distribution it will install the certs then start. +function run_opensearch() { + echo "[ Attempting to start OpenSearch... ]" + cd "$OPENSEARCH_DIR" + spawn_process_and_save_PID "./opensearch-tar-install.sh > ${LOGS_DIR}/opensearch.log 2>&1 &" +} + +# Checks the running status of OpenSearch +# it calls check_status and passes the OpenSearch tmp file path, error msg, url, and arguments +# if success, the while loop in the check_status will end and it prints out "OpenSearch is up!" +function check_opensearch_status() { + echo "Checking the status OpenSearch..." + cd "$DIR" + check_status $OPENSEARCH_PATH "$OPENSEARCH_MSG" $OPENSEARCH_URL "$OPENSEARCH_ARGS" >> /dev/null 2>&1 & + echo "OpenSearch is up!" +} diff --git a/scripts/bwc/utils.sh b/scripts/bwc/utils.sh new file mode 100755 index 000000000000..5400a91a9ef4 --- /dev/null +++ b/scripts/bwc/utils.sh @@ -0,0 +1,69 @@ +#!/bin/bash + +# Copyright OpenSearch Contributors +# SPDX-License-Identifier: Apache-2.0 + +set -e + +function open_artifact() { + artifact_dir=$1 + artifact=$2 + cd $artifact_dir + + # check if artifact provided is URL or attempt if passing by absolute path + if curl -I -L $artifact; then + curl -L $artifact | tar -xz --strip-components=1 + else + tar -xf $artifact --strip-components=1 + fi +} + +# remove the running opensearch process +function clean() { + echo "Attempt to Terminate Process with PID: ${PARENT_PID_LIST[*]}" + for pid_kill in "${PARENT_PID_LIST[@]}" + do + echo "Closing PID $pid_kill" + kill $pid_kill || true + done + PARENT_PID_LIST=() +} + +function spawn_process_and_save_PID() { + echo "Spawn '$@'" + eval $@ + curr_pid=$! + echo "PID: $curr_pid" + PARENT_PID_LIST+=( $curr_pid ) +} + +# Print out a textfile line by line +function print_txt() { + while IFS= read -r line; do + echo "text read from $1: $line" + done < $1 +} + +# this function is used to check the running status of OpenSearch or OpenSearch Dashboards +# $1 is the path to the tmp file which saves the running status +# $2 is the error msg to check +# $3 is the url to curl +# $4 contains arguments that need to be passed to the curl command +function check_status() { + while [ ! -f $1 ] || ! grep -q "$2" $1; do + if [ -f $1 ]; then rm $1; fi + curl $3 $4 > $1 || true + done + rm $1 +} + +# this function copies the tested data for the required version to the opensearch data folder +# $1 is the required version +function upload_data() { + rm -rf "$OPENSEARCH_DIR/data" + cd $OPENSEARCH_DIR + cp "$CWD/cypress/test-data/$DASHBOARDS_TYPE/$1.tar.gz" . + tar -xvf "$OPENSEARCH_DIR/$1.tar.gz" >> /dev/null 2>&1 + rm "$1.tar.gz" + echo "Data has been uploaded and ready to test" +} diff --git a/scripts/stylelint.js b/scripts/stylelint.js new file mode 100644 index 000000000000..3679c94ddd15 --- /dev/null +++ b/scripts/stylelint.js @@ -0,0 +1,32 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + * Any modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +require('../src/setup_node_env'); +require('../src/dev/run_stylelint'); diff --git a/src/dev/build/tasks/patch_native_modules_task.test.ts b/src/dev/build/tasks/patch_native_modules_task.test.ts new file mode 100644 index 000000000000..25bb49e06ee0 --- /dev/null +++ b/src/dev/build/tasks/patch_native_modules_task.test.ts @@ -0,0 +1,92 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import { + ToolingLog, + ToolingLogCollectingWriter, + createAnyInstanceSerializer, + createAbsolutePathSerializer, +} from '@osd/dev-utils'; +import { Build, Config } from '../lib'; +import { PatchNativeModules } from './patch_native_modules_task'; + +const log = new ToolingLog(); +const testWriter = new ToolingLogCollectingWriter(); +log.setWriters([testWriter]); +expect.addSnapshotSerializer(createAnyInstanceSerializer(Config)); +expect.addSnapshotSerializer(createAnyInstanceSerializer(ToolingLog)); +expect.addSnapshotSerializer(createAbsolutePathSerializer()); + +jest.mock('../lib/download'); +jest.mock('../lib/fs', () => ({ + ...jest.requireActual('../lib/fs'), + untar: jest.fn(), + gunzip: jest.fn(), +})); + +const { untar } = jest.requireMock('../lib/fs'); +const { gunzip } = jest.requireMock('../lib/fs'); +const { download } = jest.requireMock('../lib/download'); + +async function setup() { + const config = await Config.create({ + isRelease: true, + targetAllPlatforms: false, + targetPlatforms: { + linux: false, + linuxArm: false, + darwin: false, + }, + }); + + const build = new Build(config); + + download.mockImplementation(() => {}); + untar.mockImplementation(() => {}); + gunzip.mockImplementation(() => {}); + + return { config, build }; +} + +beforeEach(() => { + testWriter.messages.length = 0; + jest.clearAllMocks(); +}); + +it('patch native modules task downloads the correct platform package', async () => { + const { config, build } = await setup(); + config.targetPlatforms.linuxArm = true; + await PatchNativeModules.run(config, log, build); + expect(download.mock.calls.length).toBe(1); + expect(download.mock.calls).toMatchInlineSnapshot(` + Array [ + Array [ + Object { + "destination": /.native_modules/re2/linux-arm64-83.tar.gz, + "log": , + "retries": 3, + "sha256": "f25124adc64d269a513b99abd4a5eed8d7a929db565207f8ece1f3b7b7931668", + "url": "https://d1v1sj258etie.cloudfront.net/node-re2/releases/download/1.15.4/linux-arm64-83.tar.gz", + }, + ], + ] + `); +}); + +it('for .tar.gz artifact, patch native modules task unzip it via untar', async () => { + const { config, build } = await setup(); + config.targetPlatforms.linuxArm = true; + await PatchNativeModules.run(config, log, build); + expect(untar.mock.calls.length).toBe(1); + expect(gunzip.mock.calls.length).toBe(0); +}); + +it('for .gz artifact, patch native modules task unzip it via gunzip', async () => { + const { config, build } = await setup(); + config.targetPlatforms.linux = true; + await PatchNativeModules.run(config, log, build); + expect(untar.mock.calls.length).toBe(0); + expect(gunzip.mock.calls.length).toBe(1); +}); diff --git a/src/dev/run_stylelint.js b/src/dev/run_stylelint.js new file mode 100644 index 000000000000..530db170a731 --- /dev/null +++ b/src/dev/run_stylelint.js @@ -0,0 +1,47 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + * Any modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { resolve } from 'path'; +import { buildCLI } from 'stylelint/lib/cli'; + +const options = buildCLI(process.argv.slice(2)); + +const stylelintConfigPath = resolve(__dirname, '..', '..', '.stylelintrc.yml'); +const stylelintIgnorePath = resolve(__dirname, '..', '..', '.stylelintignore'); + +if (!options.input.length) { + process.argv.push('**/*.s+(a|c)ss'); +} +process.argv.push('--max-warnings', '0'); // return nonzero exit code on any warnings +process.argv.push('--config', stylelintConfigPath); // configuration file +process.argv.push('--ignore-path', stylelintIgnorePath); // ignore file + +// common-js is required so that logic before this executes before loading stylelint +require('stylelint/bin/stylelint'); diff --git a/src/dev/stylelint/index.js b/src/dev/stylelint/index.js new file mode 100644 index 000000000000..da442a2b4af7 --- /dev/null +++ b/src/dev/stylelint/index.js @@ -0,0 +1,32 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + * Any modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +export { pickFilesToLint } from './pick_files_to_lint'; +export { lintFiles } from './lint_files'; diff --git a/src/dev/stylelint/lint_files.js b/src/dev/stylelint/lint_files.js new file mode 100644 index 000000000000..ead1fde5bb23 --- /dev/null +++ b/src/dev/stylelint/lint_files.js @@ -0,0 +1,66 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + * Any modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import stylelint from 'stylelint'; +import path from 'path'; +import { safeLoad } from 'js-yaml'; +import fs from 'fs'; +import { createFailError } from '@osd/dev-utils'; + +// load the include globs from .stylelintrc.yml and convert them to regular expressions for filtering files +const stylelintPath = path.resolve(__dirname, '..', '..', '..', '.stylelintrc.yml'); +const styleLintConfig = safeLoad(fs.readFileSync(stylelintPath)); + +/** + * Lints a list of files with eslint. eslint reports are written to the log + * and a FailError is thrown when linting errors occur. + * + * @param {ToolingLog} log + * @param {Array} files + * @return {undefined} + */ +export async function lintFiles(log, files) { + const paths = files.map((file) => file.getRelativePath()); + + const options = { + files: paths, + config: styleLintConfig, + formatter: 'string', + ignorePath: path.resolve(__dirname, '..', '..', '..', '.stylelintignore'), + }; + + const report = await stylelint.lint(options); + if (report.errored) { + log.error(report.output); + throw createFailError('[stylelint] errors'); + } else { + log.success('[stylelint] %d files linted successfully', files.length); + } +} diff --git a/src/dev/stylelint/pick_files_to_lint.js b/src/dev/stylelint/pick_files_to_lint.js new file mode 100644 index 000000000000..08e5e35777ef --- /dev/null +++ b/src/dev/stylelint/pick_files_to_lint.js @@ -0,0 +1,47 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + * Any modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { makeRe } from 'minimatch'; + +const includeGlobs = ['**/*.s+(a|c)ss']; +const includeRegex = includeGlobs.map((glob) => makeRe(glob)); + +function matchesInclude(file) { + for (let i = 0; i < includeRegex.length; i++) { + if (includeRegex[i].test(file.relativePath)) { + return true; + } + } + return false; +} + +export function pickFilesToLint(log, files) { + return files.filter((file) => file.isSass()).filter(matchesInclude); +}