ci: retry creating the forgejo release while the tag is recorded #4

Merged
tomas merged 1 commit from ci/release-tag-race into master 2026-11-08 19:08:02 +00:00
Owner

Summary

The release of v1.1.0 failed after semantic-release pushed the tag:

Forgejo release: creating v1.1.0 failed with 409 {"message":"release tag already exist [tag_name: v1.1.0]"}

Forgejo records a pushed tag asynchronously. The release plugin (release/forgejo-release.mjs) created the release in the same second the tag was pushed and collided with that record. The job failed, its version output was lost, the images job was skipped and v1.1.0 was never deployed.

  • The plugin now retries a 409 for up to 30 seconds (2, 4, 8, 16 s). Once the tag is recorded, the same request turns it into the release. Other errors still fail at once.
  • The README's Deployment section says how to recover from a release that fails after pushing its tag.

The never-deployed tag v1.1.0 has been deleted, so merging this cuts v1.1.0 again from the commits since v1.0.0 (the Rohlík feature and this fix), now with the fixed plugin, and deploys it.

Testing

  • make ci passed.
  • Ran the plugin's publish against a mocked fetch: 409, 409, 201 creates the release on the third try; a persistent 409 fails after the retries; a 500 fails at once.
## Summary The release of v1.1.0 failed after semantic-release pushed the tag: ``` Forgejo release: creating v1.1.0 failed with 409 {"message":"release tag already exist [tag_name: v1.1.0]"} ``` Forgejo records a pushed tag asynchronously. The release plugin (`release/forgejo-release.mjs`) created the release in the same second the tag was pushed and collided with that record. The job failed, its `version` output was lost, the `images` job was skipped and v1.1.0 was never deployed. - The plugin now retries a 409 for up to 30 seconds (2, 4, 8, 16 s). Once the tag is recorded, the same request turns it into the release. Other errors still fail at once. - The README's *Deployment* section says how to recover from a release that fails after pushing its tag. The never-deployed tag `v1.1.0` has been deleted, so merging this cuts v1.1.0 again from the commits since v1.0.0 (the Rohlík feature and this fix), now with the fixed plugin, and deploys it. ## Testing - `make ci` passed. - Ran the plugin's `publish` against a mocked `fetch`: 409, 409, 201 creates the release on the third try; a persistent 409 fails after the retries; a 500 fails at once.
ci: retry creating the forgejo release while the tag is recorded
All checks were successful
CI / backend (pull_request) Successful in 1m39s
CI / commits (pull_request) Successful in 55s
CI / frontend (pull_request) Successful in 3m31s
CI / release (pull_request) Has been skipped
CI / images (pull_request) Has been skipped
CI / backend (push) Successful in 1m44s
CI / commits (push) Successful in 52s
CI / frontend (push) Successful in 3m11s
CI / release (push) Successful in 48s
CI / images (push) Successful in 1m47s
e452504a38
Forgejo records a pushed tag asynchronously. The release plugin created
the release in the same second semantic-release pushed v1.1.0, collided
with that record and got 409 "release tag already exist". The job failed
after the tag was pushed, so the version output was lost, no images were
built and v1.1.0 was never deployed.

The plugin now retries a 409 for up to 30 seconds; once the tag is
recorded, the same request turns it into the release. The README says how
to recover from a release that fails after its tag is pushed.
tomas merged commit e452504a38 into master 2026-11-08 19:08:02 +00:00
tomas deleted branch ci/release-tag-race 2026-11-08 19:08:02 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
tomas/household!4
No description provided.