From 97a3ba0f2e1ebefb8df5906fe09b5867db3bf14e Mon Sep 17 00:00:00 2001 From: Atif Ali Date: Fri, 13 Dec 2024 20:01:10 -0500 Subject: [PATCH] consistent formatting between the operation message and the resource result Signed-off-by: Atif Ali --- pkg/sync/sync_context.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/sync/sync_context.go b/pkg/sync/sync_context.go index bcc13f49c..fea5c684f 100644 --- a/pkg/sync/sync_context.go +++ b/pkg/sync/sync_context.go @@ -1079,8 +1079,9 @@ func (sc *syncContext) applyObject(t *syncTask, dryRun, validate bool) (common.R if len(changes) > 0 { // Sort the changes to ensure consistent order sort.Strings(changes) - return common.ResultCodeSyncFailed, fmt.Sprintf("attempting to change immutable fields:\n%s\n\nForbidden: updates to statefulset spec for fields other than 'replicas', 'ordinals', 'template', 'updateStrategy', 'persistentVolumeClaimRetentionPolicy' and 'minReadySeconds' are forbidden", + message := fmt.Sprintf("one or more objects failed to apply, reason: attempting to change immutable fields:\n%s\n\nForbidden: updates to statefulset spec for fields other than 'replicas', 'ordinals', 'template', 'updateStrategy', 'persistentVolumeClaimRetentionPolicy' and 'minReadySeconds' are forbidden", strings.Join(changes, "\n")) + return common.ResultCodeSyncFailed, message } } }