From 26d81b09b5e84be22c45d3b238065ecd47ac6bab Mon Sep 17 00:00:00 2001 From: jochen Date: Sun, 18 Oct 2026 18:39:11 +0200 Subject: [PATCH] Register the repository mesh-delivery as an owner, so its issues can be located in it (issue 1133) The tracker runs with the manifest's owners default; a test now holds the default and the template's copy to one list. --- .../cmd/mesh-issues/manifest_test.go | 34 ++++++++++++++++++- modules/mesh-issues/files/settings.json | 1 + modules/mesh-issues/module.json | 1 + 3 files changed, 35 insertions(+), 1 deletion(-) diff --git a/modules/mesh-issues/cmd/mesh-issues/manifest_test.go b/modules/mesh-issues/cmd/mesh-issues/manifest_test.go index 15635181..90d72212 100644 --- a/modules/mesh-issues/cmd/mesh-issues/manifest_test.go +++ b/modules/mesh-issues/cmd/mesh-issues/manifest_test.go @@ -159,7 +159,8 @@ func TestTheSettingsStartTheCounterAndRegisterTheOwners(t *testing.T) { if !sort.StringsAreSorted(s.Owners) { t.Error("the owners are not sorted") } - for _, repo := range []string{"hq", "mesh-catalog", "mesh-controller", "mesh-host", "mesh-sdk", "mesh-tools"} { + // 1133/AC1: the repository mesh-delivery is registered, so an issue can be located in it. + for _, repo := range []string{"hq", "mesh-catalog", "mesh-controller", "mesh-delivery", "mesh-host", "mesh-sdk", "mesh-tools"} { if Owners(s.Owners).owns(repo) != repo { t.Errorf("%s is not registered", repo) } @@ -178,3 +179,34 @@ func TestTheSettingsStartTheCounterAndRegisterTheOwners(t *testing.T) { } } } + +// The owners the tracker runs with are the manifest's default (no layer sets them), and the template's copy is +// what the test above reads: the two are one list, or that test proves a list nobody runs (novox/hq issue 1133). +// 1133/AC2 +func TestTheOwnersDefaultIsTheTemplatesOwners(t *testing.T) { + raw, err := os.ReadFile(filepath.Join("..", "..", "module.json")) + if err != nil { + t.Fatal(err) + } + var m struct { + Config struct { + Owners struct { + Default []string `json:"default"` + } `json:"owners"` + } `json:"config"` + } + if err := json.Unmarshal(raw, &m); err != nil { + t.Fatal(err) + } + tmpl, err := os.ReadFile(filepath.Join("..", "..", "files", "settings.json")) + if err != nil { + t.Fatal(err) + } + var s Settings + if err := json.Unmarshal(tmpl, &s); err != nil { + t.Fatal(err) + } + if len(m.Config.Owners.Default) == 0 || !reflect.DeepEqual(m.Config.Owners.Default, s.Owners) { + t.Fatalf("the owners default (%d) and the template's owners (%d) differ", len(m.Config.Owners.Default), len(s.Owners)) + } +} diff --git a/modules/mesh-issues/files/settings.json b/modules/mesh-issues/files/settings.json index f4b7ba1a..54466137 100644 --- a/modules/mesh-issues/files/settings.json +++ b/modules/mesh-issues/files/settings.json @@ -128,6 +128,7 @@ "mesh-controller", "mesh-controller modules/build-agent", "mesh-controller modules/route-proxy", + "mesh-delivery", "mesh-host", "mesh-lab", "mesh-media-catalog", diff --git a/modules/mesh-issues/module.json b/modules/mesh-issues/module.json index 9d5f9d94..46e3fdb8 100644 --- a/modules/mesh-issues/module.json +++ b/modules/mesh-issues/module.json @@ -221,6 +221,7 @@ "mesh-controller", "mesh-controller modules/build-agent", "mesh-controller modules/route-proxy", + "mesh-delivery", "mesh-host", "mesh-lab", "mesh-media-catalog",