diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 7f92a3c6..10b36542 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,2 +1,2 @@ # This should match the owning team set up in https://github.com/orgs/opensearch-project/teams -* @opensearch-project/sql \ No newline at end of file +* @pjfitzgibbons @ps48 @kavithacm @derek-ho @joshuali925 @dai-chen @YANG-DB @rupal-bq @mengweieric @vamsi-amazon @swiddis @penghuo @seankao-az @MaxKsyunz @Yury-Fridlyand @anirudha \ No newline at end of file diff --git a/.github/workflows/add-untriaged.yml b/.github/workflows/add-untriaged.yml new file mode 100644 index 00000000..9dcc7020 --- /dev/null +++ b/.github/workflows/add-untriaged.yml @@ -0,0 +1,19 @@ +name: Apply 'untriaged' label during issue lifecycle + +on: + issues: + types: [opened, reopened, transferred] + +jobs: + apply-label: + runs-on: ubuntu-latest + steps: + - uses: actions/github-script@v6 + with: + script: | + github.rest.issues.addLabels({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + labels: ['untriaged'] + }) diff --git a/.github/workflows/sql-workbench-test-build-workflow.yml b/.github/workflows/sql-workbench-test-build-workflow.yml index c9fd0299..9866a565 100644 --- a/.github/workflows/sql-workbench-test-build-workflow.yml +++ b/.github/workflows/sql-workbench-test-build-workflow.yml @@ -12,14 +12,14 @@ on: env: PLUGIN_NAME: dashboards-query-workbench OPENSEARCH_VERSION: '2.x' - OPENSEARCH_PLUGIN_VERSION: 2.10.0.0 + OPENSEARCH_PLUGIN_VERSION: 2.11.0.0 jobs: tests: name: Run unit tests strategy: matrix: - os: [ ubuntu-latest, macos-latest, windows-latest ] + os: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.os }} steps: # Enable longer filenames for windows diff --git a/MAINTAINERS.md b/MAINTAINERS.md index 073b4e20..af8c8837 100644 --- a/MAINTAINERS.md +++ b/MAINTAINERS.md @@ -4,13 +4,32 @@ This document contains a list of maintainers in this repo. See [opensearch-proje ## Current Maintainers -| Maintainer | GitHub ID | Affiliation | -| --------------------- | --------------------------------------------------- | ----------- | -| Anirudha (Ani) Jadhav | [anirudha](https://github.com/anirudha) | Amazon | -| Peng Huo | [penghuo](https://github.com/penghuo) | Amazon | -| Chen Dai | [dai-chen](https://github.com/dai-chen) | Amazon | -| Chloe Zhang | [chloe-zh](https://github.com/chloe-zh) | Amazon | -| Nick Knize | [nknize](https://github.com/nknize) | Amazon | -| Charlotte Henkle | [CEHENKLE](https://github.com/CEHENKLE) | Amazon | -| Max Ksyunz | [MaxKsyunz](https://github.com/MaxKsyunz) | BitQuill | -| Yury Fridlyand | [Yury-Fridlyand](https://github.com/Yury-Fridlyand) | BitQuill | \ No newline at end of file +| Maintainer | GitHub ID | Affiliation | +| ----------------- | ------------------------------------------------- | ----------- | +| Eric Wei | [mengweieric](https://github.com/mengweieric) | Amazon | +| Joshua Li | [joshuali925](https://github.com/joshuali925) | Amazon | +| Shenoy Pratik | [ps48](https://github.com/ps48) | Amazon | +| Kavitha Mohan | [kavithacm](https://github.com/kavithacm) | Amazon | +| Rupal Mahajan | [rupal-bq](https://github.com/rupal-bq) | Amazon | +| Derek Ho | [derek-ho](https://github.com/derek-ho) | Amazon | +| Lior Perry | [YANG-DB](https://github.com/YANG-DB) | Amazon | +| Peter Fitzgibbons | [pjfitzgibbons](https://github.com/pjfitzgibbons) | Amazon | +| Simeon Widdis | [swiddis](https://github.com/swiddis) | Amazon | +| Chen Dai | [dai-chen](https://github.com/dai-chen) | Amazon | +| Vamsi Manohar | [vamsi-amazon](https://github.com/vamsi-amazon) | Amazon | +| Peng Huo | [penghuo](https://github.com/penghuo) | Amazon | +| Sean Kao | [seankao-az](https://github.com/seankao-az) | Amazon | +| Max Ksyunz | [MaxKsyunz](https://github.com/MaxKsyunz) | BitQuill | +| Yury Fridlyand | [Yury-Fridlyand](https://github.com/Yury-Fridlyand) | BitQuill | +| Anirudha Jadhav | [anirudha](https://github.com/anirudha) | Amazon | + +## Emeritus Maintainers + +| Maintainer | GitHub ID | Affiliation | +| ----------------- | ------------------------------------------------------- | ----------- | +| Charlotte Henkle | [CEHENKLE](https://github.com/CEHENKLE) | Amazon | +| Nick Knize | [nknize](https://github.com/nknize) | Amazon | +| David Cui | [davidcui1225](https://github.com/davidcui1225) | Amazon | +| Eugene Lee | [eugenesk24](https://github.com/eugenesk24) | Amazon | +| Zhongnan Su | [zhongnansu](https://github.com/zhongnansu) | Amazon | +| Chloe Zhang | [chloe-zh](https://github.com/chloe-zh) | Amazon | \ No newline at end of file diff --git a/common/constants/index.ts b/common/constants/index.ts index 4fc24444..ed37754e 100644 --- a/common/constants/index.ts +++ b/common/constants/index.ts @@ -8,20 +8,20 @@ export const PLUGIN_NAME = 'Query Workbench'; export const OPENSEARCH_ACC_DOCUMENTATION_URL = 'https://opensearch.org/docs/latest'; export const ACC_INDEX_TYPE_DOCUMENTATION_URL = 'https://opensearch.org/docs/latest'; -export const SKIPPING_INDEX = `skipping_index` +export const SKIPPING_INDEX = `skipping_index`; export const ON_LOAD_QUERY = `SHOW tables LIKE '%';`; export const SKIPPING_INDEX_QUERY = `CREATE SKIPPING INDEX ON myS3.logs_db.http_logs (status VALUE_SET) WITH ( auto_refresh = true - )` -export const COVERING_INDEX_QUERY =`CREATE INDEX covering_idx ON myS3.logs_db.http_logs + )`; +export const COVERING_INDEX_QUERY = `CREATE INDEX covering_idx ON myS3.logs_db.http_logs (status) WITH ( auto_refresh = true - )` -export const CREATE_DATABASE_QUERY =`CREATE DATABASE myS3.logs_db` -export const CREATE_TABLE_QUERY =`CREATE EXTERNAL TABLE logs ( + )`; +export const CREATE_DATABASE_QUERY = `CREATE DATABASE myS3.logs_db`; +export const CREATE_TABLE_QUERY = `CREATE EXTERNAL TABLE myS3.logs_db.logs ( key BIGINT, status INTEGER, size FLOAT, @@ -32,7 +32,7 @@ USING JSON OPTIONS ( path 's3://test/path', compression 'gzip' -);` +);`; export const ACCELERATION_INDEX_TYPES = [ { label: 'Skipping Index', value: 'skipping' }, @@ -80,3 +80,5 @@ export const ACCELERATION_INDEX_NAME_INFO = `All OpenSearch acceleration indices ##### Note: - All user given index names must be in lowercase letters. Cannot begin with underscores or hyphens. Spaces, commas, and characters :, ", *, +, /, \, |, ?, #, >, or < are not allowed. `; + +export const SIDEBAR_POLL_INTERVAL_MS = 5000; diff --git a/opensearch_dashboards.json b/opensearch_dashboards.json index 5929be0a..0240e24f 100644 --- a/opensearch_dashboards.json +++ b/opensearch_dashboards.json @@ -4,8 +4,6 @@ "opensearchDashboardsVersion": "2.11.0", "server": true, "ui": true, - "requiredPlugins": [ - "navigation" - ], + "requiredPlugins": ["navigation"], "optionalPlugins": [] -} \ No newline at end of file +} diff --git a/package.json b/package.json index 1a3f5174..55b9208d 100644 --- a/package.json +++ b/package.json @@ -44,6 +44,7 @@ "json-schema": "^0.4.0", "yaml": "^2.2.2", "tough-cookie": "^4.1.3", - "semver": "^7.5.2" + "semver": "^7.5.2", + "@cypress/request": "^3.0.0" } } diff --git a/public/components/Main/__snapshots__/main.test.tsx.snap b/public/components/Main/__snapshots__/main.test.tsx.snap index ff0dd051..d8ef37d5 100644 --- a/public/components/Main/__snapshots__/main.test.tsx.snap +++ b/public/components/Main/__snapshots__/main.test.tsx.snap @@ -193,6 +193,7 @@ exports[`
spec click clear button 1`] = ` >
spec click run button, and response causes an error 1`] = ` >
spec click run button, and response is not ok 1`] = ` >
spec click run button, and response is ok 1`] = ` >
spec click run button, and response is ok 1`] = ` class="euiTreeView__nodeLabel" >
- 2 + +
+ 2 +
+
@@ -2015,7 +2027,15 @@ exports[`
spec click run button, and response is ok 1`] = ` class="euiTreeView__nodeLabel" >
- 2 + +
+ 2 +
+
@@ -2501,6 +2521,7 @@ exports[`
spec click run button, response fills null and missing values >
spec click run button, response fills null and missing values class="euiTreeView__nodeLabel" >
+ +
+
@@ -2645,6 +2673,13 @@ exports[`
spec click run button, response fills null and missing values class="euiTreeView__nodeLabel" >
+ +
+
@@ -3133,6 +3168,7 @@ exports[`
spec click translation button, and response is ok 1`] = ` >
spec renders the component 1`] = ` >
spec renders the component 1`] = ` class="euiTreeView__nodeLabel" >
- .kibana_1 + +
+ .kibana_1 +
+
diff --git a/public/components/Main/main.tsx b/public/components/Main/main.tsx index 046554dc..a8b38326 100644 --- a/public/components/Main/main.tsx +++ b/public/components/Main/main.tsx @@ -14,7 +14,7 @@ import { EuiPageSideBar, EuiPanel, EuiSpacer, - EuiText + EuiText, } from '@elastic/eui'; import { IHttpResponse } from 'angular'; import _ from 'lodash'; @@ -790,6 +790,9 @@ export class Main extends React.Component { } handleDataSelect = (selectedItems: []) => { + if (selectedItems[0].label !== 'OpenSearch' && this.state.language === 'SQL') { + this.updateSQLQueries(''); + } this.setState({ selectedDatasource: selectedItems, }); @@ -912,13 +915,11 @@ export class Main extends React.Component { {this.state.language === 'SQL' && ( - + - + void; @@ -107,7 +106,7 @@ export class PPLPage extends React.Component { spec renders the component 1`] = `