Add missing temproots for cached sources and existing derivations#15237
Add missing temproots for cached sources and existing derivations#15237xokdvium merged 1 commit intoNixOS:masterfrom
Conversation
|
Thanks! I'll test it with our CI runners and cachix/devenv#2489 and report back |
Replace the fetchpatch-based overrideScope approach (which was a no-op due to the wrapper package architecture) with a direct flake input pinned to the PR commit that adds missing temproots for cached sources and existing derivations. Co-Authored-By: Claude Opus 4.6 <[email protected]>
|
In the case of a cached flake eval, fetchToStore will never even be called, so everything skips getting added to temproots. I'm not sure how to address that case though. |
Hm yeah, I'm not sure how to fix this too. |
@xokdvium I am not too familiar with the flake code, but could it be as simple as: diff --git a/src/libflake/flake.cc b/src/libflake/flake.cc
index 9dab20c5c..f39b88233 100644
--- a/src/libflake/flake.cc
+++ b/src/libflake/flake.cc
@@ -1026,6 +1026,8 @@ ref<eval_cache::EvalCache> openEvalCache(EvalState & state, ref<const LockedFlak
};
if (fingerprint) {
+ for (auto & [_, sourcePath] : lockedFlake->nodePaths)
+ state.store->addTempRoot(state.store->toStorePath(sourcePath.path.abs()).first);
auto search = state.evalCaches.find(fingerprint.value());
if (search == state.evalCaches.end()) {
search = state.evalCachesEdit: I can't reproduce the behavior I was seeing before where |
|
Does this PR fix #2285? |
Hopefully, I don't think there are any more obvious issues. Let's wait to hear from @domenkozar for their experience in CI agents. |
Motivation
#15158 and #8417 (comment).
Context
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.