assigner: say why a want names no parts, and a want held for a dependency's delivery
The want of mesh-delivery-pipeline on novox stayed with no version and no parts after d1ed5fd5, and the assigner said
nothing. Each want the pass writes or keeps at a fingerprint with no parts is now said once per reason: whether the
node's engine reads parts (its record's capabilities) and whether a release or kept build of it is found. A want held
for its dependency's delivery (§376) is said when the hold starts.
Builds: design 47 G §379, §525, §376, A-420 (a path that says nothing)
This commit is contained in:
@@ -365,6 +365,7 @@ func (p *passer) holdForDelivery(ctx context.Context, module, fp, branch string,
|
||||
}
|
||||
kept := deliveryWaiting{Wait: body}
|
||||
p.put(ctx, buckets.DeliveryWaits(), key, func() ([]byte, error) { return json.Marshal(kept) })
|
||||
p.logf("%s at %s on %s waits for the delivery of its dependency %s on %s: the rules write no want of it until then (design 47 G §376)", module, shortHex(fp), branch, body.On, strings.Join(body.Machines, ", "))
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
@@ -404,6 +404,7 @@ func (p *passer) wants(ctx context.Context) {
|
||||
actingOf, orderOf := p.actingOf(name, released), p.orderActing(name, released, unread, func() assign.Nodes { return nodes })
|
||||
m.Acting = func(node string) []assign.ActingEdge { return append(actingOf(node), orderOf(node)...) }
|
||||
out := assign.Wants(m, nodes, wantedOf[name], last)
|
||||
p.sayParts(name, m, nodes, out, wantedOf[name])
|
||||
for _, node := range m.Nodes {
|
||||
for _, prov := range m.MissingProvisions(node) {
|
||||
missing[node+"."+name+"."+prov] = true
|
||||
@@ -1550,3 +1551,37 @@ func releasedBuild(named func(fp string) (assign.KeptBuild, bool), fp string) bo
|
||||
k, ok := named(fp)
|
||||
return ok && k.Version != ""
|
||||
}
|
||||
|
||||
// sayParts says once per node, module and reason why a want the pass writes or keeps at the module's fingerprint names no parts
|
||||
// (design 47 G §379, §525, §526): whether the node's engine reads a want's parts (its record's capabilities, its manifest reads)
|
||||
// and whether the build has a release or a kept build the want could name.
|
||||
func (p *passer) sayParts(name string, m assign.Module, n assign.Nodes, out assign.Outcome, before map[string]mwc.Want) {
|
||||
for _, node := range m.Nodes {
|
||||
w, ok := out.Wants[node]
|
||||
if !ok {
|
||||
w, ok = before[node] // kept as it stands this pass
|
||||
}
|
||||
if !ok || w.Removed || w.Fp == "" || len(w.Parts) > 0 {
|
||||
continue
|
||||
}
|
||||
reads := n.ReadsParts(node)
|
||||
var k assign.KeptBuild
|
||||
found := false
|
||||
if m.KeptBuilds != nil {
|
||||
k, found = m.KeptBuilds(w.Fp)
|
||||
}
|
||||
why := fmt.Sprintf("its engine reads parts: %v (capabilities %v); a release or kept build of %s found: %v", reads, n.Capable[node], shortHex(w.Fp), found)
|
||||
if found && len(k.Parts) == 0 {
|
||||
why += ", naming no parts"
|
||||
}
|
||||
key := "parts " + node + "." + name + "@" + w.Fp + ": " + why
|
||||
if p.skipped[key] {
|
||||
continue
|
||||
}
|
||||
if p.skipped == nil {
|
||||
p.skipped = map[string]bool{}
|
||||
}
|
||||
p.skipped[key] = true
|
||||
p.logf("the want of %s on %s names no parts: %s", name, node, why)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user