This repository was archived by the owner on Oct 3, 2026. It is now read-only.
Repository navigation
feat(differ): emit native EROFS layers from Compare - #43
Merged
Merged
Conversation
Compare now honors diff.WithMediaType(images.MediaTypeErofsLayer): the tar diff is streamed through mkfs.erofs with the same options as the Apply/pull path (uncompressed, 4KiB blocks, --aufs whiteouts - fsmeta-merge compatible) and the staged image is committed to the content store as-is. The diff ID for native EROFS layers is the blob digest itself, recorded in the containerd.io/uncompressed label like the other media types, so commit flows read it uniformly. Images committed with this media type skip the tar->EROFS reconversion on every subsequent pull/unpack within the stack (Apply already consumed the official media type natively). tar+gzip remains the default for OCI portability. integration-commit gains -native-erofs and test_image_commit exercises both flows end-to-end: Compare -> manifest/config -> Prepare+Apply+Commit -> image verification. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
Compare now honors
diff.WithMediaType(images.MediaTypeErofsLayer)(application/vnd.erofs.layer.v1). Stacked on #42.mkfs.erofswith the same options as the Apply/pull path (uncompressed, 4KiB blocks,--aufswhiteouts), so the emitted layer is fsmeta-merge compatible — committed images mount through the merged fsmeta/VMDK like pulled ones.containerd.io/uncompressedlabel so commit flows read the diff ID uniformly across media types.Applyalready consumed the official media type natively).tar+gzipremains the default for OCI portability — this is opt-in per Compare call.mkfs.erofsneeds a seekable output file, so the conversion stages through a temp file wired with anio.Pipe; the pipe is closed from the converter side to unblock the tar producer when mkfs stops reading at the end-of-archive marker. Blobs are not byte-reproducible across runs (random mkfs UUID — the pull path keys it on the layer digest, unknown here until conversion ends).Validation
TestWriteAndCommitDiffNativeErofs(Linux + mkfs.erofs): asserts the committed blob parses as EROFS with 4KiB blocks and that the uncompressed label equals the blob digest.TestCompressionTypeFromMediaTypeErofscovers media type acceptance incl.+suffixrejection.integration-commitgains-native-erofs;test_image_commitnow runs the full commit flow twice (tar+gzip and native EROFS), ending in image verification (layer count, top diff ID, unpacked).task fmt && task lint && task testgreen (lint clean on golangci 2.11/2.12).🤖 Generated with Claude Code