Let a recorded module's move that restarts nothing roll out with its walk (issue 785)
Under a module's own record (its manifest's, or its irreplaceable data's), every move waited for a person's push, even one that only changed a tools bundle: the database server stayed behind on ace on 2026-10-15 although its walk said it recreated none of its containers. ADR 0377 lets such a move roll out. A move is judged per machine against the build that machine was last sent: it goes when no container, mounted file, data path, data declaration, provider or (for a module with data) long-running process changes. A person's record, the bus and any move that cannot be judged still wait. The walk keeps per machine which way each recorded module went and why, says it in its note and log, and status names a machine behind with `push <node>` only for a move that waits.
This commit is contained in:
@@ -205,6 +205,10 @@ func printStatus(asked answers) error {
|
||||
fmt.Printf("%d machine(s) have never been sent anything:\n %s\n",
|
||||
len(never), strings.Join(never, ", "))
|
||||
}
|
||||
for _, n := range sortedKeysOf(stringsKeys(asked.recordedWaits)) {
|
||||
fmt.Printf(" %s is behind, waiting for a person: %s — `push %s` sends it\n", n,
|
||||
strings.Join(asked.recordedWaits[n], "; "), n)
|
||||
}
|
||||
fmt.Printf("\n `push --behind` sends them\n\n")
|
||||
}
|
||||
|
||||
@@ -540,6 +544,29 @@ func theThreeQuestions(ctx context.Context, open *stores) (answers, error) {
|
||||
if err != nil {
|
||||
return answers{}, err
|
||||
}
|
||||
// And, of those, what waits for a person's push (novox/hq ADR 0377 §6): a recorded module's move that went out
|
||||
// with its walk raises nothing here.
|
||||
if len(out.waiting) > 0 {
|
||||
f, err := readMoveFacts(ctx, inv)
|
||||
if err != nil {
|
||||
return answers{}, err
|
||||
}
|
||||
for _, m := range out.waiting {
|
||||
if m.Never {
|
||||
continue
|
||||
}
|
||||
held, err := recordedWaiting(ctx, inv, f, m.Node)
|
||||
if err != nil {
|
||||
return answers{}, err
|
||||
}
|
||||
if len(held) > 0 {
|
||||
if out.recordedWaits == nil {
|
||||
out.recordedWaits = map[string][]string{}
|
||||
}
|
||||
out.recordedWaits[m.Node] = held
|
||||
}
|
||||
}
|
||||
}
|
||||
out.reported, err = inv.LastReports(ctx)
|
||||
if err != nil {
|
||||
return answers{}, err
|
||||
|
||||
Reference in New Issue
Block a user