-
Notifications
You must be signed in to change notification settings - Fork 918
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
[MD] Display error toast for create index pattern with data source #2506
[MD] Display error toast for create index pattern with data source #2506
Conversation
Signed-off-by: Su <[email protected]>
Signed-off-by: Su <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #2506 +/- ##
=======================================
Coverage 66.78% 66.78%
=======================================
Files 3201 3201
Lines 60913 60915 +2
Branches 9254 9255 +1
=======================================
+ Hits 40681 40683 +2
Misses 18019 18019
Partials 2213 2213
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
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
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.
Approved with comments: Do we need UX input for the error message?
@@ -199,7 +199,14 @@ export async function getIndices({ | |||
pattern, | |||
showAllIndices, | |||
dataSourceId, | |||
}).catch(() => []); | |||
}).catch((error) => { | |||
// swallow the errors to be backwards compatible with non-data-source use case |
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.
there is also line 103 could use the same :P
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.
line 103 maps to getIndicesViaSearch
which is specifically for CCS use case as a step 2 request. But for CCS it also requires step 1 querying against local cluster. Even we added the same logic to step 2, the code won't be able to reach there, because the error will be thrown at step 1 already. Let's leave as it is.
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.
My point was the call through search client in getIndicesViaSearch itself could also have error. And it's a different route from the resolve api. But it's not blocking this PR though.
…2506) * add error toast for create index pattern with data source Signed-off-by: Su <[email protected]> * update change log Signed-off-by: Su <[email protected]> Signed-off-by: Su <[email protected]> (cherry picked from commit 0e742b9)
…2506) (#2526) * add error toast for create index pattern with data source * update change log Signed-off-by: Su <[email protected]> (cherry picked from commit 0e742b9)
…pensearch-project#2506) (opensearch-project#2526) * add error toast for create index pattern with data source * update change log Signed-off-by: Su <[email protected]> (cherry picked from commit 0e742b9)
…pensearch-project#2506) * add error toast for create index pattern with data source Signed-off-by: Su <[email protected]> * update change log Signed-off-by: Su <[email protected]> Signed-off-by: Su <[email protected]> Signed-off-by: Sergey V. Osipov <[email protected]>
Signed-off-by: Su [email protected]
Description
Display error toast for create index pattern with data source.
Make use of the existing toast component instead of swallowing error, we generate the pop-up for data source use case in index pattern
Issues Resolved
#2285
Check List
yarn test:jest
yarn test:jest_integration
yarn test:ftr