feat: pass context when fetching digests

This commit is contained in:
nils måsén 2022-12-06 20:47:08 +01:00
parent b71eb2dec7
commit 9220b51665
5 changed files with 40 additions and 33 deletions

View file

@ -335,7 +335,7 @@ func (client dockerClient) PullImage(ctx context.Context, container Container) e
log.WithFields(fields).Debugf("Checking if pull is needed")
if match, err := digest.CompareDigest(container, opts.RegistryAuth); err != nil {
if match, err := digest.CompareDigest(ctx, container, opts.RegistryAuth); err != nil {
headLevel := log.DebugLevel
if client.WarnOnHeadPullFailed(container) {
headLevel = log.WarnLevel