-
Notifications
You must be signed in to change notification settings - Fork 919
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] fix default data source bug #6908
Conversation
Signed-off-by: Lu Yu <nluyu@amazon.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
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. |
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? |
* 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>
* 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>
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/settings
API 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:jest
yarn test:jest_integration