diff --git a/modules/distribution/cmd/distribution-tools/main.go b/modules/distribution/cmd/distribution-tools/main.go index 49336087e..baf4b2b3c 100644 --- a/modules/distribution/cmd/distribution-tools/main.go +++ b/modules/distribution/cmd/distribution-tools/main.go @@ -12,6 +12,7 @@ import ( "encoding/json" "errors" "fmt" + builds "git.novox.be/novox/mesh-delivery/modules/mesh-delivery-builder/builds" "net/url" "os" "strings" @@ -24,7 +25,6 @@ import ( reg "git.novox.be/novox/mesh-delivery/contracts/go/seats/containerimageregistry" "git.novox.be/novox/mesh-delivery/sdk/parts" stdio "git.novox.be/novox/mesh-sdk/go" - "git.novox.be/novox/mesh-sdk/go/delivery" "distribution/internal/holder" ) @@ -520,7 +520,7 @@ func tools(v *holder.Verbs, windows kept[holder.Window], callers func() (holder. func main() { base, _ := url.Parse("http://127.0.0.1:5001") store := &holder.OCI{Base: base, Upstream: &holder.Upstream{}} - h := &holder.Holder{Objects: parts.BusObjects(holder.IncomingObjects), Builder: delivery.BuilderVersions{Ask: stdio.Ask}, Store: store, Say: say, Finding: finding, + h := &holder.Holder{Objects: parts.BusObjects(holder.IncomingObjects), Builder: builds.BuilderVersions{Ask: stdio.Ask}, Store: store, Say: say, Finding: finding, Transfers: parts.BusTransfers[holder.Opening](holder.TransfersState), Cap: parts.BusCap(holder.IncomingObjects), Record: recordAct, Idle: parts.BusArm(holder.IdleState)} files := &holder.Files{Container: or(os.Getenv("MESH_REGISTRY_CONTAINER"), "mesh-registry"), Run: holder.ExecRunner, UID: os.Getuid()} v := &holder.Verbs{Holder: h, Catalog: store, Holds: kept[holder.Hold]{state: "holds", key: holder.Hold.Key}, Mirrors: mirrors{}, diff --git a/modules/distribution/go.mod b/modules/distribution/go.mod index cc5ad086a..0bedb775f 100644 --- a/modules/distribution/go.mod +++ b/modules/distribution/go.mod @@ -3,6 +3,7 @@ module distribution go 1.26.0 require ( + git.novox.be/novox/mesh-delivery/modules/mesh-delivery-builder/builds v0.0.0-00010101000000-000000000000 git.novox.be/novox/mesh-delivery/sdk v0.0.0-00010101000000-000000000000 git.novox.be/novox/mesh-contracts/health-and-repair/go/clients/meshconditionsclient v0.0.0-00010101000000-000000000000 git.novox.be/novox/mesh-contracts/health-and-repair/go/seats/meshconditions v0.0.0-00010101000000-000000000000 diff --git a/modules/distribution/internal/holder/holder_test.go b/modules/distribution/internal/holder/holder_test.go index cf28ef248..3c3b31115 100644 --- a/modules/distribution/internal/holder/holder_test.go +++ b/modules/distribution/internal/holder/holder_test.go @@ -832,12 +832,17 @@ func TestTheHolderOfTheTwoImageSeats(t *testing.T) { Name string `json:"name"` Serves []string `json:"serves"` } `json:"claims"` - Resources []map[string]any `json:"resources"` - Consumes []string `json:"consumes"` + Resources []map[string]any `json:"resources"` + Consumes []string `json:"consumes"` + Packages map[string]string `json:"packages"` } if err := json.Unmarshal(raw, &m); err != nil { t.Fatal(err) } + // The builder's question is its published package, taken by its series (ADR 0634 §1). + if m.Packages["builds"] != "0.1" { + t.Errorf("packages %v: want builds of series 0.1", m.Packages) + } // E15: the provision artifact-store retired (ADR 0632 §3): distribution provides and serves nothing, and the // store is found by its seats' holder and the listen it opens to the mesh. if len(m.Provides) != 0 || len(m.Serves) != 0 { diff --git a/modules/distribution/module.json b/modules/distribution/module.json index f874a18e3..5c6c95753 100644 --- a/modules/distribution/module.json +++ b/modules/distribution/module.json @@ -1,6 +1,9 @@ { "module": "distribution", "version": "2", + "packages": { + "builds": "0.1" + }, "claims": [ { "name": "container-image-registry",