B18 whole: an entry of the same fingerprint taken in again at a later revision, naming the pin, builds the waiting importer once, with no published heard and no key failed
Builds: design 47 H2 H-A-707 (3), (4); AC-B18b (the builder's part)
This commit is contained in:
@@ -748,11 +748,26 @@ func TestBuilderMakesADoneKeyWithTheDigests(t *testing.T) { // 1607/AC7
|
||||
}
|
||||
}
|
||||
b.awaitSaid(t, "package "+pkg+" has no published version")
|
||||
goPublished(reserved.Version, pkgDigest)
|
||||
want := "v" + reserved.Version
|
||||
// Design 47 H2 H-A-707 (3), (4) (B18, whole): the same fingerprint taken in again at a later revision, its entry at a later commit
|
||||
// naming the version, while the earlier build waits on its blank pin: the build takes that pin, said once, with no published
|
||||
// heard, and is one build, its key written done once and never failed.
|
||||
later := b.entry("netcheck", "modules/netcheck", "89abcdef0123456789abcdef0123456789abcdef", fourth, digest, b.manifestOf(t, netcheck), bothToolchains, 0)
|
||||
later.Packages = map[string]string{pkg: want}
|
||||
b.catalog.put(t, later)
|
||||
b.awaitSaid(t, pkg+" takes "+want)
|
||||
if v := b.awaitFP(t, "netcheck", fourth, isState(builds.BuildDone)); v.Packages[pkg] != want {
|
||||
t.Errorf("netcheck built with %v, want %s at %s, its publisher's reservation at the key's origin (H-A-547 (3))", v.Packages, pkg, want)
|
||||
}
|
||||
goPublished(reserved.Version, pkgDigest) // heard after the build: nothing builds again
|
||||
if st, err := b.js.Stream(b.ctx, "BUILDER_BUILDS"); err != nil {
|
||||
t.Fatal(err)
|
||||
} else if subject := "mesh.stream.mesh-delivery-builder.event." + builds.BuildEndedEventName("netcheck", fourth); true {
|
||||
info, err := st.Info(b.ctx, jetstream.WithSubjectFilter(subject))
|
||||
if err != nil || info.State.Subjects[subject] != 1 {
|
||||
t.Errorf("netcheck at %s ended %d times (%v), want its one build done, never one failed (H-A-707 (3), (4))", fourth, info.State.Subjects[subject], err)
|
||||
}
|
||||
}
|
||||
released, _ := json.Marshal(meshcatalog.VersionReleasedEvent{V: 1, Module: "disk-load", Version: reserved.Version})
|
||||
msg := nats.NewMsg(meshcatalog.SubjectVersionReleased)
|
||||
msg.Header.Set("x-event-id", "released-disk-load-"+reserved.Version)
|
||||
|
||||
Reference in New Issue
Block a user