-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
Add Amazon Elastic Container Registry (ECR) Hook #28279
Conversation
036f1f4
to
1d85ed2
Compare
1d85ed2
to
8208edd
Compare
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.
Just a nit and a question, otherwise looks good!
- `boto3 ECR client get_authorization_token method <https://boto3.amazonaws.com/v1/documentation/\ | ||
api/latest/reference/services/ecr.html#ECR.Client.get_authorization_token>`_. | ||
""" | ||
registry_ids = registry_ids or None |
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.
Is this just to guard empty string/list as an input? Because you are already defaulting this to None in the method signature.
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.
Yep, just a guard. This attribute will propagated from connection
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.
So value in some cases might be ""
just for avoid this situation.
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.
@o-nikolas @ferruzzi do we have any concern about this part? Or we could merge this changes?
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.
Yeah no concern I was just checking to be sure. You could re-arrange the if statements so that the falsey check happens first so that you wouldn't need this assignment, but the way you have it is also perfectly fine 👍
Co-authored-by: D. Ferruzzi <ferruzzi@amazon.com> Co-authored-by: Niko <onikolas@amazon.com>
da72aec
to
7fb732d
Compare
Co-authored-by: D. Ferruzzi <ferruzzi@amazon.com> Co-authored-by: Niko <onikolas@amazon.com>
Pre-requirements for #26162
Add new Hook into amazon-provider which integrated with ECR.
Hook itself it is just Thin wrapper around boto3 ECR client with single method for:
docker login