-
Notifications
You must be signed in to change notification settings - Fork 158
fix the tutorial in AIConnectorHelper when fetching domain_url #3852
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
base: main
Are you sure you want to change the base?
Conversation
" domain_arn = domain_info['ARN']\n", | ||
"\n", | ||
" # Check if domain has VPC endpoints\n", | ||
" if 'Endpoints' in domain_info:\n", |
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.
I used this logic to check for VPC endpoint in the connector CLI. Maybe you can try this out since this is simpler? (ref)
domain_url = (
domain_info.get("Endpoint") or domain_info["Endpoints"]["vpc"]
)
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.
If Endpoints or vpc does not exist, it would throw KeyError if key doesn't exist so you need to run this tutorial from begin.
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.
I see, that makes sense.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3852 +/- ##
=========================================
Coverage 78.01% 78.02%
- Complexity 7336 7337 +1
=========================================
Files 656 656
Lines 33074 33074
Branches 3708 3708
=========================================
+ Hits 25804 25805 +1
Misses 5683 5683
+ Partials 1587 1586 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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
Signed-off-by: Xun Zhang <xunzh@amazon.com>
Thanks for the fix. Can you also fix this https://github.com/opensearch-project/ml-commons/blob/main/docs/tutorials/aws/DeepSeek_demo_notebook_for_RAG.ipynb |
Signed-off-by: Xun Zhang <xunzh@amazon.com>
Description
This fixes the error when calling describe_elasticsearch_domain to get domain_url for VPC domains. For VPC domains, the returned Endpoints is a Map rather than a String.
https://docs.aws.amazon.com/cli/latest/reference/es/describe-elasticsearch-domain.html
Related Issues
Resolves #[Issue number to be closed when this PR is merged]
Check List
--signoff
.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.