ci: fetch tags in release workflow so changeset tag skips already-released packages#2638
ci: fetch tags in release workflow so changeset tag skips already-released packages#2638wrn14897 wants to merge 1 commit into
Conversation
…ready-released packages
|
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
🔴 Tier 4 — CriticalTouches auth, data models, config, tasks, OTel pipeline, ClickHouse, or CI/CD. Why this tier:
Review process: Deep review from a domain expert. Synchronous walkthrough may be required. Stats
|
Greptile SummaryThis PR makes existing package tags visible to the release job. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (1): Last reviewed commit: "ci: fetch existing tags in release workf..." | Re-trigger Greptile |
Deep Review✅ No critical issues found. The diff correctly fixes the release-tag push rejection: adding 🔵 P3 nitpicks (3)
Reviewers (5): ce-correctness-reviewer, ce-reliability-reviewer, ce-maintainability-reviewer, ce-performance-reviewer, ce-project-standards-reviewer. Testing gaps: No CI assertion verifies tags are present before |
E2E Test Results✅ All tests passed • 236 passed • 3 skipped • 1591s
Tests ran across 4 shards in parallel. |
Why
The 2.30.1 release run (29261242580) failed in the
Check Changesetsjob:Root cause chain:
yarn releaserunschangeset publish --no-git-tag && changeset tag(since [HDX] Fix duplicate git tag push in release workflow #2377).changeset tagcreates a tag for every workspace package at its current version, skipping only tags that exist locally.check_changesetscheckout is shallow with no tags fetched, sochangeset tagre-creates all package tags on every release.api/app/otel-collector); the tags for the unchanged packages (common-utils@0.22.0,hdx-eval@0.2.1,cli@0.5.2) already existed from the 2.30.0 release. Changesets tags are annotated (git tag -m), so re-pushing is rejected even when pointing at the same commit — the job fails and every downstream image build/publish job is skipped.This was the first release since #2377 where a subset of packages didn't bump, which is why it never surfaced before. Any future partial-bump release would fail the same way.
What
Fetch the full history and tags in the
check_changesetscheckout (fetch-depth: 0+fetch-tags: true) sochangeset tagsees existing tags via itstagExists()check and skips them. Only genuinely new tags get created and pushed.Notes
Testing
@changesets/cli(tagExists()local-tag check, annotated tag creation) andchangesets/action@v1(pushTag+createReleaseper tag, no already-exists tolerance).