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

[release-5.32] Zstd backports #2508

Merged
merged 51 commits into from
Aug 9, 2024
Merged

Commits on Jul 25, 2024

  1. Bump to c/image v5.33.0-dev

    As the title says.  Bumping the main branch back to a dev version.
    
    Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
    TomSweeneyRedHat committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    2db2878 View commit details
    Browse the repository at this point in the history
  2. Merge pull request containers#2495 from TomSweeneyRedHat/dev/tsweeney…

    …/v5.32.0
    
    Bump c/storage to v1.55.0, c/image to v5.32.0
    rhatdan authored Jul 25, 2024
    Configuration menu
    Copy the full SHA
    c07c0b3 View commit details
    Browse the repository at this point in the history

Commits on Jul 28, 2024

  1. fix(deps): update module github.com/vbauerster/mpb/v8 to v8.7.5

    Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Jul 28, 2024
    Configuration menu
    Copy the full SHA
    67e1306 View commit details
    Browse the repository at this point in the history

Commits on Jul 29, 2024

  1. Merge pull request containers#2496 from containers/renovate/github.co…

    …m-vbauerster-mpb-v8-8.x
    
    fix(deps): update module github.com/vbauerster/mpb/v8 to v8.7.5
    mtrmac authored Jul 29, 2024
    Configuration menu
    Copy the full SHA
    b089d55 View commit details
    Browse the repository at this point in the history

Commits on Jul 30, 2024

  1. Compute the schema1 DiffID list based on m.LayerInfos()

    We are already calling m.LayerInfos() anyway, so there is ~no
    extra cost. And using LayerInfos means we don't need to worry
    about reversing the order of layers, and we will have access
    to the layer index, allowing us to acccess the indexTo* fields
    in the future.
    
    Should not change behavior.
    
    Signed-off-by: Miloslav Trmač <mitr@redhat.com>
    mtrmac committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    b8c1dd7 View commit details
    Browse the repository at this point in the history
  2. Improve the documentation of layer identification

    - Don't claim that we only use compressed digests.
    - Explicitly document that we assume TOC digests to be unambiguous
    - Actually define the term "DiffID".
    - Be more precise in computeID about the criteria being layer identity,
      not where we pull the layer from.
    
    Should not change behavior.
    
    Signed-off-by: Miloslav Trmač <mitr@redhat.com>
    mtrmac committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    b520fad View commit details
    Browse the repository at this point in the history
  3. Allow returning (and reporting) unexpected errors from computeID

    Some errors are severe enough that just logging and continuing is
    not really worthwhile.
    
    Signed-off-by: Miloslav Trmač <mitr@redhat.com>
    mtrmac committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    e7a01b8 View commit details
    Browse the repository at this point in the history
  4. Centralize collecting _consistent_ layer data into trustedLayerIdenti…

    …tyDataLocked
    
    Currrently we "only" have indexToTOCDigest and blobDiffIDs, but we will make this
    more complex.
    
    Centralizing the consumption of these fields into trustedLayerIdentityDataLocked
    ensure that all consumers interpret the data exactly consistently (and it also
    allows us to use a single "trusted" variable instead of 2/3 individual ones).
    
    Should not change behavior.
    
    Signed-off-by: Miloslav Trmač <mitr@redhat.com>
    mtrmac committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    6dc3f0c View commit details
    Browse the repository at this point in the history
  5. Add TOC digest <-> uncompressed digest mapping to BIC

    The new code is not called, so it should not change behavior
    (apart from extending the BoltDB/SQLite schema).
    
    Signed-off-by: Miloslav Trmač <mitr@redhat.com>
    mtrmac committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    757d726 View commit details
    Browse the repository at this point in the history
  6. Set up storage destination to support TOC-based layers identified in …

    …storage by DiffID
    
    If we can, prefer identifying layers by DiffID, because multiple TOCs can map to the
    same DiffID; and because it maximizes reuse with non-TOC layers.
    
    For now, the new situation is unreachable.
    
    Signed-off-by: Miloslav Trmač <mitr@redhat.com>
    mtrmac committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    0ad8604 View commit details
    Browse the repository at this point in the history
  7. Split reusedBlobFromLayerLookup from tryReusingBlobAsPending

    We will add one more instance of this, so share the code.
    
    Should not change behavior (it does remove one unreachable code path).
    
    Signed-off-by: Miloslav Trmač <mitr@redhat.com>
    mtrmac committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    924d853 View commit details
    Browse the repository at this point in the history
  8. Use BlobInfoCache to share more layers if (TOC->Uncompressed) mapping…

    … is known
    
    - Multiple TOC values might correspond to a single DiffID (e.g. if different
      compression levels are used); try to share them all, identified by DiffID
      (so that we also reuse with non-TOC pulls).
      - LayersByTOCDigest only uses a single TOC digest per layer; BlobInfoCache
        allows multiple matches, matches layers which have been since deleted,
        and potentially matches TOC digests which we have created by pushing
        but haven't pulled yet.
    - On reuse, we can now use DiffID-based layer identities even if the reuse
      was TOC~driven.
    
    Signed-off-by: Miloslav Trmač <mitr@redhat.com>
    mtrmac committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    d910afa View commit details
    Browse the repository at this point in the history
  9. Record the (TOC digest, uncompressed digest) data when we compress la…

    …yers
    
    Signed-off-by: Miloslav Trmač <mitr@redhat.com>
    mtrmac committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    acdd064 View commit details
    Browse the repository at this point in the history
  10. Use the uncompressed digest we got from a BlobInfoCache for chunked l…

    …ayers
    
    - Rely on it instead of triggering the "untrusted DiffID" logic
    - Also propagate it to storage
    
    Signed-off-by: Miloslav Trmač <mitr@redhat.com>
    mtrmac committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    403d0a2 View commit details
    Browse the repository at this point in the history
  11. HACK: Don't compress with zstd:chunked when encrypting

    Signed-off-by: Miloslav Trmač <mitr@redhat.com>
    mtrmac committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    f49cb62 View commit details
    Browse the repository at this point in the history
  12. Merge pull request containers#2321 from mtrmac/chunked-bic

    Record (TOC digest → DiffID) mapping in BlobInfoCache
    rhatdan authored Jul 30, 2024
    Configuration menu
    Copy the full SHA
    0b130b8 View commit details
    Browse the repository at this point in the history

Commits on Aug 2, 2024

  1. ostree: rename a var

    This is to prevent codespell from complaining about pathc -> patch.
    
    Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
    kolyshkin committed Aug 2, 2024
    Configuration menu
    Copy the full SHA
    fa71578 View commit details
    Browse the repository at this point in the history
  2. pkg/shortnames: compact code

    Use ok instead of isT and isV, and limit the variables scope.
    
    Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
    kolyshkin committed Aug 2, 2024
    Configuration menu
    Copy the full SHA
    0b40d7d View commit details
    Browse the repository at this point in the history
  3. signature: fixup to silence codespell

    s/doesnt/does-not/
    
    Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
    kolyshkin committed Aug 2, 2024
    Configuration menu
    Copy the full SHA
    e5aa225 View commit details
    Browse the repository at this point in the history
  4. pkg/sysregistriesv2: silence codespell

    This just changes fo to f, without disrupting the test.
    
    Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
    kolyshkin committed Aug 2, 2024
    Configuration menu
    Copy the full SHA
    f6370dd View commit details
    Browse the repository at this point in the history
  5. copy: fix a comment

    This fixes a comment in the test code ("expection", "out", and
    punctuation) to the best of my knowledge.
    
    Fixes: c84a3fa ("copy/multiple_test: multiple copy requests of same compression")
    Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
    kolyshkin committed Aug 2, 2024
    Configuration menu
    Copy the full SHA
    adfc928 View commit details
    Browse the repository at this point in the history
  6. copy: fix a typo in log message

    Found by codespell 2.3.0:
    
    	Error: ./copy/single.go:217: resuing ==> reusing, resuming, rescuing
    
    Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
    kolyshkin committed Aug 2, 2024
    Configuration menu
    Copy the full SHA
    271ebf7 View commit details
    Browse the repository at this point in the history
  7. Simplify codespellrc, fix remaining typos

    Current .codespellrc contains too many exclusions, and as a result it
    misses some legitimate typos.
    
    A few previous commits silenced or fixed some of the codespell warnings
    in preparation for this one, which minimizes exclusions, and fixes the
    actual remaining typos.
    
    The fixes here are the result of codespell -w.
    
    ./copy/sign_test.go:119: overidden ==> overridden
    ./copy/encryption.go:51: pratice ==> practice
    ./copy/multiple_test.go:80: crated ==> created
    ./copy/progress_bars.go:124: progres ==> progress
    
    Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
    kolyshkin committed Aug 2, 2024
    Configuration menu
    Copy the full SHA
    e2e81f2 View commit details
    Browse the repository at this point in the history

Commits on Aug 5, 2024

  1. Merge pull request containers#2498 from kolyshkin/codespell

    Revamp codespell
    mtrmac authored Aug 5, 2024
    Configuration menu
    Copy the full SHA
    bc4cff0 View commit details
    Browse the repository at this point in the history
  2. fix(deps): update module golang.org/x/oauth2 to v0.22.0

    Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Aug 5, 2024
    Configuration menu
    Copy the full SHA
    a6202cb View commit details
    Browse the repository at this point in the history
  3. Merge pull request containers#2501 from containers/renovate/golang.or…

    …g-x-oauth2-0.x
    
    fix(deps): update module golang.org/x/oauth2 to v0.22.0
    mtrmac authored Aug 5, 2024
    Configuration menu
    Copy the full SHA
    14671d1 View commit details
    Browse the repository at this point in the history
  4. fix(deps): update module golang.org/x/sync to v0.8.0

    Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Aug 5, 2024
    Configuration menu
    Copy the full SHA
    b4ca7d1 View commit details
    Browse the repository at this point in the history
  5. Merge pull request containers#2502 from containers/renovate/golang.or…

    …g-x-sync-0.x
    
    fix(deps): update module golang.org/x/sync to v0.8.0
    mtrmac authored Aug 5, 2024
    Configuration menu
    Copy the full SHA
    a9d10af View commit details
    Browse the repository at this point in the history
  6. manifest: LayerInfos: preallocate the slice

    Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
    kolyshkin committed Aug 5, 2024
    Configuration menu
    Copy the full SHA
    5ffda1d View commit details
    Browse the repository at this point in the history
  7. Merge pull request containers#2499 from kolyshkin/prealloc

    manifest: LayerInfos: preallocate the slice
    mtrmac authored Aug 5, 2024
    Configuration menu
    Copy the full SHA
    7847869 View commit details
    Browse the repository at this point in the history
  8. Fix data returned when returning uncompressed data on a c/storage lay…

    …er match
    
    The rules expect us to set manifest editing updates.
    
    Signed-off-by: Miloslav Trmač <mitr@redhat.com>
    mtrmac committed Aug 5, 2024
    Configuration menu
    Copy the full SHA
    62f1024 View commit details
    Browse the repository at this point in the history
  9. Turn CandidateCompression into CandidateTemplateWithCompression

    ... and add CandidateWithLocation and CandidateWithUnknownLocation ,
    so that the BIC implementations only need to deal with one value
    instead of carrying around three; we will want to add one more,
    and encapsulating them all into a single template will make it
    transparent to the cache implementations.
    
    Should not change behavior.
    
    Signed-off-by: Miloslav Trmač <mitr@redhat.com>
    mtrmac committed Aug 5, 2024
    Configuration menu
    Copy the full SHA
    efdc639 View commit details
    Browse the repository at this point in the history
  10. Make the fields of CandidateWithTime private

    ... just because we now can, and to nudge all future caches to be designed
    around CandidateTemplateWithCompression.
    
    Should not change behavior.
    
    Signed-off-by: Miloslav Trmač <mitr@redhat.com>
    mtrmac committed Aug 5, 2024
    Configuration menu
    Copy the full SHA
    2b45d35 View commit details
    Browse the repository at this point in the history
  11. Reformat CandidateTemplateWithCompression a bit

    We will add more logic to the default case, so sharing the
    CandidateCompressionMatchesReuseConditions call is not going to be
    as easy. Split the two code paths.
    
    Should not change behavior.
    
    Signed-off-by: Miloslav Trmač <mitr@redhat.com>
    mtrmac committed Aug 5, 2024
    Configuration menu
    Copy the full SHA
    849938d View commit details
    Browse the repository at this point in the history
  12. Introduce blobinfocache.DigestCompressorData

    We will want to record more than a single alghoritm name. For now,
    just introduce the structure and modify users, we'll add the new fields
    later.
    
    Should not change behavior.
    
    Signed-off-by: Miloslav Trmač <mitr@redhat.com>
    mtrmac committed Aug 5, 2024
    Configuration menu
    Copy the full SHA
    d09a403 View commit details
    Browse the repository at this point in the history
  13. Always record only the base variant information about consumed source…

    … blobs
    
    ... because we don't trust the TOC data, if any.
    
    This allows us to remove the zstd:chunked hack; we, at least,
    now record those blobs as zstd.
    
    Signed-off-by: Miloslav Trmač <mitr@redhat.com>
    mtrmac committed Aug 5, 2024
    Configuration menu
    Copy the full SHA
    babdac8 View commit details
    Browse the repository at this point in the history

Commits on Aug 6, 2024

  1. Merge pull request containers#2503 from mtrmac/chunked-bic2-partial

    zstd:chunked refactoring for early review
    giuseppe authored Aug 6, 2024
    Configuration menu
    Copy the full SHA
    e3e9287 View commit details
    Browse the repository at this point in the history
  2. fix(deps): update module golang.org/x/crypto to v0.26.0

    Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Aug 6, 2024
    Configuration menu
    Copy the full SHA
    074735e View commit details
    Browse the repository at this point in the history
  3. Merge pull request containers#2504 from containers/renovate/golang.or…

    …g-x-crypto-0.x
    
    fix(deps): update module golang.org/x/crypto to v0.26.0
    mtrmac authored Aug 6, 2024
    Configuration menu
    Copy the full SHA
    55a2d1e View commit details
    Browse the repository at this point in the history
  4. Unrelated: Fix a bug in SQLite BlobInfoCache

    If we don't know an uncompressed digest, don't try using "".
    
    Signed-off-by: Miloslav Trmač <mitr@redhat.com>
    mtrmac committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    cb4dfed View commit details
    Browse the repository at this point in the history
  5. Fix a comment

    Should not change behavior.
    
    Signed-off-by: Miloslav Trmač <mitr@redhat.com>
    mtrmac committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    5dcb348 View commit details
    Browse the repository at this point in the history
  6. Add digest -> specific variant, annotation data to BIC

    The cache implementations are recording both the base and specific compression variant;
    CandidateLocations2 all call CandidateTemplateWithCompression to choose the
    appropriate variants to return based on CandidateLocations2Options.
    
    This way, neither the BIC implementations nor the transports are not responsible for
    converting zstd:chunked entries to zstd entries if the user wants the latter.
    
    Signed-off-by: Miloslav Trmač <mitr@redhat.com>
    mtrmac committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    f9d27e8 View commit details
    Browse the repository at this point in the history
  7. Record the specific variant, and TOC annotations, for blobs we compress

    Introduce distinct uploadedCompressorBaseVariantName and
    uploadedCompressorSpecificVariantName fields; that way we now never
    call RecordDigestCompressorData with inconsistent zstd / zstd:chunked in one field,
    so we can always record data when we see, or create, a zstd:chunked layer,
    removing the current hack.
    
    Signed-off-by: Miloslav Trmač <mitr@redhat.com>
    mtrmac committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    76af27c View commit details
    Browse the repository at this point in the history
  8. Extend private.ReusedBlob to allow zstd:chunked reuses

    - Add a CompressionAnnotations field
    - Allow turning a known-zstd blob into a zstd:chunked one if we
      know the right annotations
    
    This just adds the fields, nothing sets them yet, should not change behavior.
    
    Signed-off-by: Miloslav Trmač <mitr@redhat.com>
    mtrmac committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    243b49d View commit details
    Browse the repository at this point in the history
  9. Allow dockerImageDestination to reuse zstd:chunked blobs

    - Return the required annotations, if we have them
    - If we have a zstd blob and the BIC contains the annotations,
      we don't check for the blob's presence initially. In that case,
      don't skip it if we find the BIC annotations.
    
    Signed-off-by: Miloslav Trmač <mitr@redhat.com>
    mtrmac committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    ac2ca25 View commit details
    Browse the repository at this point in the history
  10. Detect zstd:chunked format in source blobs

    ... instead of only treating it as zstd.
    
    Signed-off-by: Miloslav Trmač <mitr@redhat.com>
    mtrmac committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    3d38dae View commit details
    Browse the repository at this point in the history

Commits on Aug 7, 2024

  1. Merge pull request containers#2487 from mtrmac/chunked-bic2

    Record zstd:chunked format, and annotations, in BlobInfoCache
    rhatdan authored Aug 7, 2024
    Configuration menu
    Copy the full SHA
    8c7c58c View commit details
    Browse the repository at this point in the history
  2. Bump to 5.32.1-dev

    Signed-off-by: Miloslav Trmač <mitr@redhat.com>
    mtrmac committed Aug 7, 2024
    Configuration menu
    Copy the full SHA
    5af61e0 View commit details
    Browse the repository at this point in the history

Commits on Aug 8, 2024

  1. Configuration menu
    Copy the full SHA
    c7233ee View commit details
    Browse the repository at this point in the history
  2. Release 5.32.1

    Signed-off-by: Miloslav Trmač <mitr@redhat.com>
    mtrmac committed Aug 8, 2024
    Configuration menu
    Copy the full SHA
    1064a5a View commit details
    Browse the repository at this point in the history
  3. Bump to 5.32.2-dev

    Signed-off-by: Miloslav Trmač <mitr@redhat.com>
    mtrmac committed Aug 8, 2024
    Configuration menu
    Copy the full SHA
    893740a View commit details
    Browse the repository at this point in the history