From 2b9c46bb8373bd3741029583d1bebc8bde3d3546 Mon Sep 17 00:00:00 2001 From: justinsb Date: Sun, 28 Jan 2024 16:12:09 -0500 Subject: [PATCH] Fix: support comparison of int types in dry-run This avoids printing a change when the before and after values are the same. --- upup/pkg/fi/dryrun_target.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/upup/pkg/fi/dryrun_target.go b/upup/pkg/fi/dryrun_target.go index 6fe148edbc..e2be535b43 100644 --- a/upup/pkg/fi/dryrun_target.go +++ b/upup/pkg/fi/dryrun_target.go @@ -328,6 +328,9 @@ func buildChangeList[T SubContext](a, e, changes Task[T]) ([]change, error) { case reflect.String: changed = fieldValC.Convert(reflect.TypeOf("")).Interface() != "" + + case reflect.Int: + changed = fieldValA.Int() != fieldValE.Int() } if !changed { continue