Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pulling a wrong image doesn't raise any error. #301

Open
Alex-Izquierdo opened this issue Jul 6, 2023 · 2 comments
Open

Pulling a wrong image doesn't raise any error. #301

Alex-Izquierdo opened this issue Jul 6, 2023 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@Alex-Izquierdo
Copy link

Library version: 4.5.1
Podman version: 3.4.7 and 4.5.1

How to reproduce:

In [25]: from podman import PodmanClient

In [26]: client = PodmanClient(base_url="unix:///run/user/1000/podman/podman.sock")

In [27]: image = client.images.pull("docker.io/library/python:3.11")

In [28]: image.id
Out[28]: 'c0e63845ae986c52da5cd6ac4d56eebf293439bb22a3cee198dd818fd12ba555'

In [29]: image = client.images.pull("wat/ough")

In [30]: image.id

In [31]: image = client.images.pull("docker.io/library/python:3.1415")

In [32]: image.id

In [33]: 

Expected result:
It should raise APIError or ImageNotFound

@umohnani8 umohnani8 added the help wanted Extra attention is needed label Jan 23, 2024
@luebke-dev
Copy link

Thats true the pull function uses raise_for_status to catch a 404 not found but the podman api actually returns a 200 with

200
{"stream":"Trying to pull docker.io/libarasd/lego:latest...\n"}
{"error":"initializing source docker://libarasd/lego:latest: reading manifest latest in docker.io/libarasd/lego: requested access to the resource is denied"}

@luebke-dev
Copy link

containers/podman#22105

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants