Grant a consumer on the provider's own node too: a need answered on the same machine has its secret made before the grants are read (review round 2, item 2). The test failed first; the suite is 1259 tests in 1.05 s
This commit is contained in:
@@ -114,7 +114,7 @@ func (c *composer) grantsFor(node string) ([]catalogue.Grant, []catalogue.Overfl
|
||||
|
||||
// rowsFor is every pair credential this node's declaration must carry a grant for, in the order the controller reads them
|
||||
// (SecretsFrom: by provision, consumer, consumer module and local name): the ones the Input says were made, and the ones the same send
|
||||
// would make before it composes this node -- every need of another node that resolves, whose provider is this node, that is not
|
||||
// would make before it composes this node -- every need of a node that resolves (this one too), whose provider is this node, that is not
|
||||
// answered by a record and not a credential only a person gives and nobody gave. Those have no sealed copy (ForProvider empty), so the
|
||||
// grant is composed with a stand-in and named foreseen (plan.go: planFor makes the secret in every mode before grantsFor reads it).
|
||||
func (c *composer) rowsFor(node string) ([]Issued, error) {
|
||||
@@ -125,13 +125,9 @@ func (c *composer) rowsFor(node string) ([]Issued, error) {
|
||||
}
|
||||
}
|
||||
for _, other := range c.in.sorted() {
|
||||
if other.Name == node {
|
||||
continue
|
||||
}
|
||||
resolved, err := c.planFor(other.Name)
|
||||
switch {
|
||||
case unresolvable(err):
|
||||
continue
|
||||
case unresolvable(err): continue
|
||||
case err != nil:
|
||||
return nil, fmt.Errorf("what %s asked of %s cannot be read: %w", other.Name, node, err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user