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

OCI-archive multi-manifest support POC #1677

Draft
wants to merge 17 commits into
base: main
Choose a base branch
from

Commits on Jul 12, 2022

  1. Add reader/writer for oci-archive multi image support

    Add reader/writer with helpers to allow podman save/load multi oci-archive images.
    Allow read oci-archive using source_index to point to the index from oci-archive manifest.
    Also reimplement ociArchiveImage{Source,Destination} to support this.
    
    Signed-off-by: Qi Wang <[email protected]>
    Signed-off-by: Urvashi Mohnani <[email protected]>
    QiWang19 authored and umohnani8 committed Jul 12, 2022
    Configuration menu
    Copy the full SHA
    44465c9 View commit details
    Browse the repository at this point in the history

Commits on Oct 6, 2022

  1. Merge branch 'multi-manifest' of https://github.com/umohnani8/image i…

    …nto multi-manifest-poc
    
    Signed-off-by: Miloslav Trmač <[email protected]>
    mtrmac committed Oct 6, 2022
    Configuration menu
    Copy the full SHA
    48304c0 View commit details
    Browse the repository at this point in the history
  2. Revert a few merge mistakes

    Signed-off-by: Miloslav Trmač <[email protected]>
    mtrmac committed Oct 6, 2022
    Configuration menu
    Copy the full SHA
    93bf314 View commit details
    Browse the repository at this point in the history
  3. Remove uses of deprecated io/ioutil

    Signed-off-by: Miloslav Trmač <[email protected]>
    mtrmac committed Oct 6, 2022
    Configuration menu
    Copy the full SHA
    e101311 View commit details
    Browse the repository at this point in the history
  4. Remove uses of deprecated pkg/errors

    Signed-off-by: Miloslav Trmač <[email protected]>
    mtrmac committed Oct 6, 2022
    Configuration menu
    Copy the full SHA
    6d4d96b View commit details
    Browse the repository at this point in the history
  5. Only import oci/layout once

    Signed-off-by: Miloslav Trmač <[email protected]>
    mtrmac committed Oct 6, 2022
    Configuration menu
    Copy the full SHA
    0ad8a9c View commit details
    Browse the repository at this point in the history
  6. Remove invalidOciArchiveErr

    It's unclear what it was intended for, and right now it results in
    awkwardly worded error messages. Assuming this exists just to minimize
    duplication in error text, just duplicate (the fixed version) of that error text.
    
    Signed-off-by: Miloslav Trmač <[email protected]>
    mtrmac committed Oct 6, 2022
    Configuration menu
    Copy the full SHA
    1772f1b View commit details
    Browse the repository at this point in the history
  7. Remove commented-out code

    Signed-off-by: Miloslav Trmač <[email protected]>
    mtrmac committed Oct 6, 2022
    Configuration menu
    Copy the full SHA
    5a51797 View commit details
    Browse the repository at this point in the history
  8. Clean up temporary directories on failure paths

    Signed-off-by: Miloslav Trmač <[email protected]>
    mtrmac committed Oct 6, 2022
    Configuration menu
    Copy the full SHA
    b703a72 View commit details
    Browse the repository at this point in the history
  9. Simplify newImageSource

    Don't get a layout reference we are not going to use.
    
    Signed-off-by: Miloslav Trmač <[email protected]>
    mtrmac committed Oct 6, 2022
    Configuration menu
    Copy the full SHA
    b925b8a View commit details
    Browse the repository at this point in the history
  10. Fix source index values in Reader.List

    Signed-off-by: Miloslav Trmač <[email protected]>
    mtrmac committed Oct 6, 2022
    Configuration menu
    Copy the full SHA
    0600312 View commit details
    Browse the repository at this point in the history
  11. Simplify ociReference.getManifestDescriptor

    Eliminate an unnecessary "d" variable.
    
    Signed-off-by: Miloslav Trmač <[email protected]>
    mtrmac committed Oct 6, 2022
    Configuration menu
    Copy the full SHA
    60b5eaf View commit details
    Browse the repository at this point in the history
  12. Reorganize ociReference.getManifestDescriptor

    to be more similar to docker/internal/tarfile.Reader.ChooseManifestItem:
    - Move non-error paths to the non-indented main flow
    - Prefer situations with image specified to the no-data default
    
    Signed-off-by: Miloslav Trmač <[email protected]>
    mtrmac committed Oct 6, 2022
    Configuration menu
    Copy the full SHA
    4ea3b10 View commit details
    Browse the repository at this point in the history
  13. Use a switch in ociReference.getManifestDescriptor

    ... and explicitly handle an impossible situation
    
    Signed-off-by: Miloslav Trmač <[email protected]>
    mtrmac committed Oct 6, 2022
    Configuration menu
    Copy the full SHA
    776242c View commit details
    Browse the repository at this point in the history
  14. Fix documentation of oci/archive.NewReader*

    Signed-off-by: Miloslav Trmač <[email protected]>
    mtrmac committed Oct 6, 2022
    Configuration menu
    Copy the full SHA
    03d7fea View commit details
    Browse the repository at this point in the history
  15. Split openRef from newImageSource

    We are going to use it in LoadManifestDescriptorWithContext.
    
    Should not change behavior.
    
    Signed-off-by: Miloslav Trmač <[email protected]>
    mtrmac committed Oct 6, 2022
    Configuration menu
    Copy the full SHA
    812797d View commit details
    Browse the repository at this point in the history
  16. Reimplement oci/archive.LoadManifestDescriptorWithContext on top of a…

    …rchive.Reader
    
    ... and drop the now redundant untar code.
    
    Signed-off-by: Miloslav Trmač <[email protected]>
    mtrmac committed Oct 6, 2022
    Configuration menu
    Copy the full SHA
    b7dc1eb View commit details
    Browse the repository at this point in the history