Skip to content

Commit

Permalink
Improve digest retrivial logs
Browse files Browse the repository at this point in the history
Signed-off-by: Paolo Di Tommaso <[email protected]>
  • Loading branch information
pditommaso committed Jun 10, 2024
1 parent a26f5df commit 5976967
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,13 @@ class RegistryProxyService {
final route = RoutePath.v2manifestPath(coords)
final proxyClient = client(route)
final resp = proxyClient.head(route.path, WaveDefault.ACCEPT_HEADERS)
return resp.statusCode() == 200
final result = resp.statusCode() == 200
? resp.headers().firstValue('docker-content-digest').orElse(null)
: null
if( !result ) {
log.warn "Unable to retrieve digest for image '$image' -- response status=${resp.statusCode()}; headers:\n${RegHelper.dumpHeaders(resp.headers())}"
}
return result
}

@ToString(includeNames = true, includePackage = false)
Expand Down

0 comments on commit 5976967

Please sign in to comment.