[shared] fix(release): push main and tags atomically #72
No reviewers
Labels
No labels
needs-human
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
cjournois/reusable-pipeline!72
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/ci-release-c7ce2c1"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
telos's scheduled release pushed telos-api-2.2.0 and four other tags, then had HEAD:main rejected (non-fast-forward: main moved during the run), so the tags mark a commit main never got. scripts/release.sh pushed main and tags in one non-atomic push;
--atomicmakes the remote take all or none. Every repo calling release.yml (telos, recall, tabula, resume, library, warden, games, ergon, janus) gets it once a release is cut and their pin moves.Verified: a new bats test with a real bare remote finds the stray tag before the change and none after;
just lint testpasses (452 tests).Run: https://git.journois.com/project/telos/actions/runs/2854
9caa36dcf14eaf2cdbc3Addressed:
Tagged: api-1.0.1, so the test fails if release.sh dies before the push; still fails without--atomic(the stray tag reaches the remote), passes with it.For telos (owner decision, not this PR): tags telos-api-2.2.0, telos-app-2.4.0, telos-wallet-1.2.0, telos-shared-ts-1.2.0, telos-eval-0.5.0 sit on e512325c, off main, and releases for the first three were created from it. Merging e512325c into telos main keeps them valid; deleting tags and releases instead is destructive and npm will not republish a version.
4eaf2cdbc3e84fae9b72WIP: [shared] fix(release): push main and tags atomicallyto [shared] fix(release): push main and tags atomicallyVerdict: pass
release.sh pushes main and tags with --atomic, so a main that moved under the run rejects the tags too; Forgejo advertises atomic. The new bats test with a real bare remote finds the stray tag without the flag and none with it, and asserts the run reached the push. Gate and CI green.