libartifact: skip bare tag names from OCI layout annotations - #1027
Open
saschagrunert wants to merge 1 commit into
Open
libartifact: skip bare tag names from OCI layout annotations#1027saschagrunert wants to merge 1 commit into
saschagrunert wants to merge 1 commit into
Conversation
|
Packit jobs failed. @containers/packit-build please check. |
1 similar comment
|
Packit jobs failed. @containers/packit-build please check. |
External tools like skopeo write only the tag portion (e.g. "1.14.4") into the org.opencontainers.image.ref.name annotation in index.json. Consumers that call ParseNormalizedNamed on the artifact name would turn this into the nonsensical "docker.io/library/1.14.4". Detect names without a "/" as bare tags and skip setting them. Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
saschagrunert
force-pushed
the
fix-artifact-bare-tag-name
branch
from
July 27, 2026 11:39
4b754dc to
464328f
Compare
mtrmac
reviewed
Jul 27, 2026
mtrmac
left a comment
Contributor
There was a problem hiding this comment.
Thanks,
I’m inclined to say this is unsupported.
- (Skopeo writes whatever name the user put into the reference.)
- AFAIK,
common/pkg/libartifact, just like c/storage, is an internal implementation detail subject to change, and external access by other tools is not expected. E.g. there is a lock file which other tools are not going to work with.
@baude WDYT?
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.
External tools like skopeo write only the tag portion (e.g.
1.14.4) into theorg.opencontainers.image.ref.nameannotation inindex.jsonwhen creating OCI layouts. This is correct per the OCI image layout spec, which defines the annotation as a local reference name within the layout. Consumers that callParseNormalizedNamedon the artifact name would turn this into the nonsensicaldocker.io/library/1.14.4. This PR detects names without a/as bare tags and skips setting them, so the artifact remains unnamed rather than getting a wrong name.Reported in cri-o/cri-o#10151.