-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RUNFILES_MANIFEST_FILE is unset inside the sandbox #7994
Labels
P2
We'll consider working on this in future. (Assignee optional)
team-Local-Exec
Issues and PRs for the Execution (Local) team
type: bug
Comments
laszlocsomor
changed the title
Linux, tests: RUNFILES_MANIFEST_FILE
Linux, tests: RUNFILES_MANIFEST_FILE is unset
Apr 10, 2019
The bug only affects sandboxed execution. Without sandbox:
With sandbox:
|
Also, |
laszlocsomor
changed the title
Linux, tests: RUNFILES_MANIFEST_FILE is unset
Linux, sandboxed tests: RUNFILES_MANIFEST_FILE is unset
Apr 10, 2019
laszlocsomor
added
category: sandboxing
team-Local-Exec
Issues and PRs for the Execution (Local) team
untriaged
labels
Apr 10, 2019
jmmv
added
P2
We'll consider working on this in future. (Assignee optional)
type: bug
and removed
category: sandboxing
untriaged
labels
May 23, 2019
jmmv
changed the title
Linux, sandboxed tests: RUNFILES_MANIFEST_FILE is unset
RUNFILES_MANIFEST_FILE is unset inside the sandbox
May 13, 2020
Confirmed that this happens on macOS too, so fixed the title. |
stephane-caron
added a commit
to stephane-caron/vulp
that referenced
this issue
May 6, 2022
This value helps because Bazel does not seem to set the RUNFILES_MANIFEST_FILE environment variable from cc_binary rules, although it does that from py_binary rules that depend on "@rules_python//python/runfiles". The following issues are related: bazelbuild/bazel#4586 bazelbuild/bazel#7994
Still repro'able with |
github-merge-queue bot
pushed a commit
to bazelbuild/rules_python
that referenced
this issue
Sep 5, 2024
…ES_MANIFEST_FILE set (#2177) The script-based bootstrap wasn't computing the correct runfiles directory when `RUNFILES_MANIFEST_FILE` was set. The path it computed stripped off the manifest file name, but didn't re-add the `.runfiles` suffix to point to the runfiles directory. To fix, just re-append the `.runfiles` suffix after it removes the manifest file name portion of the path. Reproducing this is a bit tricky and it's difficult to reproduce the necessary build flags in a test; all of the following must be met: * `--enable_runfiles=false`, but this cannot be set by transitions, only via command line * `--build_runfile_manifests=true` (this can be set in a transition, but see below) * Due to bazelbuild/bazel#7994, even if a manifest is created, the RUNFILES_MANIFEST_FILE env var won't be set _unless_ the test strategy is local (i.e. not sandboxed, which is the default). To work around those issues, the test just recreates the necessary envvar state and invokes the binary. The underlying files may not exist, but that's OK for the code paths were testing. Fixes #2186 --------- Co-authored-by: Richard Levasseur <rlevasseur@google.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
P2
We'll consider working on this in future. (Assignee optional)
team-Local-Exec
Issues and PRs for the Execution (Local) team
type: bug
Description of the problem / feature request:
Bazel does not set
RUNFILES_MANIFEST_FILE
for tests when it should.Update: only with sandboxing.
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
BUILD
:x.sh
:When runfiles symlinks are enabled, all works fine:
RUNFILES_DIR
is defined,RUNFILES_MANIFEST_*
isn't.When runfiles symlinks are disabled, RUNFILES_MANIFEST_FILE is missing:
What operating system are you running Bazel on?
Debian
What's the output of
bazel info release
?release 0.24.0
The text was updated successfully, but these errors were encountered: