-
Notifications
You must be signed in to change notification settings - Fork 885
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
Fix Datasource testing connection don't validate endpoints with path #5663
Fix Datasource testing connection don't validate endpoints with path #5663
Conversation
…pensearch-project#5656 Signed-off-by: Xinrui Bai <xinruiba@amazon.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5663 +/- ##
=======================================
Coverage 67.03% 67.03%
=======================================
Files 3295 3296 +1
Lines 63329 63339 +10
Branches 10084 10087 +3
=======================================
+ Hits 42451 42459 +8
- Misses 18429 18430 +1
- Partials 2449 2450 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Signed-off-by: Xinrui Bai <xinruiba@amazon.com>
...ugins/data_source_management/public/components/validation/datasource_form_validation.test.ts
Outdated
Show resolved
Hide resolved
Also I think it would be great if we can run this fix by UX team to see if it is ok from users perspective. |
Thanks for the comment. I'm reaching out to our UX team for more inputs. |
Signed-off-by: Xinrui Bai <xinruiba@amazon.com>
@kgcreative who could help to work with us on this. |
I'm happy to review async here. To that end, i have a few questions before i make a recommendation.
|
...ugins/data_source_management/public/components/validation/datasource_form_validation.test.ts
Outdated
Show resolved
Hide resolved
Thanks, @kgcreative, for the great suggestions. I agree with you.
|
Answer:
Answer:
Answer: Before user clicking the "Test Connection" Button:
After user clicking the "Test Connection" Button:
Is that correct? For this proposal, me and @Flyingliuhub have a discussion and @Flyingliuhub already provide a response. Thanks for the comment. |
I think the green underline is just a focus indicator, so when you tab out of the field it should return to it's unfocused state. |
… status code is 200 Signed-off-by: Xinrui Bai <xinruiba@amazon.com>
src/plugins/data_source/server/routes/data_source_connection_validator.ts
Outdated
Show resolved
Hide resolved
…e body Signed-off-by: Xinrui Bai <xinruiba@amazon.com>
Failed cypress test is not related to this change, so we can ignore. |
…5663) (#5727) * fix Datasource testing connection don't validate endpoints with path #5656 Signed-off-by: Xinrui Bai <xinruiba@amazon.com> (cherry picked from commit b5d39b6) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> # Conflicts: # CHANGELOG.md Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…pensearch-project#5663) * fix Datasource testing connection don't validate endpoints with path opensearch-project#5656 Signed-off-by: Xinrui Bai <xinruiba@amazon.com> Signed-off-by: yujin-emma <yujin.emma.work@gmail.com>
Task List
Description
Test connection should only success when opensearch-client response status code is 200 and
Please check this ticket for more details [BUG] Cluster endpoint test connection passed unexpectly #5707
01/19/2024 Update:
Create an initial fix based on discussion, and more details can be found under this issue: #5707
01/09/2024 Update:
Discussed with team (checkout: #5663 (comment))
We are going to take a further investigation and we put the first proposal under the issue description:
#5656
CC @Flyingliuhub @seraphjiang @bandinib-amzn please feel free to leave comments~ Thanks
Issues Resolved
fixes #5656
Fixes #5702
Screenshot
Before:
Test connection with endpoint: "https://google.com" will pass which is unexpected
After:
Test connection with endpoint: "https://google.com" will be failed to connect with expected response message:
Also verified endpoint with path name will fail test connection:
Validate cluster endpoint still able to pass connection testing:
Testing the changes
Check List
yarn test:jest
yarn test:jest_integration