fix: skip duplicate Analysis stage in approve & upgrade flow#12
fix: skip duplicate Analysis stage in approve & upgrade flow#12jrangelramos wants to merge 2 commits into
Conversation
|
Thanks for catching this @jrangelramos 🏆 the bug is real and the fix is correct for the However, there's a second unguarded caller of Rather than adding the same guard at every call site, could we move the dedup check into const existingStages = currentApproval.spec?.stages ?? [];
if (existingStages.some((s) => s.type === stageType)) return true; // already approvedThis makes |
b48613f to
c87396b
Compare
|
LGTM 👍 the idempotent guard in the hook looks great, thanks for moving it there @jrangelramos One small nit.... |
c87396b to
190d4b9
Compare
|
just dropped that! thanks |
|
@jhadvig could you PTAL? thanks |
Aligns with the naming decision in OLS-3295. Renames all Proposal types, models, hooks, and file names to AgenticRun throughout the plugin codebase. Updates K8s model definitions, route paths, and i18n strings. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Prevents adding a duplicate Analysis stage entry when one already exists in the AgenticRunApproval spec, avoiding a 409 conflict error. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
190d4b9 to
d62271d
Compare
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: jrangelramos The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/hold |
|
wait for #15 to get merged |
|
@jrangelramos: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Summary
Duplicate value: {"type":"Analysis"}becauseapproveStage('Analysis')was called unconditionallyapproveStage, preventing the duplicate key API errorTest plan
approveStage('Analysis')normallyyarn testpasses (56/56)🤖 Generated with Claude Code