Repository navigation
cache: update media type metadata when linking blob with matching digest - #7320
Closed
AdamMagued wants to merge 1 commit into
Closed
AdamMagued wants to merge 1 commit into
AdamMagued wants to merge 1 commit into
Conversation
Signed-off-by: AdamMagued <adamismailmageud@gmail.com>
Member
|
I'm closing this PR for the same account-activity concerns described in #7319. This change has a plausible technical basis, but it proceeds without resolving the scope question already raised on the linked issue. @tonistiigi questioned whether BuildKit should repair malformed image metadata, and the reporter agreed that the root bug belongs in Moby, suggesting clearer diagnostics as an acceptable BuildKit improvement: #7308 (comment) and #7308 (comment). Automatically correcting the metadata needs agreement on that behavior before implementation. If I've misread the situation, please contact us through the community Slack. I'm open to correcting my judgment. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update ref media type metadata when linking a converted blob with an identical digest.
When a layer was already compressed with the target algorithm (such as zstd) but labeled with a different media type (such as gzip), layer conversion produces a descriptor with the same digest but updated media type. linkBlob previously returned early without updating the ref's media type metadata, and walkBlobVariantsOnly skipped matching digests, causing getBlobWithCompression to fail with ErrNotFound.
Updated linkBlob to queue the updated media type when desc.Digest == blobDigest, and updated walkBlob to inspect the content store descriptor if its media type differs from the ref descriptor.
Fixes #7308