-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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
docker_* modules: unify docker module version checks #47046
Conversation
5c08ed0
to
563e3e4
Compare
563e3e4
to
2e6630a
Compare
Hi @felixfontein, thank you for submitting this pull-request! |
bot_status |
Componentslib/ansible/module_utils/docker_common.py lib/ansible/modules/cloud/docker/docker_container.py lib/ansible/modules/cloud/docker/docker_image.py lib/ansible/modules/cloud/docker/docker_image_facts.py lib/ansible/modules/cloud/docker/docker_login.py lib/ansible/modules/cloud/docker/docker_network.py lib/ansible/modules/cloud/docker/docker_secret.py lib/ansible/modules/cloud/docker/docker_service.py lib/ansible/modules/cloud/docker/docker_swarm.py lib/ansible/modules/cloud/docker/docker_swarm_service.py lib/ansible/modules/cloud/docker/docker_volume.py Metadatawaiting_on: maintainer |
@jwitko You have to use @dariko @kassiansun @tbouvet Can you take a look here? This affects all |
@felixfontein Thanks! still learning the bot :) |
shipit |
shipit |
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.
I like min_docker_api_version
(I'll create backport PRs once #47274 is merged, they will then include both PRs.) |
@felixfontein it's all good, I just thought I was losing it 😄 |
* Unify docker module version checks. * Improve messages depending on required docker-py versions. * Linting. (cherry picked from commit 32e8251)
(cherry picked from commit 89f239f)
* Unify docker module version checks. * Improve messages depending on required docker-py versions. * Linting. (cherry picked from commit 32e8251)
* Add docker_config module * Address review comments * Merge description lines * Stop returning empty config_id in results * Add integration tests for docker_config Based on docker_secret's tests. * Ensure swarm using docker_swarm module * Add minimum docker / docker api version requirements ref: #47046 * Check Docker API version before running tests ref: #47340 * Typo * Wording * Improve example * Assert state == absent is idempotent
* Unify docker module version checks. * Improve messages depending on required docker-py versions. * Linting. (cherry picked from commit 32e8251)
(cherry picked from commit 89f239f)
The docker_swarm module seems to have been working fine with API version 1.30 before this fix. (It does not seem like there were any swarm-related API changes between 1.30 and 1.35, I'm not sure how the API version 1.35 minimum requirement was obtained...) (I'm not using all of its functionality either...) This breaks the docker_swarm module with the docker-ee version (17.06) required for UCP <= 3.0.x. It worked with Ansible 2.7.0. (I am aware that 1.35 has always been the documented minimum API version) |
* Unify docker module version checks. * Improve messages depending on required docker-py versions. * Linting.
* Add docker_config module * Address review comments * Merge description lines * Stop returning empty config_id in results * Add integration tests for docker_config Based on docker_secret's tests. * Ensure swarm using docker_swarm module * Add minimum docker / docker api version requirements ref: ansible#47046 * Check Docker API version before running tests ref: ansible#47340 * Typo * Wording * Improve example * Assert state == absent is idempotent
SUMMARY
Allows to specify minimum docker-py version and minimum docker API versions to
AnsibleDockerClient
. (See discussion here.)Simplifies/superseeds #46527, #46797, helps #38792.
ISSUE TYPE
COMPONENT NAME
lib/ansible/module_utils/docker_common.py
docker_container
docker_image
docker_image_facts
docker_login
docker_network
docker_secret
docker_service
docker_swarm
docker_swarm_service
docker_volume
ANSIBLE VERSION