fix(advance-deploy-env): skip archived items; never let one item strand the push - #91
Merged
Merged
Conversation
…nd the push An archived project item cannot be updated -- the mutation errors, and under `set -e` this aborted the whole step, leaving every PR after it in the push un-advanced (this is how promoted items got stranded below Prod). Now: - query isArchived and skip archived cards before mutating (root cause); - wrap the field update so any unexpected per-item error is logged and flagged but does not abort the loop; the run still fails at the end if any item failed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The reusable
advance-deploy-envworkflow aborted its per-PR loop on the first project item it couldn't update. An archived item makesupdateProjectV2ItemFieldValueerror, and underset -euo pipefailthat failed the whole step — so every PR after the archived one in the same push was left un-advanced. This is the root cause of promoted backend tickets sitting belowProdon the board even though they shipped.Fix
projectItemsquery now selectsisArchived, and archived cards are skipped up front with a::notice::(archived = intentionally out of the deploy flow).update_fieldhelper that logs any other per-item error and flags the run, but never aborts the loop — one bad item can no longer strand the rest. The step still exits non-zero at the end if anything failed, so failures stay visible.Test plan
actionlintclean locally + on CI.continuebefore any mutation; a transient error on item N no longer prevents items N+1… from advancing;RUN_FAILEDsurfaces real failures as a red run.Part of the RFC-BACKEND-0008 board hygiene follow-up.
Note
Low Risk
CI-only kanban automation with clearer skip/error handling; no application auth, data, or deploy paths change.
Overview
Fixes
advance-deploy-envso a single un-updatable kanban card no longer stops every later PR in the same deploy push from advancing (the failure mode that left shipped tickets below Prod when an archived item appeared earlier in the loop).The per-PR GraphQL query now reads
isArchived; archived project items are skipped with a notice before any mutation. Deploy env and Status updates go through anupdate_fieldhelper that logs per-item failures as warnings, sets aRUN_FAILEDflag, and keeps the loop running underset -e. The step still exits non-zero at the end if anything failed, so partial success stays visible.Reviewed by Cursor Bugbot for commit 2be818a. Bugbot is set up for automated code reviews on this repo. Configure here.