assigner: a module wanted with no passed pipeline names the parts its build.ended made until its release is heard (design 47 G §16, A-428)
This commit is contained in:
@@ -181,11 +181,21 @@ func (p *passer) sayWanted(node, module, fp string, removed bool) {
|
||||
// version and the parts of the `version-released` of the module whose source is the one its fingerprint was built at, the entry's
|
||||
// `fp-src` (A-419: a merge that does not rebuild the module leaves it so), or for an entry naming none the one whose parts are the
|
||||
// digests its build.ended made (A-421). A trunk entry whose release is not heard is said, once, naming which was tried.
|
||||
func (p *passer) namedBuild(module, trunkFP string, fpSrc int64) func(fp string) (assign.KeptBuild, bool) {
|
||||
func (p *passer) namedBuild(module, trunkFP string, fpSrc int64, unreleased ...bool) func(fp string) (assign.KeptBuild, bool) {
|
||||
return func(fp string) (assign.KeptBuild, bool) {
|
||||
if k, ok := p.w.ends.partsOf(module, fp); ok {
|
||||
return k, true
|
||||
}
|
||||
if len(unreleased) > 0 && unreleased[0] && fp == trunkFP {
|
||||
// Wanted with no passed pipeline (the holder of mesh-catalog, the runner's first start): no pipeline released it,
|
||||
// so its want names the parts its build.ended made, until a release of it is heard (design 47 G §16, A-428).
|
||||
if k, ok := p.w.released.withParts(module, p.w.ends.madeOf(module, fp)); ok {
|
||||
return k, true
|
||||
}
|
||||
if made := p.w.ends.madeOf(module, fp); len(made) > 0 {
|
||||
return assign.KeptBuild{Parts: made}, true
|
||||
}
|
||||
}
|
||||
if fp != trunkFP {
|
||||
return assign.KeptBuild{}, false
|
||||
}
|
||||
|
||||
@@ -383,7 +383,8 @@ func (p *passer) wants(ctx context.Context) {
|
||||
held, _ := mwc.HeldKey(name, fp)
|
||||
grant, _ := grantsstate.PartGrantKey(name, fp)
|
||||
hold, _ := asks.HoldAskKey(name, fp)
|
||||
m.KeptBuilds = p.namedBuild(name, m.FP, trunk[name].FpSrc)
|
||||
noPipeline := runnerFirstStart(name, manifests, p.w.runningNow()) || manifests[name].ClaimsSeat(meshcatalog.Seat)
|
||||
m.KeptBuilds = p.namedBuild(name, m.FP, trunk[name].FpSrc, noPipeline)
|
||||
m.Released = p.answeredWith(hold, "release")
|
||||
m.Kept = p.answeredWith(hold, "keep")
|
||||
m.Built, m.Held, m.Granted = p.w.built(name, fp), p.w.has(buckets.Wants(), held) && !m.Released, p.w.has(grants, grant)
|
||||
|
||||
Reference in New Issue
Block a user