Allow suppression of 404 code from repository_ctx.download
#13,394 opened on 2021年4月22日
Repository metrics
- Stars
- (25,384 stars)
- PR merge metrics
- (平均マージ 22d 20h) (30d で 77 merged PRs)
説明
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.