Skip to content

ssa: Add pre-dry-run field manager takeover - #1276

Draft
dipti-pai wants to merge 1 commit into
fluxcd:mainfrom
dipti-pai:ssa-pre-dryrun-manager-takeover
Draft

ssa: Add pre-dry-run field manager takeover#1276
dipti-pai wants to merge 1 commit into
fluxcd:mainfrom
dipti-pai:ssa-pre-dryrun-manager-takeover

Conversation

@dipti-pai

Copy link
Copy Markdown
Member

Add ApplyCleanupOptions.FieldManagersBeforeDryRun, a separate opt-in list of field managers whose ownership is reclaimed before the server-side dry-run in Apply and ApplyAll.

The existing FieldManagers takeover runs only after a successful dry-run (cleanupMetadata). When a stale or foreign manager co-owns a required field such that the merged object is invalid, the dry-run fails first and the takeover is never reached, leaving the object wedged on every reconcile. Taking over the named managers before the dry-run repairs ownership so the merge is valid.

This is kept separate from FieldManagers because a pre-dry-run takeover mutates managedFields even if the apply later fails, unlike the post-dry-run cleanup. Only managers explicitly identified as problematic should be listed, so the default managers keep their transactional post-dry-run behavior.

Assisted-by: GitHub Copilot/Claude Opus 4.8

Add ApplyCleanupOptions.FieldManagersBeforeDryRun, a separate opt-in
list of field managers whose ownership is reclaimed before the
server-side dry-run in Apply and ApplyAll.

The existing FieldManagers takeover runs only after a successful
dry-run (cleanupMetadata). When a stale or foreign manager co-owns a
required field such that the merged object is invalid, the dry-run
fails first and the takeover is never reached, leaving the object
wedged on every reconcile. Taking over the named managers before the
dry-run repairs ownership so the merge is valid.

This is kept separate from FieldManagers because a pre-dry-run takeover
mutates managedFields even if the apply later fails, unlike the
post-dry-run cleanup. Only managers explicitly identified as
problematic should be listed, so the default managers keep their
transactional post-dry-run behavior.

Signed-off-by: Dipti Pai <diptipai89@outlook.com>
Assisted-by: GitHub Copilot/Claude Opus 4.8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant