Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

blobcacheinfo,test: blobs must be resued when pushing across registry #5153

Merged
merged 1 commit into from
Nov 17, 2023

Commits on Nov 17, 2023

  1. blobcacheinfo,test: blobs must be resued when pushing across registry

    It seems we try to reuse blobs only for the specified registry, however
    we can have valid known compressed digests across registry as well
    following pr attempts to use that by doing following steps.
    
    * `CandidateLocations2` now processes all known blobs and appends them
      to returned candidates at the lowest priority. As a result when
    `TryReusingBlob` tries to process these candidates and if the blobs
    filtered by the `Opaque` set by the `transport` fail to match then
    attempt is made against all known blobs (ones which do not belong to the
    current registry).
    
    * Increase the sample set of potential blob reuse to all known
      compressed digests , also involving the one which do not belong to
    current registry.
    
    * If a blob is found match it against the registry where we are
      attempting to push. If blob is already there consider it a `CACHE
    HIT!` and reply skipping blob, since its already there.
    
    ----
    
    ```console
    $ skopeo copy docker://registry.fedoraproject.org/fedora-minimal docker://quay.io/fl/test:some-tag
    $ buildah pull registry.fedoraproject.org/fedora-minimal
    $ buildah tag registry.fedoraproject.org/fedora-minimal quay.io/fl/test
    $ buildah push quay.io/fl/test
    ```
    
    ```console
    Getting image source signatures
    Copying blob a3497ca15bbf skipped: already exists
    Copying config f7e02de757 done
    Writing manifest to image destination
    Storing signatures
    ```
    
    Testing: containers/image#1645
    
    Signed-off-by: Aditya R <arajan@redhat.com>
    flouthoc committed Nov 17, 2023
    Configuration menu
    Copy the full SHA
    3c61dfd View commit details
    Browse the repository at this point in the history