From 5167584d31285efb780c16421d3959508659cff0 Mon Sep 17 00:00:00 2001 From: Nir Soffer Date: Tue, 28 Jan 2025 00:20:54 +0200 Subject: [PATCH] volrep: Fix archived annotation formatting We converted int64 to int, possibly truncating the value, and then converted it to string and format the string into the result string. Fixed by formatting int64 into the result string. Signed-off-by: Nir Soffer --- internal/controller/vrg_volrep.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/controller/vrg_volrep.go b/internal/controller/vrg_volrep.go index 5444a740e9..59f9f86b04 100644 --- a/internal/controller/vrg_volrep.go +++ b/internal/controller/vrg_volrep.go @@ -7,7 +7,6 @@ import ( "errors" "fmt" "reflect" - "strconv" "strings" "github.com/aws/aws-sdk-go/aws/awserr" @@ -572,7 +571,7 @@ func undoPVRetention(pv *corev1.PersistentVolume) { } func (v *VRGInstance) generateArchiveAnnotation(gen int64) string { - return fmt.Sprintf("%s-%s", pvcVRAnnotationArchivedVersionV1, strconv.Itoa(int(gen))) + return fmt.Sprintf("%s-%d", pvcVRAnnotationArchivedVersionV1, gen) } func (v *VRGInstance) isArchivedAlready(pvc *corev1.PersistentVolumeClaim, log logr.Logger) bool {