Skip to content

Make the release step safe to re-run - #14

Merged
Jack97 merged 1 commit into
masterfrom
idempotent-release
Sep 14, 2026
Merged

Jack97 merged 1 commit into
masterfrom
idempotent-release

Conversation

@Jack97

@Jack97 Jack97 commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

Publishing two gems in sequence has a half-done state: the runtime goes up, the generator fails, and re-running the job dies on the first push, because RubyGems will not accept a version twice. The tag is then stuck unless you bump it.

Each push now asks whether that exact version is already on RubyGems and skips it if so, so a re-run finishes what the first attempt started. Any answer other than 200 or 404 fails the job rather than guessing.

Verified against the live API using the tag just shipped — both already published (skip), a fresh version (push), and the half-published case (skip one, push the other).

Two gems push in sequence, so there is a half-done state: the runtime goes up,
the generator fails, and the tag is stuck. Re-running used to die on the first
push, because RubyGems will not accept a version twice, so the retry could never
reach the gem that actually needed it.

Each push now asks whether that exact version is already on RubyGems and skips
it if so, which makes a re-run finish what the first attempt started. Any answer
other than 200 or 404 fails the job rather than guessing, since a push decided
by a timeout is worse than one that stops.
@Jack97
Jack97 merged commit 6746e66 into master Sep 14, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant