Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiying-lin committed Dec 17, 2024
1 parent daea2b4 commit 9dc98fe
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pkg/controllers/rollout/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ func handleClusterResourceOverrideSnapshot(o client.Object, q workqueue.RateLimi
// check if it is the latest resource resourceBinding
isLatest, err := strconv.ParseBool(snapshot.GetLabels()[fleetv1beta1.IsLatestSnapshotLabel])
if err != nil {
klog.ErrorS(controller.NewUnexpectedBehaviorError(fmt.Errorf("invalid annotation value %s : %w", fleetv1beta1.IsLatestSnapshotLabel, err)),
klog.ErrorS(controller.NewUnexpectedBehaviorError(fmt.Errorf("invalid label value %s : %w", fleetv1beta1.IsLatestSnapshotLabel, err)),
"Resource clusterResourceOverrideSnapshot has does not have a valid islatest label", "clusterResourceOverrideSnapshot", snapshotKRef)
return
}
Expand Down Expand Up @@ -710,7 +710,7 @@ func handleResourceOverrideSnapshot(o client.Object, q workqueue.RateLimitingInt
// check if it is the latest resource resourceBinding
isLatest, err := strconv.ParseBool(snapshot.GetLabels()[fleetv1beta1.IsLatestSnapshotLabel])
if err != nil {
klog.ErrorS(controller.NewUnexpectedBehaviorError(fmt.Errorf("invalid annotation value %s : %w", fleetv1beta1.IsLatestSnapshotLabel, err)),
klog.ErrorS(controller.NewUnexpectedBehaviorError(fmt.Errorf("invalid label value %s : %w", fleetv1beta1.IsLatestSnapshotLabel, err)),
"Resource resourceOverrideSnapshot has does not have a valid islatest annotation", "resourceOverrideSnapshot", snapshotKRef)
return
}
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/placement_cro_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ var _ = Describe("creating clusterResourceOverride (selecting all clusters) to o
checkIfOverrideAnnotationsOnAllMemberClusters(true, want)
})

It("update cro attached to this CRP only and annotation value", func() {
It("update cro attached to this CRP only and change annotation value", func() {
Eventually(func() error {
cro := &placementv1alpha1.ClusterResourceOverride{}
if err := hubClient.Get(ctx, types.NamespacedName{Name: croName}, cro); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/placement_ro_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ var _ = Describe("creating resourceOverride (selecting all clusters) to override
checkIfOverrideAnnotationsOnAllMemberClusters(false, want)
})

It("update ro attached to this CRP only and annotation value", func() {
It("update ro attached to this CRP only and change annotation value", func() {
Eventually(func() error {
ro := &placementv1alpha1.ResourceOverride{}
if err := hubClient.Get(ctx, types.NamespacedName{Name: roName, Namespace: roNamespace}, ro); err != nil {
Expand Down

0 comments on commit 9dc98fe

Please sign in to comment.