[Discover] fix error handling in query enhancement facet#8743
Merged
ananzh merged 2 commits intoopensearch-project:mainfrom Oct 29, 2024
Merged
[Discover] fix error handling in query enhancement facet#8743ananzh merged 2 commits intoopensearch-project:mainfrom
ananzh merged 2 commits intoopensearch-project:mainfrom
Conversation
Signed-off-by: Joshua Li <joshuali925@gmail.com>
sejli
approved these changes
Oct 29, 2024
kavilla
approved these changes
Oct 29, 2024
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8743 +/- ##
=======================================
Coverage 60.75% 60.75%
=======================================
Files 3798 3798
Lines 90682 90683 +1
Branches 14271 14271
=======================================
+ Hits 55092 55094 +2
+ Misses 32093 32092 -1
Partials 3497 3497
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
opensearch-trigger-bot bot
pushed a commit
that referenced
this pull request
Oct 29, 2024
* [Discover] fix error handling in query enhancement facet --------- Signed-off-by: Joshua Li <joshuali925@gmail.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> (cherry picked from commit 2f31914) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Qxisylolo
pushed a commit
to Qxisylolo/OpenSearch-Dashboards
that referenced
this pull request
Oct 30, 2024
…project#8743) * [Discover] fix error handling in query enhancement facet --------- Signed-off-by: Joshua Li <joshuali925@gmail.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
AMoo-Miki
pushed a commit
that referenced
this pull request
Oct 30, 2024
* [Discover] fix error handling in query enhancement facet --------- (cherry picked from commit 2f31914) Signed-off-by: Joshua Li <joshuali925@gmail.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>
This was referenced Oct 30, 2024
amsiglan
pushed a commit
to amsiglan/OpenSearch-Dashboards
that referenced
this pull request
Nov 1, 2024
…project#8743) * [Discover] fix error handling in query enhancement facet --------- Signed-off-by: Joshua Li <joshuali925@gmail.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
7 tasks
ruchidh
pushed a commit
to ruchidh/OpenSearch-Dashboards
that referenced
this pull request
Jul 18, 2025
…project#8743) (opensearch-project#8748) * [Discover] fix error handling in query enhancement facet --------- (cherry picked from commit 2f31914) Signed-off-by: Joshua Li <joshuali925@gmail.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> Signed-off-by: Ruchi Sharma <ruchi492@gmail.com>
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 query enhancements facet, the fetch errors are caught and returned as
OpenSearch-Dashboards/src/plugins/query_enhancements/server/utils/facet.ts
Lines 90 to 96 in c66b698
OpenSearch-Dashboards/src/plugins/query_enhancements/server/utils/facet.ts
Lines 64 to 70 in c66b698
But
describeQueryis not checking if success is true, and will process the Error object asIPPLEventsDataSourceorIPPLVisualizationDataSource, causing internal server error.OpenSearch-Dashboards/src/plugins/query_enhancements/server/utils/facet.ts
Lines 107 to 108 in c66b698
@kavilla @mengweieric @ps48 let me know if this is not a good fix
Issues Resolved
Screenshot
Testing the changes
Changelog
Check List
yarn test:jestyarn test:jest_integration