Skip to content

Commit

Permalink
consistent formatting between the operation message and the resource …
Browse files Browse the repository at this point in the history
…result

Signed-off-by: Atif Ali <[email protected]>
  • Loading branch information
aali309 committed Dec 14, 2024
1 parent 19e1b2e commit 97a3ba0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/sync/sync_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}
Expand Down

0 comments on commit 97a3ba0

Please sign in to comment.