Skip to content

Commit

Permalink
%s update
Browse files Browse the repository at this point in the history
Signed-off-by: Feny Mehta <[email protected]>
  • Loading branch information
fbm3307 committed Jan 8, 2025
1 parent 0f27374 commit 3b7b998
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions controllers/nstemplateset/space_roles.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,15 @@ func (r *spaceRolesManager) ensure(ctx context.Context, nsTmplSet *toolchainv1al
sr, err := json.Marshal(nsTmplSet.Spec.SpaceRoles)
if err != nil {
return false, r.wrapErrorWithStatusUpdate(lctx, nsTmplSet, r.setStatusProvisionFailed, err,
"failed to marshal space roles to update '%v' annotation on namespace", toolchainv1alpha1.LastAppliedSpaceRolesAnnotationKey)
"failed to marshal space roles to update '%s' annotation on namespace", toolchainv1alpha1.LastAppliedSpaceRolesAnnotationKey)

Check warning on line 81 in controllers/nstemplateset/space_roles.go

View check run for this annotation

Codecov / codecov/patch

controllers/nstemplateset/space_roles.go#L81

Added line #L81 was not covered by tests
}
if ns.Annotations == nil {
ns.Annotations = map[string]string{}
}
ns.Annotations[toolchainv1alpha1.LastAppliedSpaceRolesAnnotationKey] = string(sr)
if err := r.Client.Update(ctx, &ns); err != nil {
return false, r.wrapErrorWithStatusUpdate(lctx, nsTmplSet, r.setStatusProvisionFailed, err,
"failed to update namespace with '%q' annotation", toolchainv1alpha1.LastAppliedSpaceRolesAnnotationKey)
"failed to update namespace with '%s' annotation", toolchainv1alpha1.LastAppliedSpaceRolesAnnotationKey)

Check warning on line 89 in controllers/nstemplateset/space_roles.go

View check run for this annotation

Codecov / codecov/patch

controllers/nstemplateset/space_roles.go#L89

Added line #L89 was not covered by tests
}
logger.Info("updated annotation on namespace", toolchainv1alpha1.LastAppliedSpaceRolesAnnotationKey, string(sr))
return true, nil
Expand Down

0 comments on commit 3b7b998

Please sign in to comment.