Skip to content

Commit ce5d42f

Browse files
authored
Merge pull request #5351 from mikebrow/resolver-debug-improvement
adds some debug log for each failed host
2 parents c02081f + d21fe46 commit ce5d42f

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

remotes/docker/resolver.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,12 +286,14 @@ func (r *dockerResolver) Resolve(ctx context.Context, ref string) (string, ocisp
286286
if lastErr == nil {
287287
lastErr = err
288288
}
289+
log.G(ctx).WithError(err).Info("trying next host")
289290
continue // try another host
290291
}
291292
resp.Body.Close() // don't care about body contents.
292293

293294
if resp.StatusCode > 299 {
294295
if resp.StatusCode == http.StatusNotFound {
296+
log.G(ctx).Info("trying next host - response was http.StatusNotFound")
295297
continue
296298
}
297299
return "", ocispec.Descriptor{}, errors.Errorf("unexpected status code %v: %v", u, resp.Status)

0 commit comments

Comments
 (0)