Find all the builtins.fetchTarball
or other eval dependency invocations in a given evaluation and allow uploading them to cache #972
Labels
No labels
Affects/CppNix
Affects/Nightly
Affects/Only nightly
Affects/Stable
Area/build-packaging
Area/cli
Area/evaluator
Area/fetching
Area/flakes
Area/language
Area/lix ci
Area/nix-eval-jobs
Area/profiles
Area/protocol
Area/releng
Area/remote-builds
Area/repl
Area/repl/debugger
Area/store
bug
Context
contributors
Context
drive-by
Context
maintainers
Context
RFD
crash 💥
Cross Compilation
devx
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
imported
Language/Bash
Language/C++
Language/NixLang
Language/Python
Language/Rust
Needs Langver
OS/Linux
OS/macOS
performance
regression
release-blocker
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
testing/flakey
Topic/Large Scale Installations
ux
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lix-project/lix#972
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Because of silliness, without
nix flake archive
(which is not a complete picture if you're using anything but a flake), it's seemingly impossible to make sure that eval dependencies land in nix cache. Normally you can usepost-build-hook
, but that doesn't do anything for eval dependencies.Ideal situation: some way to trace what these fetches are within an evaluation such that they can be uploaded later. Perhaps this looks like the evaluator being able to send RPCs when it adds paths to the store. Perhaps something else.
The reason that we want this is that we had a build failure at work caused by (probably) git.lix.systems experiencing AI crawling and returning 502, which was traffic we weren't even intending to be sending to git.lix.systems (and which is rather rude of us to be sending repeatedly for ~no reason! we would rather not be sending it!).
Today, this can be implemented by parsing logs, but yuck (and also being able to pull out the logs, but this means redirecting lix's output and etc, which is no fun).
https://github.com/NixOS/nixpkgs/blob/master/maintainers/scripts/find-tarballs.nix (obviously doesn't work with everything as it relies heavily on FODs metadata.)
I just had a horrible related idea: abuse scopedImport to inject calls to builtins.trace to log the eval dependencies. I don't think that script can do eval time deps (since in the most common case they simply go directly into import where they're not inspectable).
we have done this successfully in the past. scopedImport breaks caching, but it's totally workable to trace dependencies like this