Skip to content

Commit df7698f

Browse files
authored
ci: add release concurrency guards + document release gotchas (#47)
Add per-ref concurrency (cancel-in-progress: false) to the 4 v* publishers that lacked it (release-pythinker-cli, linux/windows-installer, homebrew-tap) so the whole pipeline is consistently guarded against overlapping same-tag runs. Document the release-pipeline gotchas in AGENTS.md: tag triggers are glob not extglob, a pushed tag runs the workflow at the tagged commit, and main's required_conversation_resolution makes green checks insufficient to merge.
1 parent 1bea2d1 commit df7698f

5 files changed

Lines changed: 36 additions & 0 deletions

File tree

.github/workflows/homebrew-tap.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ on:
1111
required: true
1212
type: string
1313

14+
concurrency:
15+
group: homebrew-tap-${{ github.ref }}
16+
cancel-in-progress: false
1417

1518
env:
1619
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"

.github/workflows/linux-installer.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ on:
1212
required: true
1313
type: string
1414

15+
concurrency:
16+
group: linux-installer-${{ github.ref }}
17+
cancel-in-progress: false
1518

1619
env:
1720
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"

.github/workflows/release-pythinker-cli.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
tags:
66
- "v[0-9]+.[0-9]+.[0-9]+"
77

8+
concurrency:
9+
group: release-pythinker-cli-${{ github.ref }}
10+
cancel-in-progress: false
11+
812
permissions:
913
contents: write
1014

.github/workflows/windows-installer.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ on:
1212
required: true
1313
type: string
1414

15+
concurrency:
16+
group: windows-installer-${{ github.ref }}
17+
cancel-in-progress: false
1518

1619
env:
1720
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"

AGENTS.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,3 +422,26 @@ user or release workflow explicitly asks for that package.
422422
resolvable by the install scripts and the in-app updater. If a builder is
423423
re-run after promotion it flips the Release back to prerelease; recover by
424424
running `promote-release.yml` via `workflow_dispatch` for that tag.
425+
426+
### Release pipeline gotchas
427+
428+
Hard-won traps — re-check these before and during a release:
429+
430+
- **Tag triggers use GitHub's glob filter, which is NOT regex or ksh extglob.** Every `v*`-triggered
431+
workflow (`release-pythinker-cli`, `promote-release`, `linux-installer`, `windows-installer`,
432+
`homebrew-tap`, `scoop-bucket`, `docker`) must filter on `"v[0-9]+.[0-9]+.[0-9]+"`. In a GitHub tag
433+
filter `(` and `)` are literal characters, so an extglob-style pattern such as
434+
`"v+([0-9]).+([0-9]).+([0-9])"` matches no real tag and silently fires **nothing** — the release looks
435+
like it "did nothing" with no error anywhere. Do not "modernize" these patterns into extglob/regex.
436+
- **A pushed tag runs the workflow definition that exists AT the tagged commit.** If you fix a release
437+
workflow or its trigger, re-create the tag on the post-fix commit — re-pushing a tag that still points
438+
at the pre-fix commit just re-runs the broken definition. Use an annotated tag
439+
(`git tag -a vX.Y.Z -m ...`). Pre-flight before re-tagging: confirm nothing shipped yet
440+
(`gh release view vX.Y.Z` is "not found" and `https://pypi.org/pypi/pythinker-code/X.Y.Z/json` is 404),
441+
then delete the old tag locally and on origin and re-push.
442+
- **`main` requires conversation resolution, so all-green checks are not sufficient to merge.** If
443+
`gh pr view <n> --json mergeStateStatus` shows `BLOCKED` while every required check is `SUCCESS`, look
444+
for an unresolved review thread — CodeRabbit can open one even when its commit status reads "Review
445+
skipped". Inspect via the `reviewThreads` GraphQL field, verify the finding, reply in-thread, then
446+
`resolveReviewThread`. `main` is also squash-only (linear history, `enforce_admins` on), so merge with
447+
`gh pr merge --squash`.

0 commit comments

Comments
 (0)