rules_jvm_external icon indicating copy to clipboard operation
rules_jvm_external copied to clipboard

Option to retry failed dependency fetches?

Open richardstephens opened this issue 3 years ago • 0 comments

Some of the packages we push to our private github packages repo do not have source jars associated with them. We've noticed that builds that depend on these will sometimes fail intermittently.

It looks like what's happening is that github packages will intermittently return a 400 Bad request instead of a 404 for the non-existant source jar. We've filed a ticket with github support but it would be nice if we could have bazel retry the failed request.

ERROR: An error occurred during the fetch of repository '[redacted]_maven':
   Traceback (most recent call last):
	File "/private/var/tmp/_bazel_richard.stephens/7210513015ec9790ed140b4d4a9254fb/external/rules_jvm_external/coursier.bzl", line 777, column 38, in _coursier_fetch_impl
		dep_tree = make_coursier_dep_tree(
	File "/private/var/tmp/_bazel_richard.stephens/7210513015ec9790ed140b4d4a9254fb/external/rules_jvm_external/coursier.bzl", line 713, column 13, in make_coursier_dep_tree
		fail("Error while fetching artifact with coursier: " + exec_result.stderr)
Error in fail: Error while fetching artifact with coursier: Error fetching artifacts:
https://maven.pkg.github.com/[redacted]-0.9.27-sources.jar: download error: Caught java.io.IOException: Server returned HTTP response code: 400 for URL: https://maven.pkg.github.com/[redacted]-0.9.27-sources.jar (Server returned HTTP response code: 400 for URL: https://maven.pkg.github.com/[redacted-0.9.27-sources.jar) while downloading https://maven.pkg.github.com/[redacted]-0.9.27-sources.jar

richardstephens avatar Aug 09 '22 13:08 richardstephens