-
-
Notifications
You must be signed in to change notification settings - Fork 419
Add podman connector #1354
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
Add podman connector #1354
Conversation
The failing test (below) has nothing to do with this MR, and it succeeded after a re-run while developing this MR.
|
025d0d0
to
b024498
Compare
Pinned/locked dependencies would address this but that's a much larger change with other implications.
b024498
to
1fa622e
Compare
Considering how the docker connector testing code works, and how the podman connector is basically a string substituted docker connector, I don't think the tests_docker.py can ever find any errors with the podman connector. It may just be better to not include/adapt the tests_docker.py, and instead let the end2end tests verify no string substitution was missed or wrong. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Griffoen this is awesome, thank you so much for working on this. I think the testing is fine too even if duplicated it's only a tiny amount of time to execute and means we're covering any code drift. I just pushed up the e2e test as well for coverage there. Good to go!
As mentioned on Matrix this connector is going to be included in main because of it's overlap with the docker connector (and common interchangable use in real world).
The Podman CLI is compatible with the Docker CLI, so I refactored the docker connector to create the Podman connector.
This enables users of distros which prefer Podman over Docker to test their deployments more easily.
The Podman connector works exactly like the docker connector, for example:
pyinfra @podman/fedora:42 dnf.packages packages=uv -y
I copied the docker tests in
/tests/test_connectors/test_docker.py
for the Podman tests.However, I omitted the
/test/end-to-end/test_e2e_docker.py
tests since I don't know how they are supposed to be set up, and I don't have docker installed to run the tests.