Uploaded image for project: 'OpenShift Request For Enhancement'
  1. OpenShift Request For Enhancement
  2. RFE-8116

Improve Red Hat Quay OCI 1.1+ compatibility for cliend side chunked uploads

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • quay, quay-3.13, quay-3.14
    • Quay, Quay.io
    • None
    • Product / Portfolio Work
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Improve Red Hat Quay OCI 1.1+ compatibility for cliend side chunked uploads

      With the official Statement of 

      Red Hat Quay strives to be as compatible as possible with the OCI 1.1 Image and Distribution specifications 

       

      we encounter that client side chunked uploads are failing with a return code of 500 even though the OCI spec states Range uploads should be working as explained in the technical details below.

       

      Technical details

      with the attached shell script, simulating a client side chunked upload we  can see that on the Registry side each upload part is considered being a full blob instead of being a part of the blob.

      This results in the chunks being correctly uploaded to the S3 API in a multipart collection and the PUT to finalize the chunks are failing to concatinate all related parts as they are stored in different S3 API multipart ids.

       

      jq -r '.batches[].instrumentationLibrarySpans[].spans[]|select(.name=="boto3.CreateMultipartUpload")|.attributes[]|select(.key=="UploadId")|.value.stringValue' < 'Trace-b28b0e-2025-09-05 08_52_56.json'   
      
      2~gLExRDr-RhwJd-tjYpWEWfHvXyLLkCj
      2~few0Lcj6QQbX2B2ONn4-MPx2uG9-TJ4
      2~B1_OQemMFDNGG3PRYIKtp2EBhvrE3jI 

      The failing concatination due to missing parts and or offset mismatches results in Quay returning an error of 500 and internal the boto3 library received an error of 416 InvalidRange request.

       

      Possible mitigations

      if we consider to not comply to this OCI spec we should return an error of 416 or 501 with an hint of this OCI spec not being compliant to. invalid to the OCI specifications.

      if we want to consider being compliant on this OCI spec we should:

      • in /endpoints/v1/uploads distinguish between client side chunked and none chunked uploads
      • add the S3 API multipart id into the database to be able to use it at a later point in time 
      • instead of blindly initiating new S3 API multipart id's, check if the Digest in the database as a S3 multipart id stored already and use that for subsequent part uploads

       

      In the meantime CU's have been advised to turn of `server_side_assembly: false` 

              rhn-coreos-tunwu Tony Wu
              rhn-support-milang Michaela Lang
              None
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                None
                None