Skip to content

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

Merged
merged 2 commits into from
Mar 21, 2019

Conversation

yangaws
Copy link
Contributor

@yangaws yangaws commented Mar 20, 2019

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.

  • I have read the CONTRIBUTING doc
  • I used the commit message format described in CONTRIBUTING
  • I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • I have updated any necessary documentation (if appropriate)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@yangaws yangaws requested a review from laurenyu March 20, 2019 23:39
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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: use single quotes

Copy link
Contributor Author

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed all of them.

@@ -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)
Copy link
Contributor

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?

Copy link
Contributor Author

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

@yangaws yangaws requested a review from ChoiByungWook March 21, 2019 00:33
@jesterhazy
Copy link
Contributor

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@jesterhazy
Copy link
Contributor

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@yangaws yangaws merged commit 42d5908 into aws:master Mar 21, 2019
@yangaws yangaws mentioned this pull request Mar 22, 2019
4 tasks
mizanfiu pushed a commit to mizanfiu/sagemaker-python-sdk that referenced this pull request Dec 13, 2022
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants