-
Notifications
You must be signed in to change notification settings - Fork 379
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 #2507
Commits on Aug 7, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 5af61e0 - Browse repository at this point
Copy the full SHA 5af61e0View commit details -
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>
Configuration menu - View commit details
-
Copy full SHA for dca0610 - Browse repository at this point
Copy the full SHA dca0610View commit details -
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>
Configuration menu - View commit details
-
Copy full SHA for 437b7fb - Browse repository at this point
Copy the full SHA 437b7fbView commit details -
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>
Configuration menu - View commit details
-
Copy full SHA for 59f1890 - Browse repository at this point
Copy the full SHA 59f1890View commit details -
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>
Configuration menu - View commit details
-
Copy full SHA for e405b01 - Browse repository at this point
Copy the full SHA e405b01View commit details -
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>
Configuration menu - View commit details
-
Copy full SHA for 3788220 - Browse repository at this point
Copy the full SHA 3788220View commit details -
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>
Configuration menu - View commit details
-
Copy full SHA for ad6d40d - Browse repository at this point
Copy the full SHA ad6d40dView commit details -
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>
Configuration menu - View commit details
-
Copy full SHA for 2c22da0 - Browse repository at this point
Copy the full SHA 2c22da0View commit details -
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>
Configuration menu - View commit details
-
Copy full SHA for cc25f17 - Browse repository at this point
Copy the full SHA cc25f17View commit details -
Record the (TOC digest, uncompressed digest) data when we compress la…
…yers Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Configuration menu - View commit details
-
Copy full SHA for 0e79045 - Browse repository at this point
Copy the full SHA 0e79045View commit details -
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>
Configuration menu - View commit details
-
Copy full SHA for 874ad0e - Browse repository at this point
Copy the full SHA 874ad0eView commit details -
HACK: Don't compress with zstd:chunked when encrypting
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Configuration menu - View commit details
-
Copy full SHA for 072a576 - Browse repository at this point
Copy the full SHA 072a576View commit details -
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>
Configuration menu - View commit details
-
Copy full SHA for 7292f9a - Browse repository at this point
Copy the full SHA 7292f9aView commit details -
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>
Configuration menu - View commit details
-
Copy full SHA for 6e33bdb - Browse repository at this point
Copy the full SHA 6e33bdbView commit details -
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>
Configuration menu - View commit details
-
Copy full SHA for d816552 - Browse repository at this point
Copy the full SHA d816552View commit details -
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>
Configuration menu - View commit details
-
Copy full SHA for b36f716 - Browse repository at this point
Copy the full SHA b36f716View commit details -
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>
Configuration menu - View commit details
-
Copy full SHA for 1ff3519 - Browse repository at this point
Copy the full SHA 1ff3519View commit details -
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>
Configuration menu - View commit details
-
Copy full SHA for 577b535 - Browse repository at this point
Copy the full SHA 577b535View commit details -
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>
Configuration menu - View commit details
-
Copy full SHA for 4df6647 - Browse repository at this point
Copy the full SHA 4df6647View commit details -
Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Configuration menu - View commit details
-
Copy full SHA for f4b5e90 - Browse repository at this point
Copy the full SHA f4b5e90View commit details -
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>
Configuration menu - View commit details
-
Copy full SHA for 08100b7 - Browse repository at this point
Copy the full SHA 08100b7View commit details -
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>
Configuration menu - View commit details
-
Copy full SHA for c2d35c0 - Browse repository at this point
Copy the full SHA c2d35c0View commit details -
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>
Configuration menu - View commit details
-
Copy full SHA for cced793 - Browse repository at this point
Copy the full SHA cced793View commit details -
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>
Configuration menu - View commit details
-
Copy full SHA for 0800e84 - Browse repository at this point
Copy the full SHA 0800e84View commit details -
Detect zstd:chunked format in source blobs
... instead of only treating it as zstd. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Configuration menu - View commit details
-
Copy full SHA for 2fff234 - Browse repository at this point
Copy the full SHA 2fff234View commit details -
Configuration menu - View commit details
-
Copy full SHA for a8aa8c4 - Browse repository at this point
Copy the full SHA a8aa8c4View commit details -
Configuration menu - View commit details
-
Copy full SHA for dda9562 - Browse repository at this point
Copy the full SHA dda9562View commit details