Make release Central deploy idempotent for already-published versions - #161
Conversation
…ed versions If the deploy fails because every artifact of the tagged version is already live on Maven Central (immutable versions; happens when a tag is re-pushed after a workflow fix), verify the parent and core POMs on repo1.maven.org and treat the release as complete instead of failing. A genuine failed deploy with missing artifacts still fails the job.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ce5fc8f24b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if curl -fsSL -o /dev/null \ | ||
| "https://repo1.maven.org/maven2/io/github/simbo1905/json/parent/${V}/parent-${V}.pom" \ | ||
| && curl -fsSL -o /dev/null \ | ||
| "https://repo1.maven.org/maven2/io/github/simbo1905/json/java.util.json/${V}/java.util.json-${V}.pom"; then |
There was a problem hiding this comment.
Reject re-tags whose artifacts differ
When a release tag is force-moved after fixes, the original version's POMs can still return HTTP 200 even though the new tag builds different artifacts. Maven then fails because the version is immutable, but this guard treats the old POMs as proof of success, allowing the Docker job to publish the new commit under the same version while Maven Central continues serving the old code. Compare the locally built artifacts with the published checksums, or reject a moved tag rather than checking only coordinate existence.
AGENTS.md reference: AGENTS.md:L332-L335
Useful? React with 👍 / 👎.
Closes #160
Adds an idempotency guard to the release workflow's Central deploy: if
the deploy fails but the tagged version's parent and core POMs are
already served from repo1.maven.org, the job logs that the version is
already live and succeeds, letting the Docker publish and the
automated back-to-main PR proceed. Genuine deploy failures with
missing artifacts still fail the job. Verified by the re-tagged
release/2026.08.30 run completing end-to-end.