A held module is no dependence of its neighbours: its hold stops spreading (issue 1126)
mesh/delivery merged: source.main moved to novox/mesh-sdk@394fec8a63c1
mesh/delivery-group group fix/1126-held-as-runs merged: every member is merged
mesh/check pass c2999a4e13cc on d4c61ee8ffd0 | unit 3054 run, 234 kept, 36 skipped | integration 3075 run, 266 kept, 29 skipped | over bound: unit (sl…
mesh/delivery merged: source.main moved to novox/mesh-sdk@394fec8a63c1
mesh/delivery-group group fix/1126-held-as-runs merged: every member is merged
mesh/check pass c2999a4e13cc on d4c61ee8ffd0 | unit 3054 run, 234 kept, 36 skipped | integration 3075 run, 266 kept, 29 skipped | over bound: unit (sl…
novox's seed p-20261028t231141-ec84b4 refused 11 modules "what it composes of ..., held, is not what runs of them": de-spiegel's hold spread through mailu to postgres, nftables and route-proxy, and from postgres to every consumer, and gitea, held so, refused the node: "its credential of postgres-database is handed to the provisioner and the module is not: nothing would fill it". Three rounds each moved the error. The kind: a held module still took part in the composition as a dependence, so its hold spread. - The quick fix: let heldAsToday also follow dependsOnHeld's words, and skip the handed refusal for gitea. It moves the error once more and leaves every node's applying path holding consumers. - The thorough fix, chosen: a held module composes only as what runs of it. composeEach no longer compares the composition with each held module as its stub (dependsOnHeld removed): a consumer or collector composes against what runs of the held module like any other module, and a real difference is still a named difference in the answer, a module's own refusal still its refusal. A stub (compose.Stub, catalogue.Manifest.Stubbed) leaves the credentials and own secrets it would hand the provisioner out of its plan as they run, never refused for want of a plan. Only what a held module's new manifest says to others in their own files is still held behind it (dependents: the provider of what it contributes to, the filter where it listens), which heldAsToday already follows. Tests: rows added to existing tests (a held provider with a binding consumer, which the old code held in the seed's words; a held feeder of a collector; a held module with a handed credential and own secret). No new test function.
This commit is contained in:
@@ -1103,6 +1103,9 @@ func (r Resolution) compose(with Rendering, owner map[string]string,
|
||||
}
|
||||
for _, unsettled := range resources {
|
||||
if pr, ok := unsettled[HandedProvisionField].(PlanProvision); ok {
|
||||
if handing == nil && m.Stubbed {
|
||||
continue // held: its credential file is what runs of it, left out (issue 1126)
|
||||
}
|
||||
if handing == nil {
|
||||
return nil, fmt.Errorf("%s: its credential of %s is handed to the provisioner and the module is "+
|
||||
"not: nothing would fill it", m.Module, pr.Provision)
|
||||
@@ -1127,6 +1130,9 @@ func (r Resolution) compose(with Rendering, owner map[string]string,
|
||||
continue
|
||||
}
|
||||
if unsettled[HandedSecretField] != nil {
|
||||
if handing == nil && m.Stubbed {
|
||||
continue // held: its own secret's file is what runs of it, left out (issue 1126)
|
||||
}
|
||||
if handing == nil {
|
||||
return nil, fmt.Errorf("%s: its own secret %v is handed to the provisioner and the module is "+
|
||||
"not: nothing would fill it", m.Module, unsettled[HandedSecretField])
|
||||
|
||||
Reference in New Issue
Block a user