Skip to content

Commit 97a3ba0

Browse files
committed
consistent formatting between the operation message and the resource result
Signed-off-by: Atif Ali <[email protected]>
1 parent 19e1b2e commit 97a3ba0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/sync/sync_context.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1079,8 +1079,9 @@ func (sc *syncContext) applyObject(t *syncTask, dryRun, validate bool) (common.R
10791079
if len(changes) > 0 {
10801080
// Sort the changes to ensure consistent order
10811081
sort.Strings(changes)
1082-
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",
1082+
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",
10831083
strings.Join(changes, "\n"))
1084+
return common.ResultCodeSyncFailed, message
10841085
}
10851086
}
10861087
}

0 commit comments

Comments
 (0)