Skip to content

Conversation

@tollsimy
Copy link

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 16, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: tollsimy
Once this PR has been reviewed and has the lgtm label, please assign lsm5 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Contributor

@inknos inknos left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution @tollsimy , I think it's a good PR, but I'd consider using the same logic that podman cli uses for this call. see my comment at the code

but maybe you thought about it, so I would like to hear your opinion on the matter.

depending on this, tests will need to be adjusted accordingly :)

Comment on lines +381 to +392
if response.status_code == requests.codes.not_found:
self.podman_client.images.pull(
image,
auth_config=kwargs.get("auth_config"),
platform=kwargs.get("platform"),
policy=kwargs.get("policy", "missing"),
)
response = self.client.post(
"/containers/create",
headers={"content-type": "application/json"},
data=payload,
)
Copy link
Contributor

Choose a reason for hiding this comment

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

I was curious to see what podman cli does when you call create, so I tried. when you do podman-remote create you get a pull call no matter if the image is cached or not

POST /v5.7.0/libpod/images/pull
POST /v5.7.0/libpod/containers/create

therefore I would simply remove the if and try to pull every time you create

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.

3 participants