-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Log more details on cache warming errors #898
Conversation
#897 puts the logging behind a However, I'd request that it just omits passwords entirely -- I think it's more important to say where the credentials came from ( |
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.
Code review inline and request for change in the comment above (re omitting passwords).
registry/cache/warming.go
Outdated
@@ -46,8 +46,8 @@ type backlogItem struct { | |||
registry.Credentials | |||
} | |||
|
|||
// Continuously get the images to populate the cache with, and | |||
// populate the cache with them. | |||
// Loop continuously get the images to populate the cache with, |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
registry/cache/warming.go
Outdated
@@ -151,7 +150,7 @@ func (w *Warmer) warm(ctx context.Context, logger log.Logger, id image.Name, cre | |||
tags, err := client.Tags(ctx) | |||
if err != nil { | |||
if !strings.Contains(err.Error(), context.DeadlineExceeded.Error()) && !strings.Contains(err.Error(), "net/http: request canceled") { | |||
logger.Log("err", errors.Wrap(err, "requesting tags")) | |||
logger.Log("err", errors.Wrapf(err, "requesting tags for %v from %v using %v", id.CanonicalName(), creds.Hosts(), creds)) |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
22ec6b3
to
af735f9
Compare
EDIT: Too verbose indeed. |
@@ -123,3 +123,7 @@ func (cs Credentials) Merge(c Credentials) { | |||
cs.m[k] = v | |||
} | |||
} | |||
|
|||
func (cs Credentials) String() string { | |||
return fmt.Sprintf("{%v}", cs.m) |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
8bdaaad
to
0d3df07
Compare
0d3df07
to
4c9633f
Compare
Fixes #895.
With this PR, Flux now logs:
Note that password is completely masked.
Not sure if we still want this PR though, given this comment and #897.