[BUG] fix default data source bug#6908
Merged
BionIT merged 3 commits intoopensearch-project:mainfrom Jun 5, 2024
Merged
Conversation
Signed-off-by: Lu Yu <nluyu@amazon.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6908 +/- ##
=======================================
Coverage 67.39% 67.40%
=======================================
Files 3444 3444
Lines 67847 67847
Branches 11035 11035
=======================================
+ Hits 45727 45733 +6
+ Misses 19452 19448 -4
+ Partials 2668 2666 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
ZilongX
approved these changes
Jun 4, 2024
zhyuanqi
approved these changes
Jun 4, 2024
Collaborator
|
Hi Lu. Thanks for fixing the issue. For cases that a default data source is accidentally removed from UI, you mean that customer delete the datasource? |
opensearch-trigger-bot bot
pushed a commit
that referenced
this pull request
Jun 5, 2024
* fix default data source bug Signed-off-by: Lu Yu <nluyu@amazon.com> * Changeset file for PR #6908 created/updated --------- Signed-off-by: Lu Yu <nluyu@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> (cherry picked from commit b2ff7de) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
BionIT
pushed a commit
that referenced
this pull request
Jun 5, 2024
* fix default data source bug * Changeset file for PR #6908 created/updated --------- (cherry picked from commit b2ff7de) Signed-off-by: Lu Yu <nluyu@amazon.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
45 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
In https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6237/files, we introduced default data source, and expect that if default data source is not set, the get call to uisettings would return null, which is not always the case. See in the recordings that for cases that a default data source is accidentally removed from UI, the data source id is empty string from
api/opensearch-dashboards/settingsAPI call. Thus instead of checking if the returned value is exactly null, we need to check if it is not blank/empty.Issues Resolved
fixes #6835
Screenshot
fixdefault.mp4
Testing the changes
In the recording, the following steps were performed:
before change:
after change:
Changelog
Check List
yarn test:jestyarn test:jest_integration