-
Notifications
You must be signed in to change notification settings - Fork 1.2k
change: add account number and unit tests for govcloud #713
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
Conversation
return "{}.dkr.ecr.{}.amazonaws.com".format(account_id, region_name) | ||
|
||
domain_name = "c2s.ic.gov" if region_name == "us-iso-east-1" else "amazonaws.com" | ||
return "{}.dkr.ecr.{}.{}".format(account_id, region_name, domain_name) |
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.
nit: use single quotes
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 usually apply the principle to use same quotes as nearby codes. Codes in this file use double quotes. Do you want to me to change all of them?
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.
Changed all of them.
src/sagemaker/fw_registry.py
Outdated
@@ -80,7 +84,8 @@ def registry(region_name, framework=None): | |||
""" | |||
try: | |||
account_id = image_registry_map[region_name][framework] | |||
return "{}.dkr.ecr.{}.amazonaws.com".format(account_id, region_name) | |||
domain_name = "c2s.ic.gov" if region_name == "us-iso-east-1" else "amazonaws.com" | |||
return "{}.dkr.ecr.{}.{}".format(account_id, region_name, domain_name) |
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.
should we maybe refactor this logic somewhere?
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.
Updated. Wrapped in one function in utils.py
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Co-authored-by: Xinlu Tu <[email protected]> Co-authored-by: Xinlu Tu <[email protected]> @xinlutu2 feat: Close feature gaps between Python SageMaker SDK and CreateAutoMLJob API includes ENSEMBLING mode (aws#681) @xinlutu2 feature: add AutoMLStep for SageMaker Pipelines Workflows (aws#693) @xinlutu2 feature: add AutoMLStep integration test (aws#713)
Issue #, if available:
Description of changes:
Add account number for govcloud with unit tests
Merge Checklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.