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

fix: support amazon-ecr-credential-helper & check for bucket existence before emptying the bucket #2365

Merged
merged 15 commits into from
Jun 2, 2021

Conversation

hariohmprasath
Copy link
Contributor

@hariohmprasath hariohmprasath commented May 21, 2021

Summary

#2323 - Depending on the value of credsStore attribute (inside docker config file), the code either performs the docker login or skips it.
#2070 - Added code to check for the existence of the bucket using s3.HeadBucket API before proceed to empty the contents

Issue number

Fixes #2323 & #2070


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

…helper aws#2323

Depending on the value of `credsStore` attribute (inside docker config file), the code either performs the `docker login` or skips it.
@hariohmprasath hariohmprasath requested a review from a team as a code owner May 21, 2021 07:34
@hariohmprasath hariohmprasath requested a review from xar-tol May 21, 2021 07:34
@efekarakus efekarakus added the do-not-merge Pull requests that mergify shouldn't merge until the requester allows it. label May 21, 2021
Copy link
Contributor

@iamhopaul123 iamhopaul123 left a comment

Choose a reason for hiding this comment

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

Thank you so much for making this change! This is awesome! Just had some nits and a quick question.

@efekarakus efekarakus changed the title fix: Code changes to support amazon-ecr-credential-helper #2323 fix: support amazon-ecr-credential-helper May 21, 2021
Copy link
Contributor

@efekarakus efekarakus left a comment

Choose a reason for hiding this comment

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

Awesome, this is so good thank you so much for fixing this issue 😍 !
Some suggestions for enabling writing unit tests for the new functionality 🙏

@efekarakus efekarakus removed the do-not-merge Pull requests that mergify shouldn't merge until the requester allows it. label May 21, 2021
hariohmprasath and others added 5 commits May 21, 2021 19:10
Based on the documentation available [here](https://github.com/awslabs/amazon-ecr-credential-helper), `ecr-login` can be enabled globally using `credsStore` or on individual registry level. The recent code update considers both of this scenarios before letting it perform `docker login`
Copy link
Contributor

@iamhopaul123 iamhopaul123 left a comment

Choose a reason for hiding this comment

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

Just some nits. Other than that lgtm!

@iamhopaul123 iamhopaul123 removed the request for review from xar-tol May 25, 2021 18:44
@hariohmprasath
Copy link
Contributor Author

Just some nits. Other than that lgtm!

Thanks I have accepted the suggestions, appreciate the support on this.

Added code to check for the existence of the bucket using `s3.HeadBucket` API before proceed to empty the contents
@hariohmprasath hariohmprasath changed the title fix: support amazon-ecr-credential-helper fix: support amazon-ecr-credential-helper & check for bucket existence before emptying the bucket May 29, 2021
@efekarakus efekarakus added the do-not-merge Pull requests that mergify shouldn't merge until the requester allows it. label Jun 2, 2021
Copy link
Contributor

@efekarakus efekarakus left a comment

Choose a reason for hiding this comment

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

Looks great thank you so much! And I'm sorry for the delay on the review 🙇

Just small requests to flip the if-statement to reduce nesting and then the PR should auto-merge once we remove the label.

@efekarakus efekarakus removed the do-not-merge Pull requests that mergify shouldn't merge until the requester allows it. label Jun 2, 2021
@mergify mergify bot merged commit 997a3d0 into aws:mainline Jun 2, 2021
thrau pushed a commit to localstack/copilot-cli-local that referenced this pull request Dec 9, 2022
…e before emptying the bucket (aws#2365)

### Summary

aws#2323 - Depending on the value of `credsStore` attribute (inside docker config file), the code either performs the `docker login` or skips it.
aws#2070 - Added code to check for the existence of the bucket using `s3.HeadBucket` API before proceed to empty the contents

### Issue number
Fixes  aws#2323 & aws#2070

----
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
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.

copilot deploy throws error if ECR credential helper is enabled in Docker config
3 participants