Skip to content

Re-enable rules_python#1535

Merged
fweikert merged 2 commits intobazelbuild:masterfrom
rickeylev:enable-rules-python
Feb 15, 2023
Merged

Re-enable rules_python#1535
fweikert merged 2 commits intobazelbuild:masterfrom
rickeylev:enable-rules-python

Conversation

@rickeylev
Copy link
Copy Markdown
Contributor

@Wyverald
Copy link
Copy Markdown
Member

@rickeylev
Copy link
Copy Markdown
Contributor Author

Ah hm. Do you have any tips to repro this? Running locally, things are fine. Our CI is also OK afaik.

@rickeylev
Copy link
Copy Markdown
Contributor Author

Aha, ok, I think I was able to repro by manually deleting the bazel binary after bazel starts the test, but before the test starts bazel as a subprocess.

The CI sets USE_BAZEL_VERSION=/some/tmp/build/bazel in the environment. This gets passed along via the --test_env=USE_BAZEL_VERSION flag to the CI's (outer) bazel invocation. Later, when run_acceptance_test.py in rules_python tries to run bazel as a subprocess, bazelisk tries to copy /some/tmp/build/bazel to its cache directory. But, for some reason, that file is gone. Or maybe it isn't gone, but not readable by whatever context the tests are running in?

That the path USE_BAZEL_VERSION is pointing to doesn't exist anymore is a bit weird, especially because the outer bazel invocation passes --test_env=USE_BAZEL_VERSION, which would imply it's expected that tests need to propagate the value to invoke bazel themselves.

So, why would /tmp/whatever/bazel path disappear? Is this something sandboxes would cause?

@rickeylev
Copy link
Copy Markdown
Contributor Author

Aha! This is because of --sandbox_tmpfs_path=/tmp hiding USE_BAZEL_VERSION=/tmp/somepath

Would it be possible to adjust either of those?

@Wyverald
Copy link
Copy Markdown
Member

do you know where --sandbox_tmpfs_path=/tmp is being specified?

@rickeylev
Copy link
Copy Markdown
Contributor Author

Github search showed this commit:
dc6796a

But that's all I can find. There's a couple issues mentioning it, but they none of them seemed relevant.

@rickeylev
Copy link
Copy Markdown
Contributor Author

@rickeylev
Copy link
Copy Markdown
Contributor Author

Ok, I figured out a workaround in the tests. PTAL

@fweikert fweikert merged commit 0c8c50e into bazelbuild:master Feb 15, 2023
fmeum pushed a commit to fmeum/continuous-integration that referenced this pull request Dec 10, 2023
fweikert pushed a commit to fweikert/continuous-integration that referenced this pull request Mar 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rules_python failing with Bazel@HEAD in Bazel Downstream pipeline

3 participants