Uploaded image for project: 'Project Quay'
  1. Project Quay
  2. PROJQUAY-10846

Quay 3.17 Architecture Filter: Pushes original manifest list instead of filtered manifest list

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • quay-v3.17.0
    • quay
    • False
    • Hide

      None

      Show
      None
    • 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+)

              marckok Marcus Kok
              lzha1981 luffy zhang
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: