Skip to content

Introduce a Transport enum for container images - #120

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

cgwalters merged 1 commit into
bootc-dev:mainfrom
Johan-Liebert1:transport-enum

Conversation

@Johan-Liebert1

Copy link
Copy Markdown
Member

Transport enum for different container image backends (registry, oci, etc.) TryFrom<&str> implementation for parsing transport prefixes from image references Display impl for Transport

Tests generated by Claude Code

Assisted-by: Claude Code (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 Transport enum to represent different container image backends, along with parsing logic from image reference strings. The implementation is well-tested. My review includes suggestions to make the code more idiomatic and readable, such as deriving standard traits for the enum, simplifying the Display and TryFrom implementations, and improving test clarity and assertions.

Comment thread src/transport.rs Resolved
Comment thread src/transport.rs Resolved
Comment thread src/transport.rs Resolved
Comment thread src/transport.rs Resolved
Comment thread src/transport.rs Resolved
Transport enum for different container image backends (registry, oci, etc.)
TryFrom<&str> implementation for parsing transport prefixes from image references
Display impl for Transport

Tests generated by Claude Code

Assisted-by: Claude Code (Sonnet 4)
Signed-off-by: Pragyan Poudyal <[email protected]>

@cgwalters cgwalters left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Fine as is, however: we can also now take the opportunity to do a semver break and have our APIs accept not just an image string but a struct that combines transport + name, like we have in bootc.

@cgwalters
cgwalters merged commit bf4dac9 into bootc-dev:main Jan 23, 2026
@cgwalters

Copy link
Copy Markdown
Member

Fine as is, however: we can also now take the opportunity to do a semver break and have our APIs accept not just an image string but a struct that combines transport + name, like we have in bootc.

I thought about this, no need to break semver for now, I just went with new APIs

#121

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