Carry every node's name on a check ask to the names check, so no repository lists them (ADR 0567 §12, issue 1126)

This commit is contained in:
2026-10-28 18:13:57 +01:00
parent fed64292f0
commit 004bbc2ce2
4 changed files with 39 additions and 1 deletions
+3
View File
@@ -200,6 +200,9 @@ func (s AskSteps) level(ctx context.Context, job delivery.CheckJob, level string
if runner != "" {
args["runner"] = runner
}
if len(job.NodeNames) > 0 {
args[delivery.NodeNamesArg] = job.NodeNames // the names check's (ADR 0567 §12)
}
return args
}
test := func(args map[string]any) (bool, error) {
+7
View File
@@ -143,6 +143,13 @@ test {"level":"unit","packages":["x/pkg/a"],"workspace":"/w"}`
t.Fatalf("the unit level %+v", u)
}
// ADR 0567 §12: a check's node names reach the test tool, for the names check.
r.calls = nil
if _, err := RunAsk(context.Background(), r.steps(), ask(delivery.CheckJob{Levels: []string{delivery.LevelUnit}, NodeNames: []string{"anchor"},
Fetch: map[string]any{"repository": "novox/x", "commit": runCommit}})); err != nil || !strings.Contains(strings.Join(r.calls, "\n"), `"node-names":["anchor"]`) {
t.Fatalf("the node names are not handed to the test tool: %v, %v", r.calls, err)
}
// Issue 890/AC2: a package declaring node-build-node is not tested on a node that lacks it but named unmet, and is
// tested on a node that has it.
for _, has := range []bool{false, true} {