Skip to content

Commit

Permalink
volrep: Fix archived annotation formatting
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
nirs authored and BenamarMk committed Feb 13, 2025
1 parent 558f00a commit 33c01d8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions internal/controller/vrg_volrep.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"errors"
"fmt"
"reflect"
"strconv"
"strings"

"github.com/aws/aws-sdk-go/aws/awserr"
Expand Down Expand Up @@ -573,7 +572,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 {
Expand Down

0 comments on commit 33c01d8

Please sign in to comment.