Repository navigation
ci: run Release one at a time, and release what an earlier run left unreleased - #864
Conversation
…nreleased Signed-off-by: Lars Trieloff <lars@trieloff.net>
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
|
claude: approved on deb645d This pull request changes only repository tooling, and I'm approving it. It adds a What I checked:
The pull request adds no new script, hook or network endpoint: only local |
|
codex: approved on deb645d The change serializes release runs and recovers tagged skills and plugins left unreleased by earlier runs. Head and base validation and release-config checks pass; all 221 script tests pass. Both --unreleased commands identify the expected backlog. No confirmed blocking defects found. No skill instructions changed, so baseline probes and client evals were not applicable. |
What and why
Two Release runs on
mainran at the same time, and a release was lost each time:@semantic-release/githitgit push --tags … HEAD:main→[rejected] (fetch first), and then it said "behind the remote" for the second skill. Run 46564608378 for fix(deps): update dependency lenis to v1.3.28 #855 was running at the same time. It only looked ataed6f955..84b602ff, socja-dimension-analysis,cja-funnel-health-checkand theadobe-cjaplugin are still unreleased for fix(deps): update dependency chart.js to v4.6.2 #854.fetch first, the second withcannot lock ref.The push that beat the release each time was the next merge, not the other Release run. #855 was committed at 02:54:37Z and run 1's push was rejected at 02:54:39Z, before run 2 had started. The real loss comes from how a run picks what to release: only the directories that its own push changed (
changed.mjs … "$BEFORE..$AFTER", withBEFORE=github.event.before). semantic-release does count from the last tag. But a skill only gets a semantic-release run when the push range touches it. So when a run fails, ends up behindmain, or never runs, what it would have released waits until someone changes that directory again. On today'smainthis has stranded more than #854: #777scrape-webpage, #729 the fourappbuilder-*skills, #607spec, #832site-scanand #215slicc-handoff. Their runs were either behind ("The local branch main is behind the remote one…", which exits 0) or rejected.What changed
concurrency:onrelease.yml. The group is${{ github.workflow }}-${{ github.ref }}withcancel-in-progress: false. A run in progress is never cancelled, and a new push waits for it. This stops two release runs from pushing over each other.changed.mjs --unreleased, used by both detect steps. It lists what the push range touched (as before), and adds every skill, the web CLI and every plugin that has a commit since its highest release tag onHEADthat may release it. Onlychore,ci,testandbuildcommits without a breaking change are ignored, which covers release commits, the manifest rebuild and Renovate chores. If in doubt, semantic-release is run; it already handles "nothing to release". The tag prefix comes from the same place as in the release configs:<folder>-vor thepackage.jsonname,plugin/<name>/v, and the web CLI's owntagFormat. This isunreleasedDirsandtagPrefixinscripts/lib/release.mjs.rebuild-plugins.mjsare updated; the warning used to say that such a release waits for the next change.GitHub's concurrency semantics, and why a cancelled pending run drops nothing now
Per the workflow syntax docs, the default
queue: singlekeeps one run in progress and at most one pending. A newer push cancels the pending run and takes its place. Say A is running, B is pending, and C arrives: B is cancelled, and C'sgithub.event.beforeis B. So C's own rangeB..Cdoes not contain B's commits. Without change 2, the concurrency group alone would drop B's releases. With--unreleased, run C lists every directory with a releasable commit since its last tag, which includes B's. semantic-release then counts from that tag, as it always has.The same applies when a run is behind or rejected because a merge landed mid-run. That can still happen, since merges aren't serialized with releases. The newest push's run always starts at the tip of
main, because release commits are pushed withGITHUB_TOKENand start no run. That run releases what the earlier runs left.I didn't use
queue: max, which keeps up to 100 pending runs. actionlint 1.7.11/1.7.12 rejects the key (rhysd/actionlint#657), and every older queued run would start behindmainand release nothing anyway.Limits:
Will the next Release run release aed6f95 for
cja-dimension-analysisby itself?Yes, after this merges. The merge push starts a Release run that uses the new
changed.mjs. Onmaintoday (fae9a61),node scripts/changed.mjs release HEAD..HEAD --unreleasedlistscja-dimension-analysis: aed6f95fix(deps): …is its only commit sincecja-dimension-analysis-v1.0.0. Run 46564559908 had already computed "The next release version is 1.0.1" for it. That first run should also release what earlier runs left:cja-dimension-analysis,cja-funnel-health-check,scrape-webpage,slicc-handoff,appbuilder-action-scaffolder,appbuilder-e2e-testing,appbuilder-project-init,appbuilder-testing,spec,site-scanadobe-cja,aem-eds-personalization,app-builderIf a merge lands while that run is releasing, the run for that merge picks them up. Without this PR, nothing would release them until someone changes those directories again. I haven't released or tagged anything by hand, and I haven't re-run any job.
How I checked it
npm ci && npm run validate && node scripts/check-release-configs.mjs && npm test: validate passes, 44 release configs checked with 0 broken, 221/221 tests pass. I ran this with/usr/bin/gitfirst onPATH.actionlint .github/workflows/release.yml: clean.scripts/changed.test.mjs:--unreleased, and a chore-only change is not1.10.0over1.9.0), and a breakingchorecountsmayReleaserules--unreleasedwithskillsis a usage errornode scripts/changed.mjs release|plugins HEAD..HEAD --unreleasedonmaingives the lists above in about 3 s.Checklist
npm run validatepasseschanged.mjsgets a flag, and it only runs localgit tagandgit log.humanlabel is set, if a person and not an agent wrote this