-
Notifications
You must be signed in to change notification settings - Fork 339
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement both the Add and Delete operations as no-ops (#847)
* Implement both the Add and Delete operations as nops 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. * Fix typo in add's nop log * Use WithField when logging warning * Gate docker creds ignore feature behind env var * Apply suggestions from code review Co-authored-by: Gavin Inglis <[email protected]> * fix: avoid logging username * fix: log warning only when AWS_ECR_IGNORE_CREDS_STORAGE is set * test: use testing-native methods to set and unset env vars * fix: guide users to setting AWS_ECR_IGNORE_CREDS_STORAGE var for ecr-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 * fix: warning should be more explicit on nature of saving creds * test: use the current test scope, not parent 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. --------- Co-authored-by: Boris Bera <[email protected]> Co-authored-by: Boris Bera <[email protected]> Co-authored-by: Gavin Inglis <[email protected]>
- Loading branch information
1 parent
a8d7d3c
commit 5ee6ab2
Showing
3 changed files
with
142 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters