Skip to content
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

Support China regions #10

Closed
zxkane opened this issue Apr 24, 2020 · 6 comments
Closed

Support China regions #10

zxkane opened this issue Apr 24, 2020 · 6 comments

Comments

@zxkane
Copy link

zxkane commented Apr 24, 2020

AWS CodeCommit is GA in AWS China now. Pls support china regions(cn-north-1 and cn-northwest-1).

See below error when pushing code to AWS CodeCommit in cn-northwest-1.

git remote add codecommit codecommit::cn-northwest-1://CodecommitDevopsModelStack-MyApp1

git push codecommit master:init
The following AWS Region is not available for use with AWS CodeCommit: cn-northwest-1. For more information about CodeCommit's availability in AWS Regions, see the AWS CodeCommit User Guide. If an AWS Region is listed as supported but you receive this error, try updating your version of the AWS CLI or the AWS SDKs.

AWS cli already is latest version,

aws --version
aws-cli/2.0.9 Python/3.8.2 Darwin/18.7.0 botocore/2.0.0dev13
@zxkane
Copy link
Author

zxkane commented Apr 24, 2020

It should be caused by boto/botocore#2026.

@zxkane
Copy link
Author

zxkane commented Apr 26, 2020

How about making the checking of available region as a warning? Currently the CodeBuild is blocked by this to pull source from CodeCommit. Looks like it has a lag(several days) to sync the new services availability to the botocore's static config.

Looks like it will always occur when CodeCommit is expanded to new regions.

@liangruibupt
Copy link

liangruibupt commented Apr 26, 2020

Here is workaround:

edit the file 
<YOUR_CURRENT_PYTHON_DIR>/site-packages/git_remote_codecommit/__init__.py

locate the line:
     available_regions = [region for partition in session.get_available_partitions() for region in session.get_available_regions('codecommit', partition)]
(Added in >>>) available_regions.append("cn-north-1")
(Added in >>>) available_regions.append("cn-northwest-1")
git clone codecommit::cn-northwest-1://cn-north-1@MyDemoRepo
Cloning into 'MyDemoRepo'...
remote: Counting objects: 20, done.
Unpacking objects: 100% (20/20), done.

@tuxinaut
Copy link

tuxinaut commented Nov 9, 2020

We setup the helper last Friday in cn-north-1 and it worked out of the box, so it should work as well flawlessly for cn-northwest-1 .

@zxkane
Copy link
Author

zxkane commented Nov 9, 2020

It had been resolved by latest botocore.

@zxkane zxkane closed this as completed Nov 9, 2020
@tuxinaut
Copy link

👍

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

No branches or pull requests

3 participants