Repository navigation
fix(releasing): release each product only from its own version tag - #13128
Conversation
The TypeScript release job created its GitHub release without a tag_name, so softprops/action-gh-release fell back to the tag that triggered the run. When a multi-product release PR pushes several tags at once, the release concurrency queue keeps only one pending run and cancels the rest, so the surviving run resumes every unpublished product - and the TypeScript release can run under another product's tag. This published the v11.15.0 artifacts and notes on the v12.0.0-alpha.15 release page (https://github.com/pnpm/pnpm/actions/runs/29644133887). Pin tag_name (and name) to the planned TypeScript version, and add a guard to both GitHub-release jobs asserting that the version tag points at the commit the run built, so a release resumed from a different release commit fails loudly instead of publishing artifacts on the wrong tag or commit. The Rust job's target_commitish cannot enforce this: GitHub ignores it whenever the tag already exists.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe release workflow now scopes concurrency per tag ref, selects only the product matching the pushed version tag, verifies release tags against the current workflow commit, makes TypeScript and Rust draft metadata explicit, and adds pnpr draft release creation. ChangesRelease workflow
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant GitHubActions
participant PlanJob
participant ReleaseJob
participant GitHubAPI
GitHubActions->>PlanJob: Provide pushed product tag
PlanJob->>PlanJob: Match tag to committed product version
PlanJob-->>ReleaseJob: Enable matching release job
ReleaseJob->>GitHubAPI: Resolve version-tag commit SHA
GitHubAPI-->>ReleaseJob: Return tag commit SHA
ReleaseJob->>ReleaseJob: Compare tag SHA with GITHUB_SHA
ReleaseJob->>GitHubAPI: Create draft release with explicit metadata
Possibly related PRs
Suggested reviewers: ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
PR Summary by QodoPin GitHub release creation to each product’s planned version tag
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
Code Review by Qodo
Context used✅ Compliance rules (platform):
18 rules 1. Draft state unverified
|
Confidence Score: 4/5The core dispatch and concurrency fixes are correct and well-structured; the TypeScript release path is fully guarded before any npm publish. The Rust and pnpr paths publish to npm before the tag↔commit assertion fires, leaving a narrow window where wrong-commit binaries could reach the registry undetected if the tag is force-pushed during the multi-hour build matrix. The tag-dispatch logic, per-ref concurrency group, and explicit TypeScript release identity are all correct. The remaining gap — that the commit guard for Rust and pnpr runs in github-release-* after publish-rust/publish-pnpr have already made npm packages immutable — was flagged in the previous review round and is not yet addressed. .github/workflows/release.yml — specifically the publish-rust and publish-pnpr jobs, which lack an early-exit commit guard analogous to the one at the top of the TypeScript release job. Reviews (3): Last reviewed commit: "fix(releasing): draft every product's Gi..." | Re-trigger Greptile |
PR Code Suggestions ✨Latest suggestions up to fc210c6 Warning
Previous suggestionsSuggestions up to commit e470b0c
Suggestions
|
|||||||||||||||||||||||||||
The plan job released every product whose committed version was missing from npm, regardless of which tag triggered the run. Combined with the shared release concurrency group - GitHub keeps at most one pending run per group and cancels the rest - a multi-product release PR could get a product's run evicted from the queue and its release performed under a sibling product's tag. Now the tag is the dispatch key: a run releases exactly the product whose committed version the tag names, and a tag matching no product fails the plan. The npm check remains as an idempotency guard, so rerunning a tag resumes a partial release and a completed tag skips every job. The concurrency group is scoped per ref so simultaneous tags run in parallel instead of sharing a queue that evicts pending runs; per-product runs publish disjoint packages, making parallelism safe.
|
Code review by qodo was updated up to the latest commit 82a2bae |
pnpr published to npm, GHCR, and Docker but never got a GitHub release page, unlike both pnpm CLIs. Add a github-release-pnpr job mirroring github-release-rust: it asserts the pnpr@<version> tag points at the built commit, then drafts a release on that tag with the platform archives and their build-time checksums, prerelease-flagged for alpha versions and kept off the repository Latest badge. Supersedes the GitHub-release part of #12963, adapted to the pnpr@<version> tag namespace that landed instead of pnpr-v<version>.
PR Code Suggestions ✨Warning
|
|||||||||
|
Code review by qodo was updated up to the latest commit e470b0c |
The TypeScript job verified its draft's body and then flipped it to published in the same run, while the Rust and pnpr jobs leave drafts for a maintainer. The repository uses immutable releases, so publishing is the point of no return: a wrong published release cannot be corrected, only deleted, and deletion burns its tag for releases forever. Keep the TypeScript release a draft too, so every product gets the same deliberate human publish. The Rust and pnpr drafts also had empty descriptions: only the TypeScript job generated release notes. Fill each draft's body from the product's pending changelog written by pnpm version -r (.changeset/changelogs/pacquet@<version>.md and .changeset/changelogs/[at]pnpm!pnpr@<version>.md), stripping the version heading that the release title already carries. A missing changelog warns instead of failing: the draft is still worth having for its artifacts.
|
Code review by qodo was updated up to the latest commit fc210c6 |
Summary
In release run 29644133887, the TypeScript 11.15.0 artifacts and release notes were published on the v12.0.0-alpha.15 release page, and no v11.15.0 GitHub release was created at all (since fixed up by hand). Two things combined to cause it: the three tags of the release PR shared the single
releaseconcurrency group — GitHub keeps at most one pending run per group, so thev11.15.0run was cancelled from the queue — and the survivingv12.0.0-alpha.15run resumed the unpublished TypeScript release, whose GitHub-release step passed notag_nameand fell back togithub.ref, the v12 tag.This PR replaces the "release whatever npm is missing" model with dispatch by tag:
v<ts_version>→ TypeScript CLI,v<rust_version>→ Rust CLI,pnpr@<version>→ pnpr). A tag matching no product's committed version fails the plan loudly instead of falling back. The npm-registry check remains as an idempotency guard: rerunning a tag resumes a partial release, and rerunning a completed tag skips every job.tag_name/namederived from the plan, mirroringgithub-release-rust, so no release step depends on thegithub.reffallback.target_commitishcannot enforce this because GitHub ignores it whenever the tag already exists.github-release-pnprjob mirrorsgithub-release-rust: it drafts a release on thepnpr@<version>tag with the platform archives and their build-time checksums, prerelease-flagged for alpha versions and kept off the repository's "Latest" badge. This supersedes the still-relevant part of feat(release): give pnpr its own tag namespace for independent releases #12963 (its other two parts — a pnpr tag namespace and the TypeScripttag_namepinning — landed aspnpr@<version>on main and in this PR, respectively).v12.0.0-alpha.15-1for exactly this reason). All three products now get the same deliberate human publish gate.pnpm version -r(.changeset/changelogs/pacquet@<version>.md/.changeset/changelogs/@pnpm!pnpr@<version>.md), with a warning fallback to an empty description if the file is missing.The dispatch logic was exercised locally against the live registry for all six cases: the three current tags route to their own product (and skip, as all are published),
v9.9.9/[email protected]fail with a clear error, and a branch ref (theverify_ts_releasedispatch path) releases nothing. Validated withactionlint(only pre-existing runner-label complaints) andzizmor(no findings).Squash Commit Body
Checklist
pnpm/port (workflow-only change; no product code affected).actionlintandzizmor.Written by an agent (Claude Code, claude-fable-5).
Summary by CodeRabbit