From 848078c938bb02589af62785011295b82f640ae7 Mon Sep 17 00:00:00 2001 From: Urvashi Mohnani Date: Thu, 25 Jan 2024 11:09:44 -0500 Subject: [PATCH] Fix auto-update digest comparison 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 --- pkg/autoupdate/autoupdate.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/autoupdate/autoupdate.go b/pkg/autoupdate/autoupdate.go index 7ea86a780c..a408e69d17 100644 --- a/pkg/autoupdate/autoupdate.go +++ b/pkg/autoupdate/autoupdate.go @@ -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.