bazel icon indicating copy to clipboard operation
bazel copied to clipboard

Files downloaded via --experimental_remote_download_regex are not executable.

Open adam-azarchs opened this issue 3 years ago • 6 comments

Description of the bug:

When building with --remote_download_outputs={minimal,toplevel} --experimental_remote_download_regex=..., files which are downloaded because of matching --experimental_remote_download_regex (but not those picked up as top-level outputs, thankfully) do not have their executable bit set.

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

$ bazel build --remote_download_outputs=minimal --nobuild_runfile_links --experimental_remote_download_regex='.*/bin/python3.9' //:...
...
$ ls -l bazel-out/*/bin/external/anaconda/bin/python3.9
-rw-r--r--. 1 adam.azarchs unix_devs 15733456 Aug 26 14:21 bazel-out/host/bin/external/anaconda/bin/python3.9
-rw-r--r--. 1 adam.azarchs unix_devs 15733456 Aug 26 14:21 bazel-out/k8-fastbuild/bin/external/anaconda/bin/python3.9
-rw-r--r--. 1 adam.azarchs unix_devs 15733456 Aug 26 14:21 bazel-out/k8-fastbuild-ST-829df9883741/bin/external/anaconda/bin/python3.9
-rw-r--r--. 1 adam.azarchs unix_devs 15733456 Aug 26 14:21 bazel-out/k8-opt-exec-3B763B72/bin/external/anaconda/bin/python3.9
-rw-r--r--. 1 adam.azarchs unix_devs 15733456 Aug 26 14:21 bazel-out/k8-opt-exec-3B763B72-ST-829df9883741/bin/external/anaconda/bin/python3.9

Which operating system are you running Bazel on?

Linux

What is the output of bazel info release?

release 5.3.0

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 master; git rev-parse HEAD ?

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

adam-azarchs avatar Aug 26 '22 21:08 adam-azarchs

cc @lfpino @anfelbar

lfpino avatar Aug 26 '22 22:08 lfpino

@coeuvre you can assign me to this one if you want :)

lfpino avatar Aug 26 '22 22:08 lfpino

Hi @adam-azarchs, Could you please provide complete steps to reproduce the above issue with code repo. Thanks!

ShreeM01 avatar Aug 26 '22 23:08 ShreeM01

Unfortunately our affected repos are closed source. If necessary I can try to cobble together a minimum reproducer, but I probably won't have time to do that that until later next week.

adam-azarchs avatar Aug 26 '22 23:08 adam-azarchs

@lfpino Thanks! Please take a look! I'm happy to review the fix.

coeuvre avatar Aug 29 '22 08:08 coeuvre

@coeuvre I can reproduce this with bazel sync --experimental_repository_resolved_file=tools/thirdparty/repositories.bzl --remote_download_minimal and an empty WORKSPACE file, I think the remote_download_minimal is confusing things because its an aggregate.

carpenterjc avatar Dec 20 '22 11:12 carpenterjc

Should be fixed with recent changes.

coeuvre avatar Sep 07 '23 13:09 coeuvre