-
Notifications
You must be signed in to change notification settings - Fork 337
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
Implement both the Add and Delete operations as no-ops #847
Conversation
These two operations are called when docker tries to store and delete credentials (docker login and docker logout) respectively. This change makes it so that both of these operations are implemented as nops instead of returning a "not implemented" error. The goal here is to ensure compatibilities with applications and tools that call docker login or docker logout for the user as part of their normal operations.
Co-authored-by: Gavin Inglis <43075615+ginglis13@users.noreply.github.com>
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.
Thanks for working on this. This looks good to me. Few minor comments.
…login With the new capability to opt-out of saving credentials, we can guide users to not to save ecr credentials by setting the AWS_ECR_IGNORE_CREDS_STORAGE environment variable when encountering the `notImplemented` error. Ref: https://docs.aws.amazon.com/cli/latest/reference/ecr/get-login-password.html
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.
LGTM @therealvio, thanks for picking this up for us! (Context, both @therealvio and I work at Culture Amp.)
Hopefully @swagatbora90 is happy with this too and we can improve our CI experience once this is released.
This change fixes an incorrect use of the test's scope. The parent was used for assertions and setting the env. This now should be using the correct instance of the `*testing.T` for the test.
3cb4c16
to
d551297
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.
LGTM. Thanks for the contribution.
Approvals are in, and checks have passed. What do we need to do next to get this merged? |
Done thanks @therealvio for pull this over the line. |
Thanks @austinvazquez, @swagatbora90 and @jamestelfer for your assistance on this 🙇 . I will mention the merge in the original thread for the original onlookers. |
Issue #, if available: #102 & #154
Description of changes:
(Revive of #315)
Currently, both the Add and Delete operations in this helper return a not implemented error. This can lead to issues where docker login and docker logout stop working for the user while displaying a confusing not implemented error.
Following the suggestion in #154 (comment), this PR adds an environment variable (AWS_ECR_IGNORE_CREDS_STORAGE) to optionally ignore these requests and return no error. When AWS_ECR_IGNORE_CREDS_STORAGE=true, instead of returning a not implemented error, we return nil.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.