-
-
Notifications
You must be signed in to change notification settings - Fork 39
Only remove the venv_root directory if it has contents #518
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
base: main
Are you sure you want to change the base?
Conversation
|
|
My knowledge of rust is limited so looks like there's some issue. I'll work on fixing it in this PR tomorrow. |
If you switch to pulling rules_py from a SHA rather than a release, you'll get the "pre-release" which exposes the rust sources to your build and you can test this from HEAD. Or of course you can reproduce your problem within the examples folder here, which always uses a pre-release |
I am curious about your end goal, ultimately we want to generate the venv runtime so it works with readonly filesystems. |
When a k8s pod is configured with readOnlyRootFilesystem, we hit the following error:
We then mounted a volume under the path where the venv directory was being created. We then hit:
I think this should solve the issue. Basically, only try to delete the existing venv directory if it is non-empty. In our case, it is empty (when we are mounting an empty directory as a volume).
However, I'm not totally sure how I can actually test this in our environment without a release. I tried adding a patch for
py/tools/py/src/venv.rs
but that didn't work because I guess this actually gets bundled as a binary as part of the release. Do you have any hints for us to test this change?Changes are visible to end-users: yes/no
Test plan