Make the build modules and the delivery parts core issue owners and drop build-agent (issue 1041, E3)
This commit is contained in:
@@ -174,9 +174,10 @@ func (o Owners) locatedIn(e string) (string, error) {
|
||||
}
|
||||
|
||||
// core is an owner whose issues are core issues (hq cycle.py, to-be 45): the controller, the node-engine,
|
||||
// the tool runner and the console, the SDK, and the catalogue's bus, forge and build agent.
|
||||
var core = regexp.MustCompile(`\b(mesh-controller|mesh-host|mesh-tools|mesh-sdk|node-tools|` +
|
||||
`mesh-catalog\s+modules/(nats|gitea|build-agent))\b`)
|
||||
// the tool runner and the console, the SDK, the delivery parts, and the catalogue's bus, forge and build modules
|
||||
// (issue 1041; the build agent is gone, ADR 0524 §5).
|
||||
var core = regexp.MustCompile(`\b(mesh-controller|mesh-host|mesh-tools|mesh-sdk|node-tools|mesh-delivery|` +
|
||||
`mesh-build-(go|node|image)|mesh-catalog\s+modules/(nats|gitea))\b`)
|
||||
|
||||
// IsCore says whether an issue located in these owners is a core issue (ADR 0237).
|
||||
func IsCore(locatedIn []string) bool {
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
// Issue 1041 (R4g, E3): the build seat's modules and the delivery parts are core, and build-agent is no owner any more.
|
||||
func TestIsCoreNamesTheBuildModulesAndTheDeliveryParts(t *testing.T) {
|
||||
for _, e := range []string{
|
||||
"mesh-catalog modules/mesh-build-go", "mesh-catalog modules/mesh-build-node", "mesh-catalog modules/mesh-build-image",
|
||||
"mesh-catalog modules/mesh-build-go/cmd/mesh-build-go",
|
||||
"mesh-delivery", "mesh-delivery modules/mesh-delivery-checker", "mesh-catalog modules/mesh-delivery-gate",
|
||||
"mesh-catalog modules/nats", "mesh-catalog modules/gitea", "mesh-controller",
|
||||
} {
|
||||
if !IsCore([]string{e}) {
|
||||
t.Errorf("an issue located in %q is not core", e)
|
||||
}
|
||||
}
|
||||
for _, e := range []string{"mesh-catalog modules/records", "hq", "mesh-catalog modules/mesh-issues", "mesh-catalog modules/mesh-build-extra"} {
|
||||
if IsCore([]string{e}) {
|
||||
t.Errorf("an issue located in %q is core", e)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestNoOwnerNamesBuildAgent(t *testing.T) {
|
||||
if IsCore([]string{"mesh-catalog modules/build-agent"}) {
|
||||
t.Error("mesh-catalog modules/build-agent is core: build-agent is gone")
|
||||
}
|
||||
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)
|
||||
}
|
||||
for _, o := range s.Owners {
|
||||
if strings.Contains(o, "build-agent") {
|
||||
t.Errorf("the owner %q is registered: build-agent is gone (ADR 0524 §5)", o)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -142,7 +142,6 @@
|
||||
"mesh-catalog modules/zsh-autosuggestions",
|
||||
"mesh-catalog modules/zsh-syntax-highlighting",
|
||||
"mesh-controller",
|
||||
"mesh-controller modules/build-agent",
|
||||
"mesh-controller modules/route-proxy",
|
||||
"mesh-delivery",
|
||||
"mesh-delivery modules/mesh-delivery-builder",
|
||||
|
||||
@@ -235,7 +235,6 @@
|
||||
"mesh-catalog modules/zsh-autosuggestions",
|
||||
"mesh-catalog modules/zsh-syntax-highlighting",
|
||||
"mesh-controller",
|
||||
"mesh-controller modules/build-agent",
|
||||
"mesh-controller modules/route-proxy",
|
||||
"mesh-delivery",
|
||||
"mesh-delivery modules/mesh-delivery-builder",
|
||||
|
||||
Reference in New Issue
Block a user