Judge a filled write with the roots the last apply read, asking no runtime per file (issue 1138)

This commit is contained in:
jochen
2026-10-18 18:05:08 +02:00
parent 6469e82384
commit 9b8f398576
2 changed files with 173 additions and 1 deletions
+5 -1
View File
@@ -29,6 +29,11 @@ import (
//
// The caller holds the apply's lock: a write and an apply never write one file at once. log is said the path, the
// action and the digest, never the content.
//
// **It does not refresh the runtimes' data roots.** A filled write is one file, not an apply; the placement guard
// judges it with the roots the last apply read (runtimeDataRoots), falling back to the runtimes' configuration
// files when no apply has read them yet — the runtimes themselves are asked once, at an apply's start, not once
// per file (novox/hq issue 1138).
func WriteFilled(
ctx context.Context,
sys system.System,
@@ -68,7 +73,6 @@ func WriteFilled(
in := inputs{declares: map[string]string{}, known: &known, windows: windows, away: newStoreAway(windows, log),
groups: groupsWanted(d.Resources), handed: Handed{}}
refreshRuntimeRoots(ctx)
in.refused = refusedPlaces(d.Resources)
in.agentHomes = rootNeverHomes(d)
in.dirsBefore = map[string]bool{}