Skip to content

Use the new ocidir-rs archive support - #315

Merged
alexlarsson merged 8 commits into
mainfrom
delta-archive
Sep 9, 2026
Merged

Use the new ocidir-rs archive support#315
alexlarsson merged 8 commits into
mainfrom
delta-archive

Conversation

@alexlarsson

Copy link
Copy Markdown
Contributor

With this we can pull (both regular and delta) images directly from an oci-archive without using the container image proxy.

NOTE: This is draft, because the first commit updates some dependencies to random commits. We really need a new release of oci-dir and containers-image-proxy for this to be clean.

@alexlarsson
alexlarsson marked this pull request as draft June 17, 2026 16:13
@cgwalters

Copy link
Copy Markdown
Collaborator

Looks sane offhand, but let's get releases of the dependent crates out.

@alexlarsson

Copy link
Copy Markdown
Contributor Author

@cgwalters I really thought there would be something like the BlockingReader helper somewhere already, but I was unable to find it...

Comment thread crates/composefs-oci/src/oci_layout.rs Outdated
@alexlarsson

Copy link
Copy Markdown
Contributor Author

I refreshed this, including some fixes for test failures and (hopefully) enabling the delta tests in CI.

@alexlarsson
alexlarsson marked this pull request as ready for review September 7, 2026 12:30
…n boot

If boot is not enabled (for instance if you run just cargo test -o
composefs-oci) it is not, and this test fails.

Signed-off-by: Alexander Larsson <alexl@redhat.com>
Signed-off-by: Alexander Larsson <alexl@redhat.com>
Signed-off-by: Alexander Larsson <alexl@redhat.com>
This will be useful later when we start using OciDir for this, as it
needs the full descriptor, including the size.

Signed-off-by: Alexander Larsson <alexl@redhat.com>
Assisted-by: Claude Code (Opus 4.6)
Signed-off-by: Alexander Larsson <alexl@redhat.com>
The implementation copies the data from a blocking thread via a
tokio::io::duplex, with a oneshot side channel for partial read
errors.

Signed-off-by: Alexander Larsson <alexl@redhat.com>
This makes the checks slighly more robust, and will allow us to reuse
this in two codepaths later on.

Signed-off-by: Alexander Larsson <alexl@redhat.com>
This way we can later support reading delta parts directly
from streams that are not files, such as those inside an
oci archive.

This uses BlockingReader to convert the sync stream to
an async reader instead of tokio::fs::File::from_std().

Signed-off-by: Alexander Larsson <alexl@redhat.com>
This applies to both pulling deltas and regular images and uses
OciArchive::open() if the source is an uncompressed tar file.

This relies on OciDir now supprrting this, as well as earlier work to
generalize handling of stream types.

Note: For compressed tar archives we fall back to the skopeo proxy
like we did before, as this supports automatic uncompression.

Signed-off-by: Alexander Larsson <alexl@redhat.com>
@alexlarsson

Copy link
Copy Markdown
Contributor Author

rebased on main

@giuseppe giuseppe left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alexlarsson
alexlarsson added this pull request to the merge queue Sep 9, 2026
Merged via the queue into main with commit 23d75fe Sep 9, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants