Repository navigation
Retry a Gradle run that fails to resolve a dependency - #576
Conversation
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.
|
Warning Review limit reachedYou'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. View limit details
No actionable comments were generated in the recent review. Walkthrough
Change: Other Merge Risk:
|
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.
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):
:compileClasspath):compileClasspath)This PR:
./gradlewcommands ingradle.yml(but not thegradle-spotlesshook that theprekworkflow runs) throughgradlew-retryfrom plume-scripts, which CI clones. If Gradle could not resolve a dependency,gradlew-retryruns 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.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-retrydoes not exist in plume-scripts until then.The same change is being made in all plume-lib repositories that build with Gradle.