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

Move the tar-split digest into the TOC #1902

Merged
merged 5 commits into from May 16, 2024

Commits on May 14, 2024

  1. Refactor unmarshalTOC to use a switch

    This is a microptimization, we call strings.ToLower only
    once, but more importantly it will make it easier to add
    more fields.
    
    Signed-off-by: Miloslav Trmač <mitr@redhat.com>
    mtrmac committed May 14, 2024
    Configuration menu
    Copy the full SHA
    8dd381e View commit details
    Browse the repository at this point in the history
  2. Unmarshal the TOC already in readZstdChunkedManifest

    Other TOC formats don't fill the data in.
    
    For now, this only increases memory usage, but we will
    need the data soon.
    
    Signed-off-by: Miloslav Trmač <mitr@redhat.com>
    mtrmac committed May 14, 2024
    Configuration menu
    Copy the full SHA
    dfb4b1f View commit details
    Browse the repository at this point in the history
  3. Move the tar-split digest value into the TOC

    ... so that we can uniquely identify partially-pulled layers
    by the TOC digest.
    
    Signed-off-by: Miloslav Trmač <mitr@redhat.com>
    mtrmac committed May 14, 2024
    Configuration menu
    Copy the full SHA
    b5413c2 View commit details
    Browse the repository at this point in the history
  4. Improve error handling a bit

    Include more details in the returned error text.
    
    Don't continue in tests when we fail to obtain a TOC.
    
    Signed-off-by: Miloslav Trmač <mitr@redhat.com>
    mtrmac committed May 14, 2024
    Configuration menu
    Copy the full SHA
    70b2454 View commit details
    Browse the repository at this point in the history
  5. Stop also writing TarSplitChecksumKey

    We are already not reading it, so simplify the code.
    
    Signed-off-by: Miloslav Trmač <mitr@redhat.com>
    mtrmac committed May 14, 2024
    Configuration menu
    Copy the full SHA
    12554ee View commit details
    Browse the repository at this point in the history