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

In pulls, compute DiffIDs earlier, and also for v2s2 #2635

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Commits on Nov 22, 2024

  1. Tighten the conditions for storageImageSource.cachedManifest

    If the value is set to a zero-byte value, use it, instead
    of trying to look for a value again / elsewhere.
    
    This should not make a difference in practice, a zero-length
    manifest is invalid anyway; so it's just a conceptual cleanup
    / a microoptimization.
    
    Signed-off-by: Miloslav Trmač <[email protected]>
    mtrmac committed Nov 22, 2024
    Configuration menu
    Copy the full SHA
    bf52eb1 View commit details
    Browse the repository at this point in the history
  2. Cache also the manifest MIME type in storageImageSource

    Should not change behavior.
    
    Signed-off-by: Miloslav Trmač <[email protected]>
    mtrmac committed Nov 22, 2024
    Configuration menu
    Copy the full SHA
    9e4bf64 View commit details
    Browse the repository at this point in the history
  3. Simplify handling of toplevelManifest

    Other parts of the code already assume that the value
    is always valid, so don't treat an empty value specially.
    
    Signed-off-by: Miloslav Trmač <[email protected]>
    mtrmac committed Nov 22, 2024
    Configuration menu
    Copy the full SHA
    d951a88 View commit details
    Browse the repository at this point in the history
  4. Tighten the semantics of s.manifest

    Always check for nil, not for len(0).
    
    Ensure that PutManifest always sets it to non-nil,
    so that valid call sequences (with an invalid empty manifest)
    don't show up as hard-to-explain invariant violations.
    
    Signed-off-by: Miloslav Trmač <[email protected]>
    mtrmac committed Nov 22, 2024
    Configuration menu
    Copy the full SHA
    b011a58 View commit details
    Browse the repository at this point in the history
  5. Only compute the MIME type of the committed manifest once

    We will add one more user.
    
    Should not change behavior.
    
    Signed-off-by: Miloslav Trmač <[email protected]>
    mtrmac committed Nov 22, 2024
    Configuration menu
    Copy the full SHA
    c5cb5ee View commit details
    Browse the repository at this point in the history
  6. Allow determining DiffID values for v2s2 images

    For now this is not really relevant, but we will want to enforce
    the correctness of those values in the future.
    
    Signed-off-by: Miloslav Trmač <[email protected]>
    mtrmac committed Nov 22, 2024
    Configuration menu
    Copy the full SHA
    90ee11a View commit details
    Browse the repository at this point in the history
  7. Add private.ImageDestination.NoteOriginalOCIConfig

    For now, this only adds the API, nothing actually benefits from
    it yet.
    
    Signed-off-by: Miloslav Trmač <[email protected]>
    mtrmac committed Nov 22, 2024
    Configuration menu
    Copy the full SHA
    fe08409 View commit details
    Browse the repository at this point in the history
  8. Use NoteOriginalOCIConfig in storageImageDestination

    Record DiffIDs early, so that we can commit partially-pulled
    layers immediately after staging them, and we don't have to wait
    for PutManifest.
    
    Signed-off-by: Miloslav Trmač <[email protected]>
    mtrmac committed Nov 22, 2024
    Configuration menu
    Copy the full SHA
    e69286e View commit details
    Browse the repository at this point in the history