-
Notifications
You must be signed in to change notification settings - Fork 102
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
Container inspection fails with podman #472
Comments
Thanks for the report! I'm open to a pull request with the fix and a unit test (we have some dummy json files that we try to load into the model, we just need to add one example there). If no one does the PR, I'll make it myself but I don't guarantee it's going to be quick. |
With podman, `container inspect` returns signal codes as integers, for example "StopSignal": 15 The current typing is `Optional[str]` which when enforced via pydantic, fails to parse response from podman. Fixes gabrieldemarmiesse#472 Signed-off-by: Amit Prakash Ambasta <amit.prakash.ambasta@gmail.com>
Sure, fired a PR. Is there a way I can test the PR locally before pushing again (without having docker installed) |
Sadly we only support docker for unit testing but I would like some day to support podman and nerdctl too. I'll take a look at the PR, thanks! |
In
components.container.models.ContainerConfig
,stop_signal
only accepts strings. Podman otoh, responds withStopSignal: 15
, i.e. integer values.The line
python-on-whales/python_on_whales/components/container/models.py
Line 218 in d885139
should probably be
stop_signal: Optional[str | int] = None
The text was updated successfully, but these errors were encountered: