Skip to content

libimage: clarify local image transport error - #1044

Open
Rajkaran-122 wants to merge 1 commit into
podman-container-tools:mainfrom
Rajkaran-122:libimage-clarify-local-transport-error
Open

libimage: clarify local image transport error#1044
Rajkaran-122 wants to merge 1 commit into
podman-container-tools:mainfrom
Rajkaran-122:libimage-clarify-local-transport-error

Conversation

@Rajkaran-122

Copy link
Copy Markdown

Summary

Runtime.LookupImage rejects non-storage transport references for local image lookups. The previous error identified the unsupported transport but did not explain how to refer to a locally stored image.

Clarify that the lookup operates on local storage and instruct users to remove the transport prefix while preserving the existing rejection behavior.

Changes

  • improve the Runtime.LookupImage error message for unsupported transports
  • extend TestLookupImage to cover docker:// references
  • preserve existing lookup and error propagation behavior

Testing

  • added a lookup test for docker:// references
  • ran gofmt
  • ran git diff --check

The focused lookup test was attempted locally but exceeded the execution limit because the existing test pulls Alpine.

@github-actions github-actions Bot added the common Related to "common" package label Jul 30, 2026
@Rajkaran-122

Copy link
Copy Markdown
Author

It looks like the Packit job is failing before the build starts due to invalid chroot parameters rather than a build or test failure. Please let me know if there's anything I should update in this PR, or if this is a CI configuration issue.

@mtrmac mtrmac left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks.

The user explicitly asked for a registry image. Nothing suggests the user wants to refer to a local image. In such a situation, sure, the user is probably confused either about what is the operation being attempted, or about what the inputs mean.

But why is it helpful to tell the user how to refer to a local image? That might allow the user to “proceed” without actually clearing up any misunderstandings — potentially resulting in more damage when the user does not understand what is going to happen.

A reminder: https://github.com/podman-container-tools/podman/blob/main/LLM_POLICY.md .

Signed-off-by: Rajkaran Yadav <yadavrajkaran854@gmail.com>
@Rajkaran-122
Rajkaran-122 force-pushed the libimage-clarify-local-transport-error branch from 1064940 to c5f925a Compare July 31, 2026 05:50
@Rajkaran-122

Rajkaran-122 commented Jul 31, 2026

Copy link
Copy Markdown
Author

@TomSweeneyRedHat ,Thanks @mtrmac . I’ve addressed the requested change by removing the suggestion to remove the transport prefix. The error now only clarifies that LookupImage supports local-storage image references, without assuming the user’s intent. The corresponding test has also been updated.

Could you please take another look when convenient?

@Rajkaran-122

Copy link
Copy Markdown
Author

Thanks.

The user explicitly asked for a registry image. Nothing suggests the user wants to refer to a local image. In such a situation, sure, the user is probably confused either about what is the operation being attempted, or about what the inputs mean.

But why is it helpful to tell the user how to refer to a local image? That might allow the user to “proceed” without actually clearing up any misunderstandings — potentially resulting in more damage when the user does not understand what is going to happen.

A reminder: https://github.com/podman-container-tools/podman/blob/main/LLM_POLICY.md .

Thanks @mtrmac . I’ve addressed the requested change by removing the suggestion to remove the transport prefix. The error now only clarifies that LookupImage supports local-storage image references, without assuming the user’s intent. The corresponding test has also been updated.

Could you please take another look when convenient?

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

Labels

common Related to "common" package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants