Skip to content

Commit

Permalink
Merge branch 'main' into add-ftr-for-docker
Browse files Browse the repository at this point in the history
  • Loading branch information
abbyhu2000 authored Apr 5, 2023
2 parents 2ef681f + 6b42669 commit e5db2f8
Show file tree
Hide file tree
Showing 116 changed files with 1,950 additions and 983 deletions.
14 changes: 9 additions & 5 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
### Description
[Describe what this change achieves]


<!-- Describe what this change achieves-->

### Issues Resolved
[List any issues this PR will resolve]


<!-- List any issues this PR will resolve. -->
<!-- Example: closes #1234 -->

### Check List

- [ ] All tests pass
- [ ] `yarn test:jest`
- [ ] `yarn test:jest_integration`
- [ ] `yarn test:ftr`
- [ ] New functionality includes testing.
- [ ] New functionality has been documented.
- [ ] Update [CHANGELOG.md](./../CHANGELOG.md)
- [ ] Commits are signed per the DCO using --signoff
- [ ] Commits are signed per the DCO using --signoff
21 changes: 21 additions & 0 deletions .github/workflows/github-workflow-badger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: github-merit-badger
on:
pull_request_target:
types:
- opened

jobs:
call-action:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: aws-github-ops/[email protected]
id: merit-badger
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
badges: '[first-time-contributor,repeat-contributor,valued-contributor,seasoned-contributor,all-star-contributor,distinguished-contributor]'
thresholds: '[0,3,6,13,25,50]'
badge-type: 'achievement'
ignore-usernames: '[opensearch-ci-bot, dependabot, opensearch-trigger-bot]'
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
.node_binaries
.native_modules
node_modules
opensearch-dashboards-docker-dev/
!/src/dev/npm/integration_tests/__fixtures__/fixture1/node_modules
!/src/dev/notice/__fixtures__/node_modules
trash
Expand Down
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- [I18n] Register ru, ru-RU locale ([#2817](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2817))
- Add yarn opensearch arg to setup plugin dependencies ([#2544](https://github.com/opensearch-project/OpenSearch-Dashboards/issues/2544))
- [Multi DataSource] Test the connection to an external data source when creating or updating ([#2973](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2973))
- Add Dashboards-list integrations for Plugins ([#3090](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3090) )
- [Table Visualization] Refactor table visualization using React and DataGrid component ([#2863](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2863))
- [Vis Builder] Add redux store persistence ([#3088](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3088))
- [Multi DataSource] Improve test connection ([#3110](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3110))
Expand All @@ -69,6 +70,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- [Vis Builder] Add metric to metric, bucket to bucket aggregation persistence ([#3495](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3495))
- Use mirrors to download Node.js binaries to escape sporadic 404 errors ([#3619](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3619))
- [Multiple DataSource] Refactor dev tool console to use opensearch-js client to send requests ([#3544](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3544))
- [Data] Add geo shape filter field ([#3605](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3605))

### 🐛 Bug Fixes

Expand All @@ -93,6 +95,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Temporary workaround for task-kill exceptions on Windows when it is passed a pid for a process that is already dead ([#2842](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2842))
- [Vis Builder] Fix empty workspace animation does not work in firefox ([#2853](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2853))
- Bumped `del` version to fix MacOS race condition ([#2847](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2873))
- [Chore] Update deprecated url methods (url.parse(), url.format()) ([#1561](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1561))
- [Build] Fixed "Last Access Time" not being set by `scanCopy` on Windows ([#2964](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2964))
- [Vis Builder] Add global data persistence for vis builder #2896 ([#2896](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2896))
- Update `leaflet-vega` and fix its usage ([#3005](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3005))
Expand All @@ -107,6 +110,8 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- [Region Maps] Add ui setting to configure custom vector map's size parameter([#3399](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3399))
- [Search Telemetry] Fixes search telemetry's observable object that won't be GC-ed([#3390](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3390))
- Clean up and rebuild `@osd/pm` ([#3570](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3570))
- [Vega] Add Filter custom label for opensearchDashboardsAddFilter ([#3640](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3640))
- [Timeline] Fix y-axis label color in dark mode ([#3698](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3698))

### 🚞 Infrastructure

Expand All @@ -120,6 +125,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Fix detection of Chrome's version on Darwin during CI ([#3296](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3296))
- Upgrade yarn version to be compatible with @openearch-project/opensearch ([#3443](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3443))
- [CI] Reduce redundancy by using matrix strategy on Windows and Linux workflows ([#3514](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3514))
- Add an achievement badger to the PR ([#3721](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3721))

### 📝 Documentation

Expand All @@ -142,6 +148,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
### 🛠 Maintenance

- Adding @zhongnansu as maintainer. ([#2590](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2590))
- [Timeline] Update default expressions from `.es(*)` to `.opensearch(*)`. ([2720](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2720))
- Removes `minimatch` manual resolution ([#3019](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3019))
- Remove `github-checks-reporter`, an unused dependency ([#3126](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3126))
- Upgrade `vega-lite` dependency to ^5.6.0 ([#3076](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3076))
Expand All @@ -152,13 +159,15 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Bump the version of Node.js installed by `nvm` to `14.21.3` ([3463](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3463))
- Remove the unused `renovate.json5` file ([3489](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3489))
- Allow selecting the Node.js binary using `NODE_HOME` and `OSD_NODE_HOME` ([3508](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3508))
- Bump `styled-components` from 5.3.5 to 5.3.9 ([#3678](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3678))

### 🪛 Refactoring

- [MD] Refactor data source error handling ([#2661](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2661))
- Refactor and improve Discover field summaries ([#2391](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2391))
- [Vis Builder] Removed Hard Coded Strings and Used i18n to transalte([#2867](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2867))
- [Console] Replace jQuery.ajax with core.http when calling OSD APIs in console ([#3080]https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3080))
- [Console] Replace jQuery.ajax with core.http when calling OSD APIs in console ([#3080](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3080))
- [I18n] Fix Listr type errors and error handlers ([#3629](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3629))

### 🔩 Tests

Expand Down
45 changes: 24 additions & 21 deletions cypress/integration/with-security/check_timeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,87 +44,90 @@ describe('check timeline visualization', () => {
.find('[data-test-subj="newItemButton"]')
.click();
cy.get('[data-test-subj="visType-timelion"]').click();
// Because monaco editor doesn't use a contenteditable, input, or textarea, .clear() or .type('{selectall}') won't work. To clear, we just backspace for each character instead.
cy.get('[class="view-line"]')
.invoke('text')
.then((expressionText) => {
cy.get('[class="view-line"]').type('{backspace}'.repeat(expressionText.length));
});
});

it('.es(*, kibana1=true) should report search error', () => {
cy.get('[class="view-line"]').type('{selectall}{backspace}, kibana1=true)');
cy.get('[class="view-line"]').type('.es(*, kibana1=true)');
cy.get('[data-test-subj="visualizeEditorRenderButton"]').click();
cy.waitForLoader();
cy.get('[data-test-subj="globalToastList"]')
.find('[data-test-subj="errorToastMessage"]')
.contains('Timeline request error: undefined Error: Unknown argument to es: kibana1');
});

it('.es(*, kibana=true) should not report search error', () => {
cy.get('[class="view-line"]').type('{selectall}{backspace}, kibana=true)');
cy.get('[class="view-line"]').type('.es(*, kibana=true)');
cy.get('[data-test-subj="visualizeEditorRenderButton"]').click();
cy.waitForLoader();
cy.get('[data-test-subj="globalToastList"]')
.find('[data-test-subj="errorToastMessage"]')
.should('not.exist');
});

it('.es(*, opensearchDashboards=true) should not report search error', () => {
cy.get('[class="view-line"]').type('{selectall}{backspace}, opensearchDashboards=true)');
cy.get('[class="view-line"]').type('.es(*, opensearchDashboards=true)');
cy.get('[data-test-subj="visualizeEditorRenderButton"]').click();
cy.waitForLoader();
cy.get('[data-test-subj="globalToastList"]')
.find('[data-test-subj="errorToastMessage"]')
.should('not.exist');
});

it('.elasticsearch(*, kibana1=true) should report search error', () => {
cy.get('[class="view-line"]').type(
'{selectall}{backspace}{backspace}{backspace}{backspace}{backspace}elasticsearch(*, kibana1=true)'
);
cy.get('[class="view-line"]').type('.elasticsearch(*, kibana1=true)');
cy.get('[data-test-subj="visualizeEditorRenderButton"]').click();
cy.waitForLoader();
cy.get('[data-test-subj="globalToastList"]')
.find('[data-test-subj="errorToastMessage"]')
.contains('Timeline request error: undefined Error: Unknown argument to es: kibana1');
});

it('.elasticsearch(*, kibana=true) should not report search error', () => {
cy.get('[class="view-line"]').type(
'{selectall}{backspace}{backspace}{backspace}{backspace}{backspace}elasticsearch(*, kibana=true)'
);
cy.get('[class="view-line"]').type('.elasticsearch(*, kibana=true)');
cy.get('[data-test-subj="visualizeEditorRenderButton"]').click();
cy.waitForLoader();
cy.get('[data-test-subj="globalToastList"]')
.find('[data-test-subj="errorToastMessage"]')
.should('not.exist');
});

it('.elasticsearch(*, opensearchDashboards=true) should not report search error', () => {
cy.get('[class="view-line"]').type(
'{selectall}{backspace}{backspace}{backspace}{backspace}{backspace}elasticsearch(*, opensearchDashboards=true)'
);
cy.get('[class="view-line"]').type('.elasticsearch(*, opensearchDashboards=true)');
cy.get('[data-test-subj="visualizeEditorRenderButton"]').click();
cy.waitForLoader();
cy.get('[data-test-subj="globalToastList"]')
.find('[data-test-subj="errorToastMessage"]')
.should('not.exist');
});

it('.opensearch(*, kibana1=true) should report search error', () => {
cy.get('[class="view-line"]').type(
'{selectall}{backspace}{backspace}{backspace}{backspace}{backspace}opensearch(*, kibana1=true)'
);
cy.get('[class="view-line"]').type('.opensearch(*, kibana1=true)');
cy.get('[data-test-subj="visualizeEditorRenderButton"]').click();
cy.waitForLoader();
cy.get('[data-test-subj="globalToastList"]')
.find('[data-test-subj="errorToastMessage"]')
.contains('Timeline request error: undefined Error: Unknown argument to es: kibana1');
});

it('.opensearch(*, kibana=true) should not report search error', () => {
cy.get('[class="view-line"]').type(
'{selectall}{backspace}{backspace}{backspace}{backspace}{backspace}opensearch(*, kibana=true)'
);
cy.get('[class="view-line"]').type('.opensearch(*, kibana=true)');
cy.get('[data-test-subj="visualizeEditorRenderButton"]').click();
cy.waitForLoader();
cy.get('[data-test-subj="globalToastList"]')
.find('[data-test-subj="errorToastMessage"]')
.should('not.exist');
});

it('.opensearch(*, opensearchDashboards=true) should not report search error', () => {
cy.get('[class="view-line"]').type(
'{selectall}{backspace}{backspace}{backspace}{backspace}{backspace}opensearch(*, opensearchDashboards=true)'
);
cy.get('[class="view-line"]').type('.opensearch(*, opensearchDashboards=true)');
cy.get('[data-test-subj="visualizeEditorRenderButton"]').click();
cy.waitForLoader();
cy.get('[data-test-subj="globalToastList"]')
.find('[data-test-subj="errorToastMessage"]')
.should('not.exist');
Expand Down
8 changes: 8 additions & 0 deletions cypress/integration/with-security/helpers/generate_data.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,14 @@ describe('Generating BWC test data with security', () => {
.find('[data-test-subj="newItemButton"]')
.click();
cy.get('[data-test-subj="visType-timelion"]').click();
// Because monaco editor doesn't use a contenteditable, input, or textarea, .clear() or .type('{selectall}') won't work. To clear, we just backspace for each character instead.
cy.get('[class="view-line"]')
.invoke('text')
.then((expressionText) => {
cy.get('[class="view-line"]').type('{backspace}'.repeat(expressionText.length));
});
// update default expression to use `.es(*)` instead of `.opensearch(*)` for bwc
cy.get('[class="view-line"]').type('.es(*)');
cy.get('[data-test-subj="visualizeSaveButton"]').click();
cy.get('[data-test-subj="savedObjectTitle"]').type('test-timeline');
cy.get('[data-test-subj="confirmSaveSavedObjectButton"]').click();
Expand Down
Loading

0 comments on commit e5db2f8

Please sign in to comment.