Skip to content

ci: retry the Maven steps on a transient failure - #160

Merged
kingchenc merged 1 commit into
mainfrom
ci/maven-retry
Oct 27, 2026
Merged

kingchenc merged 1 commit into
mainfrom
ci/maven-retry

Conversation

@kingchenc

Copy link
Copy Markdown
Contributor

Summary

Maven Central answered 403 for a metadata file and a plugin on 2026-10-27, and wickra-verify's CodeQL job failed on main until it was rerun. Maven's resolver does not retry a 403, so only a step-level retry catches it.

Every step that runs Maven now goes through nick-fields/retry, the action the workflows already use for npm, dotnet and the binding install: two attempts, 30 seconds apart, 30 minutes per attempt. That covers the binding tests and examples in ci.yml, the Java build in codeql.yml, and in release.yml the version check before the deploy and the package step after it.

  • nick-fields/retry starts the command with bash -c, without the -e a run step gets, so multi-line commands begin with the same set -e (and pipefail where the step said shell: bash).
  • Steps that used the default shell now run under bash on every OS. They are single mvn calls, which behave the same under bash; wickra's Java job has run its binding install this way on all three OSes for a while.
  • The Maven Central deploy keeps a single attempt: a retry after a first attempt that timed out while Central went on to publish would only run into Central's duplicate check.

Checks

actionlint and zizmor --offline are clean on the changed workflows.

Maven Central answered 403 for a metadata file and a plugin on 2026-10-27,
and wickra-verify's CodeQL job failed on main until it was rerun. Maven's
resolver does not retry a 403, so every step that runs Maven now goes
through nick-fields/retry, the action the workflows already use for npm,
dotnet and the binding install: two attempts, 30 seconds apart, 30 minutes
per attempt.

nick-fields/retry starts the command with `bash -c`, without the -e a run
step gets, so multi-line commands begin with the same `set -e` (and
pipefail where the step said `shell: bash`).

The Maven Central deploy keeps a single attempt: a retry after a first
attempt that timed out while Central went on to publish would only run into
Central's duplicate check. The version check in front of it and the
package step behind it are retried.
@codecov

codecov Bot commented Oct 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@kingchenc
kingchenc enabled auto-merge (squash) October 27, 2026 22:10
@kingchenc
kingchenc disabled auto-merge October 27, 2026 22:11
@kingchenc
kingchenc merged commit 709075d into main Oct 27, 2026
65 checks passed
@kingchenc
kingchenc deleted the ci/maven-retry branch October 27, 2026 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant