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

Improve/fix API version handling #389

Merged

Conversation

felixfontein
Copy link
Collaborator

SUMMARY

Right now we retrieve the API version (the latest one supported by the daemon!) from the Docker daemon after creating the Docker SDK for Python API client. If the version module/plugin parameter is used, we should use that version instead, and if it is not used, the Python API client already retrieved that version for us. So let's safe one API call and use the API version supplied by the Python API client.

(The property exists since Docker SDK for Python 1.5.0: docker/docker-py@7a6980d We require version 1.8.0 or newer, so we can depend on it.)

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

Docker SDK for Python based plugins and modules

felixfontein added a commit to felixfontein/community.docker that referenced this pull request Jun 18, 2022
@felixfontein felixfontein changed the title Improve API version handling Improve/fix API version handling Jun 18, 2022
@felixfontein felixfontein merged commit a44e073 into ansible-collections:main Jun 20, 2022
@patchback
Copy link
Contributor

patchback bot commented Jun 20, 2022

Backport to stable-1: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-1/a44e0736cfe5bfc8c40316cb761c05b906eae0c3/pr-389

Backported as #391

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@felixfontein felixfontein deleted the api-version-check branch June 20, 2022 05:34
patchback bot pushed a commit that referenced this pull request Jun 20, 2022
@felixfontein
Copy link
Collaborator Author

@briantist thanks for reviewing this!

felixfontein added a commit that referenced this pull request Jun 20, 2022
(cherry picked from commit a44e073)

Co-authored-by: Felix Fontein <[email protected]>
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.

2 participants