Skip to content

Commit

Permalink
Fix auto-update digest comparison
Browse files Browse the repository at this point in the history
Since images can have multiple digests, it is better
to compare the image ID as that will definitely change
on an update and each image can only have one ID.

Signed-off-by: Urvashi Mohnani <[email protected]>
  • Loading branch information
umohnani8 committed Jan 25, 2024
1 parent 90867d9 commit 848078c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/autoupdate/autoupdate.go
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ func (t *task) localUpdateAvailable() (bool, error) {
if err != nil {
return false, err
}
return localImg.Digest().String() != t.image.Digest().String(), nil
return localImg.ID() != t.image.ID(), nil
}

// rollbackImage rolls back the task's image to the previous version before the update.
Expand Down

0 comments on commit 848078c

Please sign in to comment.