Skip to content

Add pre-dry-run override manager takeover - #1747

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

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

Conversation

@dipti-pai

Copy link
Copy Markdown
Member

Add the --override-manager-before-dry-run flag, wiring the named field managers into ssa ApplyCleanupOptions.FieldManagersBeforeDryRun so their ownership is reclaimed before the server-side apply dry-run.

The existing --override-manager takeover runs only after a successful dry-run, so it cannot recover an object wedged at dry-run validation by a stale or foreign manager that co-owns a required field (for example, a legacy full-object PUT left behind by a break-glass workflow). The new flag repairs ownership before the dry-run so the merge is valid.

The pre-dry-run list is kept separate from --override-manager because the takeover mutates managedFields before validation; the always-on default managers stay on the post-dry-run cleanup path to preserve their transactional behavior.

Assisted-by: GitHub Copilot/Claude Opus 4.8

Fixes: #1722

Add the --override-manager-before-dry-run flag, wiring the named field
managers into ssa ApplyCleanupOptions.FieldManagersBeforeDryRun so
their ownership is reclaimed before the server-side apply dry-run.

The existing --override-manager takeover runs only after a successful
dry-run, so it cannot recover an object wedged at dry-run validation by
a stale or foreign manager that co-owns a required field (for example,
a legacy full-object PUT left behind by a break-glass workflow). The
new flag repairs ownership before the dry-run so the merge is valid.

The pre-dry-run list is kept separate from --override-manager because
the takeover mutates managedFields before validation; the always-on
default managers stay on the post-dry-run cleanup path to preserve
their transactional 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.

ssa: support taking over field managers before dry-run

1 participant