-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Open
Labels
team-ExternalDepsExternal dependency handling, remote repositiories, WORKSPACE file.External dependency handling, remote repositiories, WORKSPACE file.type: buguntriaged
Description
Description of the bug:
When using allow_fail = True and block = False, repository_ctx.download failed downloads:
- are reported incorrectly to still be pending
- not allowing the user to retrieve the actual error which is firing in
allow_fail = False
Error in wait: java.io.IOException: Configured URL rewriter blocked all URLs: [https://raw.githubusercontent.com/tikv/jemallocator/baae33dd29ccd82c8330021418b293fa6eab5bbc/Cargo.toml]
Which category does this issue belong to?
No response
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
- Create a downloader config
# myconfig.cfg
block *
- Set it as
--downloader_config=myconfig.cfg - In a repository rule, run:
token = ctx.download(
"https://raw.githubusercontent.com/tikv/jemallocator/baae33dd29ccd82c8330021418b293fa6eab5bbc/Cargo.toml",
output = "Cargo.toml",
allow_fail = True,
block = False,
)
print(token) # prints <pending download to '/Users/titouan.bion/Library/Caches/JetBrains/MonorepoBazel/aa71b1dc3fd25eda1f9f28ad27b5446f/modextwd/rules_rs++crate/Cargo.toml'>
print(token.wait()) # prints `struct(success = False)`
print(token) # prints <pending download to '/Users/titouan.bion/Library/Caches/JetBrains/MonorepoBazel/aa71b1dc3fd25eda1f9f28ad27b5446f/modextwd/rules_rs++crate/Cargo.toml'>
Which operating system are you running Bazel on?
No response
What is the output of bazel info release?
No response
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 ?
If this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.
No response
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
team-ExternalDepsExternal dependency handling, remote repositiories, WORKSPACE file.External dependency handling, remote repositiories, WORKSPACE file.type: buguntriaged