From 5dd0d66acb9b533be23cbae5e080db5bd5813ace Mon Sep 17 00:00:00 2001 From: jochen Date: Sun, 22 Nov 2026 00:44:18 +0100 Subject: [PATCH] S10 check-needs names the seats a package's tests need the node to hold MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit check-needs is a list of seat names (node-build-node), as the marker file named them, not the value node-modules. Builds: design 47 H2 §800; H-A-350 DMC-6, H-A-399 (3) --- go/catalogue/config_test.go | 7 ++++--- go/catalogue/manifest.go | 9 ++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/go/catalogue/config_test.go b/go/catalogue/config_test.go index e89fee35..1b70d64b 100644 --- a/go/catalogue/config_test.go +++ b/go/catalogue/config_test.go @@ -3,6 +3,7 @@ package catalogue import ( "bytes" "encoding/json" + "slices" "strings" "testing" ) @@ -138,7 +139,7 @@ func TestAConfigManifestIsWrittenBackInItsOwnForm(t *testing.T) { declared := []byte(`{"module":"c","version":"1","config":{"font":{"type":"string","renamed-from":"font-name"}}, "packages":{"mesh-sdk":"0.2"}, "build":{"artifacts":[{"name":"go","kind":"package","language":"go","paths":["go"],"series":"0.2", - "generated-from":"seats","check-needs":"node-modules"},{"name":"lib","kind":"package","language":"typescript"}]}}`) + "generated-from":"seats","check-needs":["node-build-node"]},{"name":"lib","kind":"package","language":"typescript"}]}}`) m, err = decodeForTest(declared) if err != nil { t.Fatal(err) @@ -147,12 +148,12 @@ func TestAConfigManifestIsWrittenBackInItsOwnForm(t *testing.T) { m.AcceptedSeries("mesh-contracts") != DefaultSeries || m.Build.Artifacts[0].SeriesOf() != "0.2" || m.AcceptedSeries("mesh-sdk", "0.1") != "0.2" || m.AcceptedSeries("mesh-contracts", "0.10", "x", "0.3", "1.0") != "0.3" || m.Build.Artifacts[0].GeneratedFrom != "seats" || m.Build.Artifacts[1].SeriesOf() != "0.1" || - m.Build.Artifacts[0].CheckNeeds != "node-modules" || m.Build.Artifacts[1].CheckNeeds != "" { + !slices.Equal(m.Build.Artifacts[0].CheckNeeds, []string{"node-build-node"}) || m.Build.Artifacts[1].CheckNeeds != nil { t.Fatalf("read %+v", m) } raw, _ = json.Marshal(m) for _, said := range []string{`"renamed-from":"font-name"`, `"packages":{"mesh-sdk":"0.2"}`, `"series":"0.2"`, - `"generated-from":"seats"`, `"check-needs":"node-modules"`} { + `"generated-from":"seats"`, `"check-needs":["node-build-node"]`} { if !strings.Contains(string(raw), said) { t.Errorf("written back without %s: %s", said, raw) } diff --git a/go/catalogue/manifest.go b/go/catalogue/manifest.go index 61065464..ec2d485e 100644 --- a/go/catalogue/manifest.go +++ b/go/catalogue/manifest.go @@ -1285,11 +1285,10 @@ type Artifact struct { // modules' test step regenerates the package and fails on a file out of step. GeneratedFrom string `json:"generated-from,omitempty"` - // CheckNeeds is what a Go artifact's tests need beside its Go toolchain: `node-modules`, the module's npm tree, - // which the pipeline runner has the seat node-build-node install before the integration level (design 47 H2 §800; - // H-A-350 DMC-6). It replaces the marker file check-needs in a package's directory; the Go build module's digest and - // the delivery SDK's step run read it here. Empty needs nothing more. - CheckNeeds string `json:"check-needs,omitempty"` + // CheckNeeds are the seats a Go artifact's integration tests need the node to hold, by name (`node-build-node`), as the + // marker file check-needs in a package's directory named them, which this field replaces (design 47 H2 §800; H-A-350 + // DMC-6, H-A-399 (3)); the Go build module's digest and the delivery SDK's step run read it here. Empty needs nothing. + CheckNeeds []string `json:"check-needs,omitempty"` } // AcceptedSeries is the series of the package of that name this module accepts: the one Packages names, or else the