artifact-store-tools: the sweep seats read the artifact store's form through the registry clients' forms too (S-8; issue 1966)
Claude-Session: https://claude.ai/code/session_01NcbgfFSnn24M3GcqttoU7i
This commit is contained in:
@@ -32,7 +32,7 @@ var sweepFindingKey = meshconditionsclient.Key(meshconditionsclient.ScopeModule,
|
||||
// canonical is a kept reference in the older form, `artifact-store://<path>`, whichever form it came in; another is as
|
||||
// it was.
|
||||
func canonical(reference string) string {
|
||||
path, kept := catalogue.InArtifactStore(reference)
|
||||
path, kept := registryForms.InArtifactStore(reference)
|
||||
if !kept {
|
||||
return reference
|
||||
}
|
||||
@@ -42,7 +42,7 @@ func canonical(reference string) string {
|
||||
// seatOf is the seat, name and digest a kept reference is held under: a bundle or an archive on oci-artifact-registry,
|
||||
// an image or a copy of an upstream base on container-image-registry.
|
||||
func seatOf(reference string) (seat, name, digest string, err error) {
|
||||
path, kept := catalogue.InArtifactStore(reference)
|
||||
path, kept := registryForms.InArtifactStore(reference)
|
||||
if !kept {
|
||||
return "", "", "", fmt.Errorf("%s is no reference into the mesh's registries", reference)
|
||||
}
|
||||
@@ -57,7 +57,7 @@ func seatOf(reference string) (seat, name, digest string, err error) {
|
||||
|
||||
// isCopy is whether a kept reference is a copy of an upstream base.
|
||||
func isCopy(reference string) bool {
|
||||
path, _ := catalogue.InArtifactStore(reference)
|
||||
path, _ := registryForms.InArtifactStore(reference)
|
||||
return strings.HasPrefix(path, "upstream/")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user