flake-update-cascade: update paths come from the pre-pull lock, so a stale checkout reports 'already up to date' without examining its current inputs #175
Labels
No labels
blocked
bug
decision
duplicate
enhancement
help wanted
invalid
landed?
question
ready-to-merge
stale
wontfix
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
allod/tools#175
Loading…
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?
flake-update-cascadedecides which input paths to update from each repository'sflake.lockas it stands before the tool's owngit pull, so a checkout whose default branch is behind hands Nix paths from the old lock. When the pull changes the input graph, Nix warns that the paths match no input and does nothing, and the repository is reportedalready up to datealthough its current inputs were never examined.Symptom
Dry run on a development VM over clones of the workspace repositories, one of them
allod/nexuscloned atcd157da, before the commit that removed itsvminput. The tool's pull fast-forwarded it to65bafe4; the update paths had already been read from the old lock:The lock after the pull has root inputs
agenix,home-managerandnixpkgsand novmnode; none of the three was looked at.Evidence
cmd/flake-update-cascade/main.go:preflightreads each lock and stores itsUpdatePathsbefore anything is pulled, andexecutepulls and then uses the stored paths. Observed with the head-resolving build from allod/tools#174, which classifies a path that no longer resolves as one for Nix to update; the released program passes the same stale paths tonix flake updateand gets the same warnings. Nix 2.34.8.