-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Fix issue where one bad credential helper causes no credentials to be returned #3996
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -300,7 +300,8 @@ func (configFile *ConfigFile) GetAllCredentials() (map[string]types.AuthConfig, | |||
| for registryHostname := range configFile.CredentialHelpers { | ||||
| newAuth, err := configFile.GetAuthConfig(registryHostname) | ||||
| if err != nil { | ||||
| return nil, err | ||||
| logrus.WithError(err).Warnf("Failed to get credentials for registry: %s", registryHostname) | ||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Was looking at this again, and while we should look at using the logger more, we should probably look at the output for it. Currently, the output looks like; Still readable, but perhaps not as "friendly". I see elsewhere we just print our own, e.g.; Line 144 in 3ae101f
Which may look like; Only issue is that this location of the code currently doesn't have a reference to the CLI's stdout or stderr, so if we change it, we probably need to hardcode it to
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ideas / suggestions (perhaps someone else has thoughts) welcome. Don't think it's necessarily a blocker, if there's no better solution (for now)
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's a good point! In general I think having the more standardized logging is good (vs just calling
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, there's a lot to look into in this area;
So yes, this needs work (perhaps I should create a tracking ticket somewhere); e.g.
|
||||
| continue | ||||
| } | ||||
| auths[registryHostname] = newAuth | ||||
| } | ||||
|
|
||||
Uh oh!
There was an error while loading. Please reload this page.