Skip to content

Conversation

@mtrmac
Copy link
Contributor

@mtrmac mtrmac commented Dec 6, 2025

DO NOT MERGE: This is on top of #530 .

Add private.ImageReference.NewImageSourceWithOptions, and use it to pass digests.Options to transports that might need to compute digests.

Fully implement that in sif: and tarball:.

For docker-deamon: and docker-archive:, use digests.Options for the config digest, but do not use it for layers, to avoid an extra cost. See the detailed added comment for rationale. This also does not modify the destination parts of these transports at all.

Also 2 sort-of-unrelated bug fixes.

See individual commit messages for details.

Cc: @lsm5 (low priority)

mtrmac added 12 commits December 6, 2025 00:31
The goal is to allow building the digest-choice-dependent machinery
from the bottom up without committing to an API while we don't understand
the problem space; for now, we don't expose any way for users to
actually make a choice.

This code is never called at this point, so this should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
for now, purely to let us internally work on implementing digest
choice / conversions; there is no way for a caller to set it.

Should not change behavior, the field has no users.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Currently it is only called in oci/archive and openshift to forward
to another transport; real users will be added later.

Should not change behavior (yet).

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This will make it a bit easier to use NewImageSourceOptions for transports
that might only implement the public types.ImageReference.

This commit does not (yet) add any callers, so this should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
…r-daemon:

Note that we DO NOT use options.Digest for the layer IDs; that would require
extra CPU cost to digest files more than once.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
@github-actions github-actions bot added the image Related to "image" package label Dec 6, 2025
@mtrmac
Copy link
Contributor Author

mtrmac commented Dec 6, 2025

Not to self: Absolutely untested at this point.

@mtrmac mtrmac marked this pull request as draft December 6, 2025 02:04
podmanbot pushed a commit to podmanbot/buildah that referenced this pull request Dec 6, 2025
@podmanbot
Copy link

✅ A new PR has been created in buildah to vendor these changes: containers/buildah#6574

@packit-as-a-service
Copy link

Packit jobs failed. @containers/packit-build please check.

1 similar comment
@packit-as-a-service
Copy link

Packit jobs failed. @containers/packit-build please check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

image Related to "image" package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants