-
Notifications
You must be signed in to change notification settings - Fork 86
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
feat: Introduce DFX_CACHE_ROOT environment variable #2112
feat: Introduce DFX_CACHE_ROOT environment variable #2112
Conversation
Please advise on the PR title. The check failed but I used the format shown at https://www.conventionalcommits.org/en/v1.0.0/#commit-message-with--to-draw-attention-to-breaking-change |
Hi Paul Thank you very much for your PR! We would like add those changes. Annoyingly, Hydra (required part of CI, removing it is WIP) does not properly work on external PRs, so someone from the team will have to re-implement your changes and create a separate PR to merge them. This is planned for the next sprint. We'll keep you posted on the progress. Severin |
@paulyoung Thanks for this! The CI (internal, that you can't see) is failing in this test, when it tries to write to $HOME/.cache: https://github.com/dfinity/sdk/blob/master/src/dfx/src/lib/environment.rs#L490 .
If you'd like to try changing this test to alter DFX_CACHE_ROOT rather than DFX_CONFIG_ROOT, it's possible that the tests will pass, and we can get this merged in right away. Otherwise I will take care of it in our next sprint. |
@paulyoung So sorry, but it looks like there is one more place in the internal CI that needs to be changed from DFX_CONFIG_ROOT to DFX_CACHE_ROOT, here: https://github.com/dfinity/sdk/blob/master/check-binaries.nix#L18 |
Please could we get a release that includes this change? |
thanks to dfinity/sdk#2112
Description
A new environment variable,
DFX_CACHE_ROOT
, has been introduced to allow setting the cache root directory to a different location than the configuration root directory. PreviouslyDFX_CONFIG_ROOT
was repurposed for this which only allowed one location to be set for both the cache and configuration root directories.The motivation for this is described in paulyoung/nixpkgs-dfinity-sdk#4, where the cache root directory is necessarily set to a read-only directory. This means that the configuration root directory is also read-only, resulting in the error
Cannot create config directory
when trying to write.config/dfx
Fixes #2106 and paulyoung/nixpkgs-dfinity-sdk#4
How Has This Been Tested?
Only tested with
cargo test
locally. Unable to run end-to-end tests locally due to #1955.Checklist: