Skip to content

Add ImageReference struct combining Transport + name - #121

Merged
cgwalters merged 1 commit into
bootc-dev:mainfrom
cgwalters:image-transport
Jan 23, 2026
Merged

cgwalters merged 1 commit into
bootc-dev:mainfrom
cgwalters:image-transport

Conversation

@cgwalters

Copy link
Copy Markdown
Member

This follows the pattern from bootc's ostree-ext crate, allowing APIs to accept structured types instead of raw strings.

Assisted-by: OpenCode (Claude Sonnet 4)

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new ImageReference struct to provide a structured way of representing container image references, combining a transport and a name. This is a great improvement over using raw strings, enhancing type safety and API clarity. The changes are well-implemented with thorough documentation and tests. New API endpoints open_image_ref and open_image_optional_ref are added to ImageProxy to accept the new ImageReference type. The implementation of ImageReference parsing from a string is robust and covers various transports and formats. I have one minor suggestion to make the parsing logic more idiomatic.

Comment thread src/transport.rs Resolved
Comment thread src/transport.rs Resolved
This follows the pattern from bootc's ostree-ext crate, allowing APIs
to accept structured types instead of raw strings.

Assisted-by: OpenCode (Claude Sonnet 4)
Signed-off-by: Colin Walters <[email protected]>
@cgwalters
cgwalters merged commit cf6f5f3 into bootc-dev:main Jan 23, 2026
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