Node-engine: a want naming its version is resolved to its digests through the registry seats (A-430a)
A want of a released build names the module's version and no parts. Each artifact of the build's entry is resolved at that version through the verb versions of its kind's registry seat: oci-artifact-registry for a bundle or an archive, container-image-registry for an image, under <module>/<artifact> or a package's own name. An upstream copy, which is not numbered, takes the digest its manifest pins. partsMissing, buildOf and KeptBuildOf (and the shadow's added modules) read those digests; a want with parts is read as before. A lookup that fails is said in the journal, naming the module, the version and the seat, and holds the module whole: nothing of it is composed. It is asked again after a minute. The manifest invokes both verbs. Builds: design 47 G A-430, A-430a; lead answer A-430b
This commit is contained in:
@@ -16,9 +16,20 @@ func (c *Composer) KeptBuildOf(_ context.Context, module, digest string) (node,
|
||||
if !ok || w.Fp == "" || w.KeptOn == "" {
|
||||
return "", "", false, nil
|
||||
}
|
||||
if len(w.Parts) > 0 {
|
||||
parts := w.Parts
|
||||
if len(parts) == 0 && w.Version != "" {
|
||||
// A want naming its version names its digests through the registry seats (A-430a): the resolution the composing made.
|
||||
c.mu.Lock()
|
||||
r := c.resolved[resolvedKey{module, w.Fp, w.Version}]
|
||||
c.mu.Unlock()
|
||||
if r.parts == nil {
|
||||
return "", "", false, nil
|
||||
}
|
||||
parts = r.parts
|
||||
}
|
||||
if len(parts) > 0 {
|
||||
named := false
|
||||
for _, d := range w.Parts {
|
||||
for _, d := range parts {
|
||||
if strings.TrimPrefix(d, "sha256:") == strings.TrimPrefix(digest, "sha256:") {
|
||||
named = true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user