P7 failed-finding-names: a module that leaves the registrations clears its pipeline-failed; the finding names the movers held behind the failed one and runner_unfinished_place
Builds: design 47 H2 H-A-605 (2), H-A-625 (2)
This commit is contained in:
@@ -105,7 +105,7 @@ func run(ctx context.Context, getenv func(string) string, logOut io.Writer) erro
|
||||
var resumer atomic.Pointer[func(string)]
|
||||
var advancer atomic.Pointer[func(string)]
|
||||
var placer atomic.Pointer[func(catalog.CatalogRevisionEvent) error]
|
||||
var registrar atomic.Pointer[func(catalog.Registration)]
|
||||
var registrar atomic.Pointer[func(catalog.Registration, bool)]
|
||||
var reviser atomic.Pointer[func(catalog.CatalogRevisionEvent) (int, error)]
|
||||
rv, err := startViews(ctx, js, conn, cred, hub, calls.State("findings"), calls.Call, func(branch string) {
|
||||
if f := resumer.Load(); f != nil {
|
||||
@@ -120,9 +120,9 @@ func run(ctx context.Context, getenv func(string) string, logOut io.Writer) erro
|
||||
return (*f)(ev)
|
||||
}
|
||||
return fmt.Errorf("the candidate %s's revision %d is heard before the runner can place it", ev.Group, ev.Revision)
|
||||
}, func(reg catalog.Registration) {
|
||||
}, func(reg catalog.Registration, gone bool) {
|
||||
if f := registrar.Load(); f != nil {
|
||||
(*f)(reg)
|
||||
(*f)(reg, gone)
|
||||
}
|
||||
}, func(ev catalog.CatalogRevisionEvent) (int, error) {
|
||||
if f := reviser.Load(); f != nil {
|
||||
@@ -160,7 +160,14 @@ func run(ctx context.Context, getenv func(string) string, logOut io.Writer) erro
|
||||
hearer.Widens = widener.Reads
|
||||
hearer.LogLast = stepLog{ctx: ctx, js: js, module: cred.Module}.Last
|
||||
hearer.Where = routerRecordOf(cred.Module, calls.Call, calls.Ask)
|
||||
hearer.Failures = &pipeline.Failures{Findings: rv.Findings, Observer: cred.Module, Author: commitAuthor(calls.Call), Logf: logger.Printf}
|
||||
hearer.Failures = &pipeline.Failures{Findings: rv.Findings, Observer: cred.Module, Author: commitAuthor(calls.Call), Logf: logger.Printf,
|
||||
Behind: func(p seat.Pipeline, module string) []string {
|
||||
half, err := widener.Revision(p.Branch, p.Revision)
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
return pipeline.HeldBehind(p, module, half.Entries)
|
||||
}}
|
||||
// Every ask but a test run's is bounded until its holder's first word (H-A-235, H-A-238), its bounds keys of the state
|
||||
// bounds. A step's ask is put as a kept call within the same bound (design 47 H2 §775).
|
||||
askBound, err := askUnansweredBound(getenv)
|
||||
@@ -250,7 +257,11 @@ func run(ctx context.Context, getenv func(string) string, logOut io.Writer) erro
|
||||
// A registration-changed places the steps of its module's pipelines started before it, from it (A-327), and binds the
|
||||
// takeins durable when its bind failed at the start (H-A-500 fifth addendum).
|
||||
var bindTakeInsAgain atomic.Pointer[func()]
|
||||
register := func(reg catalog.Registration) {
|
||||
register := func(reg catalog.Registration, gone bool) {
|
||||
if gone {
|
||||
hearer.Failures.ModuleGone(reg.Module)
|
||||
return
|
||||
}
|
||||
if f := bindTakeInsAgain.Load(); f != nil {
|
||||
(*f)()
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ func (h *holderView) Nodes(seats []string) ([]string, bool) {
|
||||
// after, then start hub once.
|
||||
func startViews(ctx context.Context, js jetstream.JetStream, conn *nats.Conn, cred process.Account, hub *process.EventHub, findingsState process.State,
|
||||
call meshcatalogclient.Call, onReady, onAdvance func(branch string), candidate func(ctx context.Context, ev catalog.CatalogRevisionEvent) error,
|
||||
registered func(reg catalog.Registration), revised func(ev catalog.CatalogRevisionEvent) (int, error), logf func(string, ...any)) (*runnerViews, error) {
|
||||
registered func(reg catalog.Registration, gone bool), revised func(ev catalog.CatalogRevisionEvent) (int, error), logf func(string, ...any)) (*runnerViews, error) {
|
||||
findings, err := findingWriter(ctx, cred, conn, js, findingsState, logf)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -158,9 +158,10 @@ func startViews(ctx context.Context, js jetstream.JetStream, conn *nats.Conn, cr
|
||||
regs, _, err := meshcatalogclient.WireRegistrationsProcess(reader, call, func(reg catalog.Registration, gone bool) {
|
||||
if !gone {
|
||||
cv.Registered(reg)
|
||||
// A pipeline of the module started before this registration gets its steps from it (A-327).
|
||||
registered(reg)
|
||||
}
|
||||
// A pipeline of the module started before this registration gets its steps from it (A-327); a module the view no
|
||||
// longer names has its finding pipeline-failed cleared (design 47 H2 H-A-605 (2)).
|
||||
registered(reg, gone)
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user