Skip to content

composefs-oci: logging and FileBackedData prep for the skopeo import - #418

Merged
cgwalters merged 4 commits into
composefs:mainfrom
giuseppe:splitfdstream-from-skopeo-prep
Oct 19, 2026
Merged

cgwalters merged 4 commits into
composefs:mainfrom
giuseppe:splitfdstream-from-skopeo-prep

Conversation

@giuseppe

Copy link
Copy Markdown
Collaborator

preparation work for: #417

Signed-off-by: Giuseppe Scrivano <giuseppe@scrivano.org>
Take the already-built `GetLayerParams` instead of a storage path, a
layer ID and a `consumer_has_cap_dac_override` flag, and build it at
each call site.  That drops three of the seven parameters (and with
them the `too_many_arguments` exemption), and lets callers that locate
a layer some other way than by storage path reuse the function.

Make it `pub(crate)` for the same reason.

Signed-off-by: Giuseppe Scrivano <giuseppe@scrivano.org>
Whether a file arrived as bytes over the pipe or was opened by us from
a delegated containers-storage dirfd is the whole point of the
splitdirfdstream transfer, and today nothing reports it.  Count both
while draining and log the summary, with a trace line per file.

Signed-off-by: Giuseppe Scrivano <giuseppe@scrivano.org>
A FileBackedData chunk names the file holding a tar entry's content,
and a tar entry name need not be UTF-8.  The format carries the name as
bytes, but drain_splitdirfdstream rejected anything that was not UTF-8,
so a layer with such a name failed to import, or forced the producer to
send its content inline.

Open the name as the bytes it is, and only use a lossy rendering of it
in messages.

Signed-off-by: Giuseppe Scrivano <giuseppe@scrivano.org>
Assisted-by: AI
);
}

/// A tar entry name need not be UTF-8, so neither does the name a

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.

This looks sane, but it'd probably also make sense to have an integration test that reuses some kind of "pathological container image" I think we share in multiple places perhaps? e.g. also exercise path names near PATH_MAX etc

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.

2 participants