log download failures when allow_fail is set to true
- Dominant language
- Java
- Stars
- 25.8k
- Forks
- 4.6k
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 72
Description
### Description of the feature request:
When a `repository_ctx.download` fails, it throws an exception when `allow_fail=False`. However, when it's set to True (as [rules_python does](https://github.com/bazel-contrib/rules_python/blob/1.4.1/python/private/pypi/simpleapi_download.bzl#L215)) the failure message appears to be swallowed completely. This makes it very difficult to debug what might be failing.
Please provide some method to see the error, even if it's just a `DEBUG` message.
### Which category does this issue belong to?
External Dependency
### What underlying problem are you trying to solve with this feature?
Debugging problems with the downloader.
### Which operating system are you running Bazel on?
linux
### What is the output of `bazel info release`?
release 8.2.1
### If `bazel info release` returns `development version` or `(@non-git)`, tell us how you built Bazel.
_No response_
### What's the output of `git remote get-url origin; git rev-parse HEAD` ?
```text
```
### Have you found anything relevant by searching the web?
_No response_
### Any other information, logs, or outputs that you want to share?
_No response_
Contributor guide
Research direction
Start by tracing Bazel's repository_ctx.download handling when allow_fail=True, using the rules_python simpleapi_download.bzl reference in the issue to understand the caller's behavior. Inspect existing downloader logging and tests, then verify that a failed allowed download produces an observable debug-level message without raising the exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, linux
- Domain
- build-system, networking
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100