A manifest HEAD says what it accepts, or the registry answers 404
The check that skips copying a base the mesh already holds asked with no Accept header, and a registry answers a manifest only in a media type the caller named: the same digest answered 200 with the manifest types and 404 without them. So the builder concluded it held nothing, copied every vendor base again, and exhausted the public hub's pull limit a second time today. The test could not have caught it, because the fake registry answered a manifest HEAD regardless of Accept — more permissive than the thing it stands in for. It is now as strict as a real registry, and fails without the fix.
This commit is contained in:
@@ -186,7 +186,7 @@ func (r Registry) MirrorImage(ctx context.Context, from, repository string) (str
|
||||
// on the first merge that rebuilt a whole catalogue (2026-09-28), and every module whose base
|
||||
// lives there failed on a copy it did not need.
|
||||
if strings.HasPrefix(where.reference, "sha256:") {
|
||||
held, err := r.has(ctx, "http://"+r.Address+"/v2/"+repository+"/manifests/"+where.reference)
|
||||
held, err := r.has(ctx, "http://"+r.Address+"/v2/"+repository+"/manifests/"+where.reference, manifestAccept)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("asking %s whether it holds %s: %w", r.Address, from, err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user