Repository navigation
ci(deploy): let a manual deploy target dev or prod alone - #1545
Merged
Merged
Conversation
A resolver candidate (#1518, for #1429) has to be measured on er-dev before it reaches production. Only a merge or a manual dispatch could deploy it, and both ran the dev and prod jobs, so a dev-only release needed a by-hand blue/green outside CI. workflow_dispatch gains an `environment` input (both | dev | prod, default both). Each job skips when the input targets only the other environment. Merges are unchanged: they arrive through `images` and deploy both. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…conditions The skills gate generates the deploy jobs' conditions into the ci-and-supply-chain reference. The dispatch `environment` input changed both, so the committed table was stale. Co-Authored-By: Claude Opus 5.5 <[email protected]>
athvin
force-pushed
the
ci/deploy-environment-input
branch
from
December 3, 2026 00:37
45cf668 to
8d7497a
Compare
This was referenced Dec 3, 2026
Closed
athvin
pushed a commit
that referenced
this pull request
Dec 3, 2026
…history A dev-only release (#1545's `environment: dev`) pushes an er-api image tagged with an unmerged commit. That image was then the newest in ECR, so the next two frontend-only merges reused it for er-api, and the staleness guard correctly refused because rust/** differs. Dev and prod deploys failed for c7e8bc3 (run 47007375189) and f7ed273 (47009130317). When a tree has no image for DEPLOY_SHA, take the newest tagged digest whose tag is an ancestor of DEPLOY_SHA. If none qualifies, fall back to the plain newest with a warning; the staleness guard still decides. Replayed read-only against ECR: DEPLOY_SHA=c7e8bc3c now resolves er-api to c26a1ae's digest and the guard verifies it (exit 0), where the old script refused (exit 1). The candidate 93e43da still resolves its own er-api tag directly. Co-Authored-By: Claude Opus 5.5 <[email protected]>
athvin
added a commit
that referenced
this pull request
Dec 3, 2026
…history (#1552) A dev-only release (#1545's `environment: dev`) pushes an er-api image tagged with an unmerged commit. That image was then the newest in ECR, so the next two frontend-only merges reused it for er-api, and the staleness guard correctly refused because rust/** differs. Dev and prod deploys failed for c7e8bc3 (run 47007375189) and f7ed273 (47009130317). When a tree has no image for DEPLOY_SHA, take the newest tagged digest whose tag is an ancestor of DEPLOY_SHA. If none qualifies, fall back to the plain newest with a warning; the staleness guard still decides. Replayed read-only against ECR: DEPLOY_SHA=c7e8bc3c now resolves er-api to c26a1ae's digest and the guard verifies it (exit 0), where the old script refused (exit 1). The candidate 93e43da still resolves its own er-api tag directly. Co-authored-by: bmoore813 <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
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.
Refs #1429
What
deploy.yml's manual dispatch gains anenvironmentinput:both(the default),devorprod. Each job skips when the input targets only the other environment. Merges still deploy both, throughimages.Why
The owner limited the #1429 resolver candidate (#1518) to er-dev until it is measured there. No CI path deployed one environment alone: a merge and a manual dispatch both ran the dev and prod jobs. Labelled
no-ticketbecause this is enabling plumbing for #1429. A separate issue would be auto-added to the DuckFleet board, which the owner asked to keep free of ER issues.Proof
actionlint .github/workflows/deploy.ymlpasses, andscripts/ci/workflow-shell-check.shreportsok.er-schema/tests/deploy_reachability.rsasserts the trigger set (nopush:, plusworkflow_runandworkflow_dispatch), which is unchanged.needs:, soprodalone anddevalone are both reachable.Risk & rollback
A merge-triggered deploy is unaffected: the new condition applies only to
workflow_dispatch. Rollback:git revert <merge-sha>.Post-merge ledger
Closed by: agent · session
Claude Code:cf299f4a-bafd-4f62-a459-2f495e05c5f2onMac· 2026-12-03T01:25:00Zmainis green with this change on it — the merge SHA, and the runthat proves it. A later head SHA with this commit as an ancestor counts;
a cancelled run with zero jobs does not:
08d3314d. rust 47005442960, frontend 47005443031, infra 47005443092, devcontainer 47005442979 and images 47005442899 all success.imagesbuilt, or correctly never ran because nothing that goes intoan image changed: images 47005442899 success.
deploy.ymlis in its paths; both build jobs correctly skipped (no rust/frontend change).deployconverged — proved by a line the running process emitted, notby the image digest and not by the workflow conclusion: n/a — the merge-triggered deploy for
08d3314d(47005482556) was cancelled while pending. The dev-only dispatch 47005705531 joined thedeployconcurrency group, and GitHub keeps one pending run per group. Nothing was lost: the merge changed onlydeploy.yml, with no image, and the next merge's deploy (f4c401d3, perf(resolve): serve candidates from an in-memory corpus copy, reuse key auth's connection (#1429) #1518) runs from this workflow.deploy,drift,kind's nightly leg) is green, or knowingly red for a reason that is notthis change:
driftis knowingly red on schedule since at least Nov 29, predating this change. Thekindnightly covers no workflow file; n/a for a dispatch-input change.Donethrough the automation rather than byhand, and the issue closed: n/a —
no-ticketenabling change for Resolve latency: ~2.1 s p50 at 520k records because the corpus is materialised per request #1429, which closed through perf(resolve): serve candidates from an in-memory corpus copy, reuse key auth's connection (#1429) #1518 after the dev-only measurement this unlocked.(a skill, a reference, memory) — or nothing new was learned: a manual
deploydispatch cancels a merge-triggered deploy that is still pending in the same concurrency group. Recorded in session memory. Dispatch only when no merge deploy is queued, or re-dispatch the cancelled SHA afterwards.Specific to this change
workflow_dispatchwithenvironment: devrandeploy devand skippeddeploy prod(the perf(resolve): serve candidates from an in-memory corpus copy, reuse key auth's connection (#1429) #1518 candidate release): run 47005705531 (sha=93e43da5,environment=dev).deploy dev (ci namespace)success,deploy prod (app namespace)skipped.ci/er-apithen serveder-api@sha256:05a02869…(blue).Context — plan, discoveries, measurements, files
Files
.github/workflows/deploy.yml🤖 Generated with Claude Code