Judge a node-engine change by the controller the mesh runs: the scope sets no validator judge (issue 1391, 1 of 2)
pullScope no longer gives a mesh-host change a Judge, and link.JudgeValidator is gone: the validator is mesh-sdk's, at the controller's pin (ADR 0446 clause 5). An older request that says validator is read as the controller the mesh runs.
This commit is contained in:
@@ -75,7 +75,7 @@ type checkScope struct {
|
||||
// Mesh says the repository is the mesh's: modules are built from it on some branch, its owner is the
|
||||
// core's, or the change adds a module to it.
|
||||
Mesh bool
|
||||
// Judge is who judges the gate (link.JudgeSelf, link.JudgeValidator, or the running controller).
|
||||
// Judge is who judges the gate (link.JudgeSelf, or the running controller).
|
||||
Judge string
|
||||
// From is a module built from the repository, for how the mesh clones it; nil when none is.
|
||||
From *inventory.Entry
|
||||
@@ -101,10 +101,6 @@ func pullScope(p link.PullUpdated, entries []inventory.Entry, read map[string][]
|
||||
switch e.Manifest.Module {
|
||||
case "mesh-controller":
|
||||
s.Judge = link.JudgeSelf
|
||||
case "mesh-host":
|
||||
if s.Judge == "" {
|
||||
s.Judge = link.JudgeValidator
|
||||
}
|
||||
}
|
||||
}
|
||||
for _, d := range r.Added {
|
||||
|
||||
@@ -53,8 +53,8 @@ func TestThePullRequestIsMappedOntoTheModuleGraph(t *testing.T) {
|
||||
"", "modules/newmod", "modules/newmod/module.json", true, ""},
|
||||
{"the controller judges itself", pull("novox", "mesh-controller", "main", []string{"cmd/x.go"}),
|
||||
"mesh-controller", "", "module.json", true, "self"},
|
||||
{"the node-engine is judged with its validator", pull("novox", "mesh-host", "main", []string{"validate/v.go"}),
|
||||
"mesh-host", "", "module.json", true, "validator"},
|
||||
{"the node-engine is judged by the controller the mesh runs, as any module is (issue 1391)",
|
||||
pull("novox", "mesh-host", "main", []string{"validate/v.go"}), "mesh-host", "", "module.json", true, ""},
|
||||
{"the core's owner, no module: the mesh's, its own check alone", pull("novox", "hq", "main", []string{"README.md"}),
|
||||
"", "", "", true, ""},
|
||||
{"a branch nothing is built from: the mesh's repository, no module", pull("novox", "photos", "master",
|
||||
|
||||
@@ -180,8 +180,9 @@ type CheckRequest struct {
|
||||
// gate puts through `module check`.
|
||||
Manifests []string `json:"manifests,omitempty"`
|
||||
// Judge is who judges the gate: empty for the controller the mesh runs; JudgeSelf for a change to
|
||||
// the controller, judged by itself; JudgeValidator for a change to the node-engine, judged by the
|
||||
// running controller built with the change's validator in place of the one it vendors.
|
||||
// the controller, judged by itself. A change to the node-engine is judged by the controller the mesh runs, as any
|
||||
// module is: the validator is mesh-sdk's, at the controller's pin (novox/hq ADR 0446 clause 5). An older request that
|
||||
// says "validator" is read the same way: the judge is the controller the mesh runs.
|
||||
Judge string `json:"judge,omitempty"`
|
||||
// Siblings are the other open pull requests of this one's delivery group the check reads beside it (novox/hq ADR
|
||||
// 0382 §1): each repository found under Dir is read at the sibling's head merged onto the sibling's base, in
|
||||
@@ -295,8 +296,7 @@ type GroupMember struct {
|
||||
|
||||
// Who judges a merge check's gate.
|
||||
const (
|
||||
JudgeSelf = "self"
|
||||
JudgeValidator = "validator"
|
||||
JudgeSelf = "self"
|
||||
)
|
||||
|
||||
// CheckedOut is a repository cloned beside a check, at a ref.
|
||||
|
||||
Reference in New Issue
Block a user