bazelbuild/bazel

Allow suppression of 404 code from repository_ctx.download

Open

#13.394 geöffnet am 22. Apr. 2021

Auf GitHub ansehen
 (4 Kommentare) (8 Reaktionen) (0 zugewiesene Personen)Java (4.465 Forks)batch import
P3help wantednot staleteam-ExternalDepstype: feature request

Repository-Metriken

Stars
 (25.384 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 22T 20h) (77 gemergte PRs in 30 T)

Beschreibung

Many rulesets and user configurations include several mirrors for an artifact. A common one is that mirror.bazel.build is used as a secondary url.

However it's hard to predict ahead of time which mirrors host what. For example in rules_nodejs we gave up on using mirror.bazel.build because it was too hard to mirror every single release artifact given the manual process of requesting that from the bazel team.

Another example is in rules_jvm_external where the list of urls is constructed from the list of maven mirrors and the list of packages, without regard for which packages are hosted where. In https://github.com/bazelbuild/rules_jvm_external/issues/349#issuecomment-582499282 @jin suggests that this should be fixed in repository_ctx#download* functions.

I imagine this would take the form of a new keywoard-argument to that function. Perhaps this is specific to 404, or maybe we allow users to indicate what HTTP response codes they want to ignore.

Contributor Guide