Skip to content

Retry a Gradle run that fails to resolve a dependency - #574

Merged
mernst merged 3 commits into
plume-lib:masterfrom
mernst:ci-refresh-dependencies
Nov 19, 2026
Merged

mernst merged 3 commits into
plume-lib:masterfrom
mernst:ci-refresh-dependencies

Conversation

@mernst

@mernst mernst commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Land after plume-lib/plume-scripts#153.

Maven Central sometimes transiently returns 404 for an artifact that it holds, which fails CI. Examples (each artifact had been on Maven Central for weeks or months):

This PR:

  • runs the ./gradlew commands in gradle.yml (but not the gradle-spotless hook that the prek workflow runs) through gradlew-retry from plume-scripts, which CI clones. If Gradle could not resolve a dependency, gradlew-retry runs it again, up to 2 more times, after 60 and then 180 seconds. A 404 for an artifact that does not exist, and other failures such as a compilation error or a test failure, are not retried and incur no delay.
  • sets fail-fast: false, so that one failing matrix job does not cancel the others.

CI fails until plume-lib/plume-scripts#153 lands, because gradlew-retry does not exist in plume-scripts until then.

The same change is being made in all plume-lib repositories that build with Gradle.

Maven Central sometimes transiently returns 404 for an artifact that it
holds.  The new script .github/gradlew-retry.sh runs ./gradlew and, if
Gradle could not resolve a dependency, waits and runs it once more with
--refresh-dependencies (Gradle caches the absence of a module, so a plain
retry fails the same way).  Other failures are not retried.

Also set fail-fast: false, so that one failing matrix job does not cancel
the others.
@coderabbitai

coderabbitai Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Explain Change →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 26 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 34f007b and 580f4d9.

Files selected for processing: 1

  • .github/workflows/gradle.yml

No actionable comments were generated in the recent review.

Walkthrough

The Gradle workflow disables fail-fast for its Java matrix and runs the build through a new retry script. The script retries once after 60 seconds with --refresh-dependencies if the initial command fails with either of two specified dependency-resolution errors. Otherwise, it returns the initial command’s status.

Possibly related PRs

  • plume-lib/lookup#573: Reorders plugin repository resolution for a dependency-resolution failure that this retry script also targets.

Change: Other · Severity of issue fixed: Medium

Merge Risk: Minimal · previous review 34f00

This change routes the Gradle CI build through a script that retries once, after a 60-second delay, on transient dependency-resolution failures. It also stops one failing matrix job from cancelling the others. No merge-blocking risk was found.

Pre-merge checks: Passed 2

Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 517ed19 and 34f007b.

Files selected for processing: 2

  • .github/gradlew-retry.sh
  • .github/workflows/gradle.yml

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Gradle does not cache a 404 across runs, so --refresh-dependencies is
unnecessary; drop it.  A transient 404 from Maven Central can last a
minute or more, so retry up to twice, after 60 and then 180 seconds.  To
avoid pointless retries when a dependency does not exist, retry a 404 only
if the artifact exists at the URL that Gradle reported or on a mirror of
Maven Central.
…itory

CI clones plume-lib/plume-scripts and runs the Gradle commands through its
gradlew-retry script, so that the script is not duplicated in every
plume-lib repository.
@mernst
mernst merged commit 48ddc9d into plume-lib:master Nov 19, 2026
5 of 8 checks passed
@mernst
mernst deleted the ci-refresh-dependencies branch November 19, 2026 21:22
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