Skip to content

Commit 099f9cb

Browse files
authored
Re-inspect image after pulling outdated update (#584)
After pulling an updated image in pullImage(), re-inspect to get the new image metadata. Previously, the inspect variable retained the old image's SHA, so the log message on the final line reported a stale ID. The 'image doesn't exist locally' code path already re-inspected after pulling — this aligns the 'image exists but is outdated' path to do the same. Fixes #582
1 parent 5520a89 commit 099f9cb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

internal/infra/run.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,10 @@ func pullImage(ctx context.Context, cli *client.Client, imageName string) error
598598
if err != nil {
599599
return fmt.Errorf("image %v is outdated, failed to pull update: %w", imageName, err)
600600
}
601+
inspect, err = cli.ImageInspect(ctx, imageName)
602+
if err != nil {
603+
return fmt.Errorf("failed to inspect image %v after pull: %w", imageName, err)
604+
}
601605
} else {
602606
log.Printf("image %v is already up to date\n", imageName)
603607
}

0 commit comments

Comments
 (0)