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

docker_* modules: unify docker module version checks #47046

Merged
merged 3 commits into from
Oct 18, 2018

Conversation

felixfontein
Copy link
Contributor

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
  • Bugfix Pull Request
  • Docs Pull Request
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
2.8.0

@ansibot
Copy link
Contributor

ansibot commented Oct 15, 2018

Hi @felixfontein, thank you for submitting this pull-request!

click here for bot help

@ansibot ansibot added affects_2.8 This issue/PR affects Ansible v2.8 bug This issue/PR relates to a bug. cloud community_review In order to be merged, this PR must follow the community review workflow. docker module This issue/PR relates to a module. needs_maintainer Ansibot is unable to identify maintainers for this PR. (Check `author` in docs or BOTMETA.yml) needs_triage Needs a first human triage before being processed. owner_pr This PR is made by the module's maintainer. support:community This issue/PR relates to code supported by the Ansible community. labels Oct 15, 2018
@ansibot ansibot removed the needs_triage Needs a first human triage before being processed. label Oct 15, 2018
@felixfontein
Copy link
Contributor Author

bot_status

@ansibot
Copy link
Contributor

ansibot commented Oct 16, 2018

Components

lib/ansible/module_utils/docker_common.py
support: community
maintainers: dariko felixfontein jwitko kassiansun tbouvet

lib/ansible/modules/cloud/docker/docker_container.py
support: community
maintainers: chouseknecht cove dusdanig felixfontein joshuaconner kassiansun softzilla zfil

lib/ansible/modules/cloud/docker/docker_image.py
support: community
maintainers: chouseknecht softzilla

lib/ansible/modules/cloud/docker/docker_image_facts.py
support: community
maintainers: chouseknecht

lib/ansible/modules/cloud/docker/docker_login.py
support: community
maintainers:

lib/ansible/modules/cloud/docker/docker_network.py
support: community
maintainers: chouseknecht keitwb olsaki

lib/ansible/modules/cloud/docker/docker_secret.py
support: community
maintainers:

lib/ansible/modules/cloud/docker/docker_service.py
support: community
maintainers: chouseknecht

lib/ansible/modules/cloud/docker/docker_swarm.py
support: community
maintainers:

lib/ansible/modules/cloud/docker/docker_swarm_service.py
support: community
maintainers:

lib/ansible/modules/cloud/docker/docker_volume.py
support: community
maintainers:

Metadata

waiting_on: maintainer
changes_requested_by: null
needs_info: False
needs_revision: False
needs_rebase: False
merge_commits: []
too many files or commits: False
mergeable_state: clean
shippable_status: success
maintainer_shipits (module maintainers): 0
community_shipits (namespace maintainers): 0
ansible_shipits (core team members): 1
shipit_actors (maintainers or core team members): felixfontein
shipit_actors_other: []
automerge: automerge shipit test failed

click here for bot help

@felixfontein
Copy link
Contributor Author

@jwitko You have to use shipit or LGTM to have any effect :)

@dariko @kassiansun @tbouvet Can you take a look here? This affects all docker_* modules.

@jwitko
Copy link
Contributor

jwitko commented Oct 17, 2018

@felixfontein Thanks! still learning the bot :)

@jwitko
Copy link
Contributor

jwitko commented Oct 17, 2018

shipit

@ansibot ansibot added shipit This PR is ready to be merged by Core and removed community_review In order to be merged, this PR must follow the community review workflow. labels Oct 17, 2018
@kassiansun
Copy link
Contributor

shipit

Copy link
Contributor

@gundalow gundalow left a 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

@gundalow gundalow merged commit 32e8251 into ansible:devel Oct 18, 2018
@felixfontein
Copy link
Contributor Author

(I'll create backport PRs once #47274 is merged, they will then include both PRs.)

@dariko
Copy link
Contributor

dariko commented Oct 18, 2018

@felixfontein it's all good, I just thought I was losing it 😄

felixfontein added a commit to felixfontein/ansible that referenced this pull request Oct 18, 2018
felixfontein added a commit to felixfontein/ansible that referenced this pull request Oct 18, 2018
* Unify docker module version checks.

* Improve messages depending on required docker-py versions.

* Linting.

(cherry picked from commit 32e8251)
felixfontein added a commit to felixfontein/ansible that referenced this pull request Oct 18, 2018
(cherry picked from commit 89f239f)
@ushuz ushuz mentioned this pull request Oct 19, 2018
abadger pushed a commit that referenced this pull request Oct 22, 2018
* Unify docker module version checks.

* Improve messages depending on required docker-py versions.

* Linting.

(cherry picked from commit 32e8251)
abadger pushed a commit that referenced this pull request Oct 22, 2018
(cherry picked from commit 89f239f)
gundalow pushed a commit that referenced this pull request Oct 26, 2018
* 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
felixfontein added a commit to felixfontein/ansible that referenced this pull request Nov 6, 2018
* Unify docker module version checks.

* Improve messages depending on required docker-py versions.

* Linting.

(cherry picked from commit 32e8251)
felixfontein added a commit to felixfontein/ansible that referenced this pull request Nov 6, 2018
(cherry picked from commit 89f239f)
@mohag
Copy link

mohag commented Nov 14, 2018

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)

@felixfontein
Copy link
Contributor Author

@mohag I created a new issue for this (#48657). Let's continue the discussion there.

Tomorrow9 pushed a commit to Tomorrow9/ansible that referenced this pull request Dec 4, 2018
* Unify docker module version checks.

* Improve messages depending on required docker-py versions.

* Linting.
Tomorrow9 pushed a commit to Tomorrow9/ansible that referenced this pull request Dec 4, 2018
Tomorrow9 pushed a commit to Tomorrow9/ansible that referenced this pull request Dec 4, 2018
* 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
@ansible ansible locked and limited conversation to collaborators Jul 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.8 This issue/PR affects Ansible v2.8 bug This issue/PR relates to a bug. cloud docker module This issue/PR relates to a module. needs_maintainer Ansibot is unable to identify maintainers for this PR. (Check `author` in docs or BOTMETA.yml) owner_pr This PR is made by the module's maintainer. shipit This PR is ready to be merged by Core support:community This issue/PR relates to code supported by the Ansible community.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants