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

c8d/list: Fix shared size calculation #47597

Merged
merged 3 commits into from Mar 20, 2024

Commits on Mar 20, 2024

  1. c8d/list: Handle unpacked layers when calculating shared size

    After a535a65 the size reported by the
    image list was changed to include all platforms of that image.
    
    This made the "shared size" calculation consider all diff ids of all the
    platforms available in the image which caused "snapshot not found"
    errors when multiple images were sharing the same layer which wasn't
    unpacked.
    
    Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
    vvoland committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    0c2d83b View commit details
    Browse the repository at this point in the history
  2. c8d/list: Fix diffIDs being outputted instead of chainIDs

    The `identity.ChainIDs` call was accidentally removed in
    b37ced2.
    
    This broke the shared size calculation for images with more than one
    layer that were sharing the same compressed layer.
    
    This was could be reproduced with:
    ```
    $ docker pull docker.io/docker/desktop-kubernetes-coredns:v1.11.1
    $ docker pull docker.io/docker/desktop-kubernetes-etcd:3.5.10-0
    $ docker system df
    ```
    
    Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
    vvoland committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    ad8a5a5 View commit details
    Browse the repository at this point in the history
  3. c8d/list: Add a test case for images sharing a top layer

    Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
    vvoland committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    3312b82 View commit details
    Browse the repository at this point in the history