Commit Graph

253 Commits

Author SHA1 Message Date
Felix Fontein
ce16a0d5f1 Release 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
0475be5166 Release 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
e0f4c33782 Release 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
82dde7cadd Release 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
5dd90e5884 Release 3.4.1. 2023-02-20 22:39:26 +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 34e6829dd4

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
96b6f5917d Release 3.4.0. 2023-01-14 11:20:16 +01:00
Felix Fontein
c7cbec0163
docker_plugin: do not crash when plugin doesn't exist (#553)
* Do not crash when plugin doesn't exist.

* Improve style.

Co-authored-by: Brian Scholer <1260690+briantist@users.noreply.github.com>

Co-authored-by: Brian Scholer <1260690+briantist@users.noreply.github.com>
2023-01-13 20:49:06 +01:00
Felix Fontein
4e6ac335f3
Improve envvar fallback handling. (#554) 2023-01-13 06:37:04 +01:00
Felix Fontein
757b02cc15 Prepare 3.4.0 release. 2023-01-09 11:54:13 +01:00
Felix Fontein
e198e4ab43
Add docker_container_copy_into module (#545)
* Move copying functionality to module_utils.

* Add docker_container_copy_into module.

* Use new module in other tests.

* Fix copyright and attributes.

* Improve idempotency, improve stat code.

* Document and test when a stopped container works.

* Improve owner/group detection error handling when container is stopped.

* Fix formulation.

Co-authored-by: Brian Scholer <1260690+briantist@users.noreply.github.com>

* Improve file comparison.

* Avoid reading whole file at once.

* Stream when fetching files from daemon.

* Fix comment.

* Use read() instead of read1().

* Stream files when copying into container.

* Linting.

* Add force parameter.

* Simplify library code.

* Linting.

* Add content and content_is_b64 options.

* Make force=false work as for copy module: only copy if the destination does not exist.

* Improve docs.

* content should be no_log.

* Implement diff mode.

* Improve error handling.

* Lint and improve.

* Set owner/group ID to avoid ID lookup (which fails in paused containers).

* Apply suggestions from code review

Co-authored-by: Brian Scholer <1260690+briantist@users.noreply.github.com>

Co-authored-by: Brian Scholer <1260690+briantist@users.noreply.github.com>
2023-01-09 11:52:29 +01:00
Felix Fontein
18091193de
Fix error handling. (#546) 2023-01-05 09:42:42 +01:00
Felix Fontein
faa7fef504
docker_host_info: allow to list all containers (#538)
* Allow to list all containers.

* Fix typo.
2022-12-27 21:39:17 +01:00
Felix Fontein
b8fb4740a3 Release 3.3.2. 2022-12-09 21:27:38 +01:00
Felix Fontein
6db26903ed Prepare 3.3.2 release. 2022-12-08 22:16:57 +01:00
Felix Fontein
3a40112a76
Remove timeout when waiting for container to finish. (#527) 2022-12-08 22:15:42 +01:00
Felix Fontein
080a043c79 Release 3.3.1. 2022-12-06 13:21:27 +01:00
Felix Fontein
ed48629399 Prepare 3.3.1 release. 2022-12-06 08:15:55 +01:00
Felix Fontein
e87b327764
Improve container detection. (#522) 2022-12-06 08:11:44 +01:00
Felix Fontein
ffff6b7e77 Release 3.3.0. 2022-12-03 21:15:34 +01:00
Felix Fontein
6ccbde9f98
Fix chdir option. (#518) 2022-12-02 06:48:39 +01:00
Felix Fontein
2957138153
latest docker-py bugfix (npipe) (#513)
* socket: handle npipe close on Windows (https://github.com/docker/docker-py/pull/3056)

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

Cherry-picked from 30022984f6

Co-authored-by: Nick Santos <nick.santos@docker.com>

* Add changelog fragment.

Co-authored-by: Nick Santos <nick.santos@docker.com>
2022-12-01 06:59:05 +01:00
Felix Fontein
a239c0b2db Prepare 3.3.0 release. 2022-12-01 00:04:00 +01:00
iamjpotts
166d485216
Make image archive/save idempotent, using image id and repo tags as keys (#500) 2022-11-30 23:45:36 +01:00
Felix Fontein
c2d84efccb
Make current_container_facts work with newer Docker versions and latest ansible-test container changes (#510)
* Add more debug output.

* Add basic integration test.

* Split into lines.

* Fix docker detection, add podman detection.

ci_complete

* Improve regular expression.

* Document that this module is trying its best, but might not be perfect.

* Update comment.
2022-11-30 22:25:33 +01:00
Felix Fontein
5b4d24a817 Release 3.2.2. 2022-11-28 22:30:20 +01:00
Felix Fontein
9ab3130b43 Prepare 3.2.2 release. 2022-11-28 22:11:07 +01:00
Felix Fontein
edf0d3ec99
Make kill_signal accept strings. (#506) 2022-11-28 22:10:07 +01:00
Felix Fontein
1427a7ccdd Release 3.2.1. 2022-11-06 22:02:10 +01:00
Felix Fontein
c7f5c74f15 Prepare 3.2.1 release. 2022-11-06 21:16:18 +01:00
Felix Fontein
79b05f5e1d Release 3.2.0. 2022-11-01 21:18:46 +01:00
Felix Fontein
5b31f17016
Add image_name_mismatch option. (#488) 2022-11-01 19:48:58 +00:00
Felix Fontein
4e1bb64b0a Prepare 3.2.0 release. 2022-11-01 20:48:21 +01:00
Felix Fontein
51d5744cb0
docker_container: deprecate ignore_image and purge_networks (#487)
* Deprecate ignore_image and purge_networks.

* Fix YAML.

* Simple replacement doesn't work in this case.
2022-11-01 19:57:56 +01:00
Felix Fontein
a72d7795c4 Release 3.1.0. 2022-09-08 06:51:36 +02:00
Felix Fontein
d159479615 Prepare 3.1.0 release. 2022-09-03 12:08:05 +02:00
Max
c9ea1d3f92
docker_swarm: add data_path_port option for swarm init (#466)
* Add data_path_port option for swarm init and swarm join

* Add changelog fragment

* Update changelogs/fragments/466-add-data-path-port.yml

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

* Update plugins/modules/docker_swarm.py

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

* add change for docker sdk, remove reference to swarm join

* remove duplicate entry

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-09-03 11:20:02 +02:00
Felix Fontein
68ea9c5f41
Make reuse conformant (#462)
* Add .license files.

* Add reuse test.

* Update README.

* Add changelog fragment.

* Normalize licenses extra sanity test.

* Declare REUSE conformance.

* Update README.
2022-08-21 08:29:15 +02:00
Felix Fontein
8eabc7fe00 Release 3.0.2. 2022-08-16 22:47:57 +02:00