Commit Graph

548 Commits

Author SHA1 Message Date
Felix Fontein cad2ecca3d Move ansible-core 2.12 to EOL CI (#640)
* https://github.com/ansible/ansible/pull/79734 has been merged and backported for all branches but stable-2.10 and stable-2.11.

* Move ansible-core 2.12 to EOL CI.
2023-05-29 17:01:07 +02:00
Felix Fontein 748d619fb2 Fix EndpointSpec KeyError. (#637) 2023-05-26 17:58:09 +02:00
Felix Fontein 74b70f81c8 Switch to Ansible Galaxy compatible requirements files for tests. (#633) 2023-05-21 13:54:35 +02:00
Felix Fontein db71c974e3 Next expected release is 3.5.0. 2023-05-20 21:38:07 +02:00
Felix Fontein a284137d15 Release 3.4.6. 3.4.6 2023-05-20 21:14:49 +02:00
Felix Fontein cdccf955a8 Prepare 3.4.6. 2023-05-20 19:38:28 +02:00
Felix Fontein 1660bf4104 vendored Docker SDK for Python code: update to latest version (#619)
* socket: fix for errors on pipe close in Windows (https://github.com/docker/docker-py/pull/3099)

Need to return data, not size. By returning an empty
string, EOF will be detected properly since `len()`
will be `0`.

Fixes https://github.com/docker/docker-py/issues/3098.

Cherry-picked from https://github.com/docker/docker-py/commit/f84623225e0227adde48ffd8f2e1cafb1f9aa38d

Co-authored-by: Milas Bowman <milas.bowman@docker.com>

* socket: use poll() instead of select() except on Windows (https://github.com/docker/docker-py/pull/2865)

Fixes https://github.com/docker/docker-py/issues/2278, which was originally addressed in https://github.com/docker/docker-py/pull/2279, but was not
properly merged. Additionally it did not address the problem
of poll not existing on Windows. This patch falls back on the
more limited select method if host system is Windows.

Cherry-picked from https://github.com/docker/docker-py/commit/a02ba743338c27fd9348af2cf7767b140501734d

Co-authored-by: Tyler Westland <tylerofthewest@gmail.com>

* api: respect timeouts on Windows named pipes (https://github.com/docker/docker-py/pull/3112)

Cherry-picked from https://github.com/docker/docker-py/commit/9cadad009e6aa78e15d752e2011705d7d91b8d2e

Co-authored-by: Imogen <59090860+ImogenBits@users.noreply.github.com>

* Add URL to changelog.

* api: avoid socket timeouts when executing commands (https://github.com/docker/docker-py/pull/3125)

Only listen to read events when polling a socket in order
to avoid incorrectly trying to read from a socket that is
not actually ready.

Cherry-picked from https://github.com/docker/docker-py/commit/c5e582c413a4a3a9eff6ee8208d195f657ffda94

Co-authored-by: Loïc Leyendecker <loic.leyendecker@gmail.com>

---------

Co-authored-by: Milas Bowman <milas.bowman@docker.com>
Co-authored-by: Tyler Westland <tylerofthewest@gmail.com>
Co-authored-by: Imogen <59090860+ImogenBits@users.noreply.github.com>
Co-authored-by: Loïc Leyendecker <loic.leyendecker@gmail.com>
2023-05-20 19:35:56 +02:00
Felix Fontein 2259246f4f Rewrite EE test workflow to use ansible-builder 3.0.0. (#630) 2023-05-20 11:21:25 +02:00
Felix Fontein d7f7e44b9e Make sure plugins/module_utils/socket_handler.py works when Docker SDK for Python is not installed. (#620) 2023-05-15 21:43:31 +02:00
Felix Fontein 7bdb2127e0 Improve examples: use FQCNs and always add name: to tasks (#624)
* Improve examples: use FQCNs and always add name: to tasks.

* Improvements.

Co-authored-by: Don Naro <dnaro@redhat.com>

---------

Co-authored-by: Don Naro <dnaro@redhat.com>
2023-05-15 21:41:58 +02:00
Felix Fontein 245ab76b09 Warn that SSLSocket cannot send close_notify TLS alerts (#621)
* Warn that SSLSocket cannot send close_notify TLS alerts.

* Improve formulation.

Co-authored-by: Don Naro <dnaro@redhat.com>

---------

Co-authored-by: Don Naro <dnaro@redhat.com>
2023-05-15 21:41:23 +02:00
Felix Fontein 6187068ee5 Improve time units of docker_swarm documentation. (#623) 2023-05-13 15:25:42 +00:00
Felix Fontein c3b523a11e Next expected release is 3.5.0. 2023-05-05 22:46:17 +02:00
Felix Fontein ce16a0d5f1 Release 3.4.5. 3.4.5 2023-05-05 22:23:19 +02:00
Felix Fontein 39f2e9b9c4 Make compatible with requests 2.29.0 and urllib3 2.0 (#613)
* Make compatible with requests 2.29.0.

* This fix should also work with urllib3 2.0 according to urllib3 maintainer.

* Add changelog fragment.

* We still need the constraint for CI until Docker SDK for Python has a new release with a fix.

* Make modifications to response_class as small as possible.

* Revert "We still need the constraint for CI until Docker SDK for Python has a new release with a fix."

This reverts commit 698d544a1e08308e8bf8b4e56ab78c5079f9a17b.

* The pip coming with the ansible-core 2.11 alpine3 image seems to be too old.
2023-05-05 22:09:02 +02:00
Felix Fontein 5a26eee6d4 Prepare 3.4.5. 2023-05-05 21:22:57 +02:00
Felix Fontein 35f2d1617f Arch Linux now uses Python 3.11. (#616) 2023-05-04 07:12:13 +02:00
Felix Fontein 054353bb14 Simplify test setup. (#615) 2023-05-03 19:39:04 +02:00
Felix Fontein a3642616c2 Next expected release is 3.5.0. 2023-05-01 10:27:11 +02:00
Felix Fontein 0475be5166 Release 3.4.4. 3.4.4 2023-05-01 09:54:42 +02:00
Felix Fontein ba5b3306a7 Also mention urllib3 2.0.0 in known_issues. 2023-05-01 09:51:38 +02:00
Felix Fontein 4ab05500e3 Prepare 3.4.4 release. 2023-05-01 09:47:48 +02:00
Felix Fontein 088cbaed4e Restrict requests to < 2.29.0 (#612)
* Restrict requests to < 2.29.0.

* Also avoid urllib3, which gets installed in some cases even though it shouldn't.
2023-04-29 16:25:07 +02:00
Felix Fontein 9e1a0a6fb8 Do extra docs validation; explicitly disallow semantic markup in docs (#607)
* Do extra docs validation. Explicitly disallow semantic markup in docs.

* Forgot to add new requirement.

* Improve test.

* TEMP - make CI fail.

* Revert "TEMP - make CI fail."

This reverts commit d381f1a431.

* Remove unnecessary import.

* Make sure ANSIBLE_COLLECTIONS_PATH is set.

* Make sure sanity tests from older Ansible versions don't complain.
2023-04-16 18:18:12 +02:00
Ville Ojamo 634da44f67 docker_swarm: document docker_node module for manager removal (#602)
* docker_swarm: document manager removal

Add note that community.docker.swarm_node needs to
be used to demote a manager before it can be removed.

Fixes #601.

* docker_swarm: improve wording

* docker_swarm: fix formatting
2023-04-08 18:09:57 +02:00
Felix Fontein 5d61cb2b8d Update CI matrix: add stable-2.15 (#600)
* Add ignore files for bumped devel version.

* Update CI matrix.
2023-04-04 06:12:39 +00:00
Felix Fontein 334d34e205 Next expected release is 3.5.0. 2023-03-24 07:44:47 +01:00
Felix Fontein e0f4c33782 Release 3.4.3. 3.4.3 2023-03-24 07:19:39 +01:00
Felix Fontein 65407001ff Prepare 3.4.3 release. 2023-03-23 21:27:15 +01:00
Felix Fontein d0a3e587a5 More true/false normalization. (#597) 2023-03-06 22:17:13 +01:00
Felix Fontein c504c87404 Expected next release is 2.5.0. 2023-02-25 16:04:03 +01:00
Felix Fontein 82dde7cadd Release 3.4.2. 3.4.2 2023-02-25 15:37:21 +01:00
Felix Fontein 18584f6b40 Prepare 3.4.2 release. 2023-02-24 21:36:26 +01:00
Felix Fontein 08bfcf7e5f docker_prune: correctly return 'changed' result (#593)
* Correctly return 'changed' status.

* Extend tests.

* Fix typo.
2023-02-24 17:24:16 +01:00
Felix Fontein d0e61097f1 Cancel concurrent workflow runs in PRs. 2023-02-23 09:56:26 +01:00
Felix Fontein dfa60dc91d Next expected release is 3.5.0. 2023-02-20 23:05:27 +01:00
Felix Fontein 5dd90e5884 Release 3.4.1. 3.4.1 2023-02-20 22:39:26 +01:00
Felix Fontein dd19db8c8f Normalize bools in tests. (#589) 2023-02-15 22:29:41 +01:00
Felix Fontein a426232523 Fix imports. (#585) 2023-02-12 22:09:02 +01:00
Felix Fontein 449b91d489 Remove unnecessary test imports. (#583) 2023-02-12 20:59:51 +01:00
Felix Fontein 983b2b4783 exec: fix file handle leak with container.exec_* APIs (https://github.com/docker/docker-py/pull/2320) (#582)
Requests with stream=True MUST be closed or else the connection will
never be returned to the connection pool. Both ContainerApiMixin.attach
and ExecApiMixin.exec_start were leaking in the stream=False case.
exec_start was modified to follow attach for the stream=True case as
that allows the caller to close the stream when done (untested).

Tested with:

    # Test exec_run (stream=False) - observe one less leak
    make integration-test-py3 file=models_containers_test.py' -k test_exec_run_success -vs -W error::ResourceWarning'
    # Test exec_start (stream=True, fully reads from CancellableStream)
    make integration-test-py3 file=api_exec_test.py' -k test_execute_command -vs -W error::ResourceWarning'

After this change, one resource leak is removed, the remaining resource
leaks occur because none of the tests call client.close().

Fixes https://github.com/docker/docker-py/issues/1293
(Regression from https://github.com/docker/docker-py/pull/1130)

Cherry-picked from https://github.com/docker/docker-py/commit/34e6829dd40e99e9ba47ea02fcfabda09e08d36e

Co-authored-by: Peter Wu <pwu@cloudflare.com>
Co-authored-by: Milas Bowman <milas.bowman@docker.com>
2023-02-12 08:29:28 +01:00
Felix Fontein 5c70d8fd7a Prepare 3.4.1 release. 2023-02-10 14:06:22 +01:00
Kristof Mattei d2f551fc5d fix: fix tmpfs_size and tmpfs_mode not being set (#580)
* fix: fix tmpfs_size and tmpfs_mode not being set

* fix: wrong file

* fix: add changelog fragment

* fix: update changelog fragment to match formatting

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-02-10 14:05:09 +01:00
Felix Fontein 54a3dc151d Remove unneccessary imports (#575)
* Remove unneccessary imports.

* Add noqas.
2023-02-09 15:25:45 +01:00
Felix Fontein eb186f0098 Restrict regular CI runs on old branches to stable-2. 2023-02-06 09:28:15 +01:00
Felix Fontein 3a1bfc4be2 CI: Make tests work with Docker API version 1.42 (#576)
* Make tests work with API version 1.42.

* Make sure anonymous volume is separated from container a bit earlier.

* Another try.
2023-02-04 22:16:25 +01:00
Felix Fontein 421bae419d Improve current_container_facts docs (#574)
* Improve current_container_facts docs.

* [TEMP] Run current_container_facts module in CI outside of ansible-test.

* Revert "[TEMP] Run current_container_facts module in CI outside of ansible-test."

This reverts commit 1cdd3e3550.

* Describe current state of return values.
2023-02-03 17:13:31 +01:00
Felix Fontein 0e1152a630 Use branch from https://github.com/ansible-community/github-docs-build/pull/67. 2023-02-03 15:37:02 +01:00
Felix Fontein d57b26269a Looks like BuilderSize was never documented and eventually got removed. Replace with something that is documented (https://docs.docker.com/engine/api/v1.42/#tag/System/operation/SystemDataUsage). (#569) 2023-02-03 11:33:29 +01:00
Felix Fontein a78bd6f443 Fix check in SSH connection test (#567)
* Fix check.

* Adjust error check.
2023-01-22 19:11:52 +00:00