Say a module assigned and left out of its machine's declaration as a condition (issue 380) #223

Merged
mesh-admin merged 4 commits from fix/380-a-left-out-module-is-said into main 2026-10-11 17:36:58 +00:00
3 changed files with 9 additions and 1 deletions
Showing only changes of commit c14fe2776c - Show all commits
+8
View File
@@ -239,6 +239,14 @@ func TestAWaitsNeedsOperatorStillClearsWhenItsStatementStopsNamingItBesideALeftO
if c := open()[leftKey]; c.Kind != kindNeedsOperator {
t.Fatalf("the left-out condition is not open as needs-operator: %+v", open())
}
// D1 runs again and still finds nfs-server left out: its reconcile clears only what D1 raised, never the wait,
// which the machine's statement raised.
if err := k.Reconcile(t.Context(), probeLeftOutID, left); err != nil {
t.Fatal(err)
}
if _, still := open()[waitKey]; !still {
t.Fatalf("D1's reconcile cleared the wait's needs-operator: %+v", open())
}
if err := judgeModuleHealth(t.Context(), nil, k, "anchor", map[string][]inventory.ResourceHealth{}, nil, time.Now()); err != nil {
t.Fatal(err)
}
+1 -1
View File
@@ -895,7 +895,7 @@ func showNode(ctx context.Context, stored *stores, name string) error {
plan, settings, err := planFor(ctx, stored, name)
switch {
case err != nil:
fmt.Printf("\n whether a push leaves any assigned module out is NOT known: %s\n", oneLine(err.Error()))
fmt.Printf("\n whether a send leaves any assigned module out is NOT known: %s\n", oneLine(err.Error()))
default:
for _, line := range notAppliedLines(name, leftOutOf(plan, settings, node.Adopted)) {
fmt.Println(line)
BIN
View File
Binary file not shown.