-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
quay-v3.17.0
-
False
-
-
False
-
-
Problem
When using repository mirroring with architecture_filter to mirror only specific architectures (e.g., ["arm64"]), the mirroring worker successfully copies only the filtered architecture manifests and blobs, but then pushes the original manifest list (containing all architectures) to Quay instead of building a filtered manifest list containing only the copied architectures.
This causes the push to fail with "Failed to push sparse manifest list" because Quay cannot validate child manifests that were not copied.
Root Cause
File: workers/repomirrorworker/_init_.py
Function: copy_filtered_architectures() (lines 694-816)
At line 811, the code pushes the original manifest list from the source registry instead of building a new manifest list containing only the filtered architecture entries.
Example Scenario
Source: docker.io/nginx:latest with architectures: amd64, arm64, ppc64le, s390x
Filter: architecture_filter: ["arm64"]
What happens:
1. Worker copies only arm64 manifest + blobs to Quay
2. Worker pushes original manifest list referencing all 4 architectures
3. Quay validation fails because amd64, ppc64le, s390x manifests do not exist
4. Error: Failed to push sparse manifest list
What SHOULD happen:
1. Worker copies only arm64 manifest + blobs to Quay
2. Worker builds new manifest list containing only arm64 entry
3. Worker pushes filtered manifest list to Quay
4. Success
Current Workaround
Enable FEATURE_SPARSE_INDEX with appropriate SPARSE_INDEX_REQUIRED_ARCHS.
Limitations of workaround:
- Global setting affects ALL manifest lists in the registry
- Manifest list digest in Quay differs from source (references non-existent manifests)
- Confusing behavior for users (manifest list shows architectures that are not actually present)
- Breaks image signature verification
Proposed Fix
Add function to build filtered manifest list and update copy_filtered_architectures() to push the filtered manifest list instead of the original.
Benefits of Fix
- Architecture filtering works without FEATURE_SPARSE_INDEX configuration
- Manifest list digest is correct and matches what is actually in Quay
- Clear semantics: pulling image shows only mirrored architectures
- No global configuration side effects
- Proper architecture filtering as users expect
Affected Files
- workers/repomirrorworker/_init_.py (lines 694-816)
- workers/repomirrorworker/manifest_utils.py
Affected Versions
All versions with architecture filter support (Quay 3.14+)