BM3 (sdk): an install is a StepAsk of the kind install, dispatched by RunAsk
node-build-node accepts install as a StepAsk holding an install job (the InstallAsk's fields and the module's fingerprint) under the version its archive is published with; install is its own queue on that seat alone and its holder pulls it. RunAsk dispatches the kind to the module's install body, which publishes the archive <module>:node-modules to the artifact store, and the install's end names the reference it answered. Builds: design 47 H2 §800; H-A-367 (4), H-A-379, H-A-399 (1) (2), H-A-403
This commit is contained in:
@@ -133,6 +133,15 @@ func TestPullKindsTakeTurns(t *testing.T) {
|
||||
if want := []string{sdkstep.AskDelivery, sdkstep.AskCheck, sdkstep.AskDelivery}; len(order) != 3 || order[0] != want[0] || order[1] != want[1] || order[2] != want[2] {
|
||||
t.Fatalf("order = %v, want %v", order, want)
|
||||
}
|
||||
// H-A-403: the Node seat's holder pulls install, its own queue, beside the others.
|
||||
nsrc := NewFakeAsks()
|
||||
if err := nsrc.PublishAsk(installOf()); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
np := &Puller{Source: nsrc, Language: sdkstep.AskNode, Node: "shanks", Put: newSteps().put, Capacity: func() int { return 1 },
|
||||
PullWait: 10 * time.Millisecond, Run: func(context.Context, sdkstep.StepAsk) (any, error) { return nil, nil }}
|
||||
go np.Pull(ctx)
|
||||
waitFor(t, "the install acked", func() bool { a, _, _ := nsrc.Fates(); return len(a) == 1 })
|
||||
}
|
||||
|
||||
// 1887/A2a, 1887/AC-pull: given capacity 2 and three asks waiting, two run and the third waits, and it starts when
|
||||
|
||||
Reference in New Issue
Block a user