-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Enhance support for Podman API in Docker client #8349
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
Conversation
0d60dba
to
0ffa62a
Compare
42b0b25
to
25110d1
Compare
aa5ff5b
to
bf1d596
Compare
1a471a5
to
5b86a3b
Compare
a7a26fc
to
98fdb6e
Compare
0490d44
to
d24f54e
Compare
49f2b26
to
4990a44
Compare
|
@@ -180,21 +179,6 @@ def localstack_runtime(): | |||
return | |||
|
|||
|
|||
@pytest.fixture |
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.
minor refactoring: moving this fixture to API Gateway tests module (no functional change)
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.
Changes LGTM. Love to see the podman support being tested 👍
I'm OK merging it as is for now. Having said that, at this point, I would have preferred introdcing a PodmanContainerClient
class implementation that inherits from the docker sdk client, but isolates the peculiarities of podman into the implementation, rather than putting something like strip_wellknown_repo_prefixes
into the base abstraction.
Anyway, nice work!
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.
LGTM! I agree that we should create a separate client class in the next iteration :)
Concerning the bump type: I would say it's a minor change. But this doesn't mean that it needs to be behind a feature flag right now. We currently only block breaking changes from being merged to master
.
@thrau @alexrashed +1 , totally agree - let's pull it out into a separate client in the next iteration. Was very much on the fence whether to extend the base interface here (especially the We'll need to extend the logic in |
Enhance support for targeting Podman API with our Docker client. Running on Podman has been increasingly requested by some customers recently, and during testing we've identified some gaps and discrepancies between the Docker API and Podman API responses (see also previous PR #8333).
Design Notes
This PR aims to be a starting point to address Podman support more systematically, and also have it covered by tests (we can reuse our excellent Docker client test suite for that purpose). Some/most of the existing Docker client tests are already working against Podman, and a new test marker
@skip_for_podman
has been introduced to temporarily skip failing tests for now. The goal would be to make all test pass over time, and then remove the@skip_for_podman
marker.The initial idea was to create a derived
PodmanClient
and inherit the functionality from the Docker client, but it turns out that the two platforms are sufficiently similar to handle both targets in a single client implementation. The majority of compatibility switches (especially in theCmdDockerClient
class) is to handle slightly different response payloads or error messages returned by thedocker
vspodman
commands.The PR introduces a new CI build workflow to run the Podman Docker client tests in a separate build, whenever any of the relevant files are changing.
Patch vs minor release
Currently the changes are targeting a simple patch release and are not behind a feature flag (arguably shouldn't be breaking, as so far we didn't officially support Podman, and our Docker test coverage is pretty decent). I'm open to discussion, though, whether we want to add the compatibility mode behind a feature flag for now. 👍
Summary of changes
strip_wellknown_repo_prefixes
utility to strip off well-known image repo names likelocalhost/
ordocker.io/library/
which are added by the Podman API, but not by Docker