-
Notifications
You must be signed in to change notification settings - Fork 316
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
Alterating PATH env invalidate project bazel cache #6746
Comments
The documentation you quote suggests to use |
Yes but the problem is that "de-facto" many Bazel based projects rely on that export: |
We could add a symlink to |
The problem is that also in this case the cache will be invalidated when you build with exactly the same image with |
We could add it to VS Code is adding the @bhack As a temporary workaround you could remove this PATH entry in your shell's startup script. |
Using the PATH env variable has the advantage it's really just visible and usable when running the VS Code internal terminal. If it were a symlink, it would have to be removed when the process goes down. It could also conflict with a second remote instance of VS Code of different version connected to the same container (a corner case, I admit). |
I suppose that the Bazel/Tensorflow logic about exporting |
/cc @bamurtaugh This is going also to invalidate the prepared docker nighty Bazel cache produced by our CI and published RO on GCS when an user will try to consume it inside a devcontainer/codespace: |
There are other env variables added by VS Code that change, are these a problem too? Would you have filter these out? E.g., |
Generally Env variables need to be explicitly passed to bazel so it is quite hard to have "custom env" variable involved in this issue. But as Can we create a soft link Instead? |
@bhack Would removing it from the "postCreateCommand": "echo '\nexport PATH=$(echo \"$PATH\" | sed -e \"s/\\/[^:]*vscode-server[^:]*\\/bin\\/remote-cli://\")' | tee -a ~/.zshrc >>~/.bashrc" You could also add it in the |
Sorry I don't have the setup ready anymore to test it. |
Steps to Reproduce:
PATH=/vscode/vscode-server-insiders/bin/linux-x64/<daily/new-release-sha>-insider/bin/remote-cli
This is going do invalidate the whole project cache and it requires to rebuild large programs from scratch (every day with code-insider) as many projects that use the Bazel build system export
PATH
env in--action_env
:See also:
tensorflow/tensorflow#51439 (comment)
microsoft/vscode-dev-containers#1453
The text was updated successfully, but these errors were encountered: