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

add pkg/blobcache from Buildah #1459

Merged
merged 6 commits into from Feb 15, 2022
Merged

add pkg/blobcache from Buildah #1459

merged 6 commits into from Feb 15, 2022

Commits on Feb 14, 2022

  1. add pkg/blobcache from Buildah

    Buildah's blobcache is a cache to speed up builds by avoiding CPU
    intensive (de)compressing of blobs.
    
    Move the code from Buildah into containers/image to allow for extending
    internal interfaces (e.g., image destination/source) *and* supporting
    newly added features in the blobcache.
    
    There are a number of planned features (e.g., sigstore/cosign) which
    will likely be implemented entirely by extending the internal interfaces
    and by casting to internal types in containers/image/copy as already
    done.  Having Buildah's blobcache here allows for extending its internal
    interface more easily.
    
    Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
    vrothberg committed Feb 14, 2022
    Configuration menu
    Copy the full SHA
    42c632c View commit details
    Browse the repository at this point in the history
  2. blobcache: drop import on buildah/docker

    The MIME type is already in c/image/manifest.
    
    Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
    vrothberg committed Feb 14, 2022
    Configuration menu
    Copy the full SHA
    3c3efd2 View commit details
    Browse the repository at this point in the history
  3. blobcache: drop history comment

    The history of the blobcache is well-preserved in the git history.
    
    Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
    vrothberg committed Feb 14, 2022
    Configuration menu
    Copy the full SHA
    4bf5fed View commit details
    Browse the repository at this point in the history
  4. blobcache: make ClearCache() private

    According to [1], this is not being used by any external caller.
    Preserve the method for testing purposes and potential future (internal)
    callers.
    
    [1] https://github.com/containers/image/pull/1459/files#r800944125
    
    Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
    vrothberg committed Feb 14, 2022
    Configuration menu
    Copy the full SHA
    588a5c5 View commit details
    Browse the repository at this point in the history
  5. blobcache: remove CacheLookupReferenceFunc

    The clojure is used in Buildah to pass a reference-reference mapping to
    libimage and Buildah can continue doing that without c/image having to
    worry about it.
    
    Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
    vrothberg committed Feb 14, 2022
    Configuration menu
    Copy the full SHA
    d28344c View commit details
    Browse the repository at this point in the history
  6. blobcache: turn BlobCache into a struct

    Maintaining and evolving interfaces is hard, so let's keep thing simple
    and turn `BlobCache` into a struct that we can easily extend without
    having to worry about (potential) external implementations of an
    interface.
    
    Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
    vrothberg committed Feb 14, 2022
    Configuration menu
    Copy the full SHA
    a61f69e View commit details
    Browse the repository at this point in the history