node-engine: a catalog revision's manifest digest is made the candidate's hex form (A-226b)
Builds: design 47 G (G-22 lead answers 2) A-226b
This commit is contained in:
@@ -16,6 +16,7 @@ import (
|
||||
"maps"
|
||||
"slices"
|
||||
"sort"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
@@ -543,7 +544,9 @@ func (s *Shadow) revisionCandidate(ctx context.Context, base *Composer, key nec.
|
||||
if pulls[g] == nil {
|
||||
pulls[g] = map[string]meshcatalog.CandidatesByGroupValuePullsItemFpsValue{}
|
||||
}
|
||||
pulls[g][e.Module] = meshcatalog.CandidatesByGroupValuePullsItemFpsValue{Fp2: e.Fp, Manifest: e.ManifestDigest}
|
||||
// The catalog entry's manifest-digest is the `sha256:`-prefixed form (the seat's definition, entryManifest); a candidate's
|
||||
// module and the manifests and verdicts keys carry the 64 hex digits alone (ADR 0429 clause 16, meshcatalogclient).
|
||||
pulls[g][e.Module] = meshcatalog.CandidatesByGroupValuePullsItemFpsValue{Fp2: e.Fp, Manifest: strings.TrimPrefix(e.ManifestDigest, "sha256:")}
|
||||
}
|
||||
if a.Next == "" {
|
||||
break
|
||||
|
||||
@@ -94,7 +94,7 @@ func TestTheNodeComposesACandidateOnAsk(t *testing.T) {
|
||||
return json.Marshal(meshcatalog.RevisionAnswer{NoneYet: true})
|
||||
}
|
||||
moved := entry
|
||||
moved.Fp, moved.ManifestDigest = fpNew, digest2
|
||||
moved.Fp, moved.ManifestDigest = fpNew, "sha256:"+digest2 // the entry carries the prefixed form
|
||||
return json.Marshal(meshcatalog.RevisionAnswer{Revision: &meshcatalog.CatalogRevision{Branch: "main", Revision: 362}, Entries: []meshcatalog.CatalogEntry{moved}})
|
||||
}
|
||||
return json.Marshal(meshcatalog.EntryAnswer{Entry: entry})
|
||||
|
||||
Reference in New Issue
Block a user