Commit Graph

32 Commits

Author SHA1 Message Date
Felix Fontein
091e393e6d
[stable-4] Docker Compose 5+: improve image layer event parsing (#1219) (#1220)
* Docker Compose 5+: improve image layer event parsing (#1219)

* Remove long deprecated version fields.

* Add first JSON event parsing tests.

* Improve image layer event parsing for Compose 5+.

* Add 'Working' to image working actions.

* Add changelog fragment.

* Shorten lines.

* Adjust docker_compose_v2_run tests.

(cherry picked from commit 174c0c8058)

* Remove type hints.

* Fix Python 2 compatibility when parsing JSON events.
2025-12-06 18:32:17 +01:00
Felix Fontein
075bc91ce8
[stable-4] Adjust 'report this' messages to only report if the latest version still has this problem (#1174)
* Adjust 'report this' messages to only report if the latest version still has this problem. (#1173)

(cherry picked from commit 6b5d76bdee)

* Adjust checks.

(cherry picked from commit 24f35644e3)
2025-10-16 18:05:39 +02:00
Felix Fontein
251e4eca49
Remove remaining usages of ansible.module_utils.six. (#1140) 2025-10-05 16:17:50 +02:00
Felix Fontein
ebe42308cc
Replace ansible.module_utils.six with own module utils in some cases (#1138)
* Replace ansible.module_utils.six with own module utils in some cases.

* Add ignore.txt entires.
2025-10-04 23:45:27 +02:00
Felix Fontein
ac301beebd
Adjust to Compose 2.39.0+. (#1101) 2025-07-25 21:59:41 +02:00
Felix Fontein
8ecbd9a5cc
docker_compose_v2: work around bug in docker compose images --format json (#1083)
* Work around ubg in docker compose images --format json.

* ContainerName is no longer in image record.
2025-06-07 23:28:51 +02:00
Florian Apolloner
6172a9291c
Determine the compose version via a CLI call and not the docker API. (#1021)
* Determine the compose version via a CLI call and not the docker API.

* Update plugins/module_utils/compose_v2.py

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-12-29 14:13:39 +01:00
Felix Fontein
f69536ef3b Improve language. 2024-12-28 14:30:49 +01:00
Felix Fontein
2e7b4e4605
docker_compose_v2: add ignore_build_events option; ignore build events by default (#1011)
* Add ignore_build_events option.

* Adjust docs and tests.

* Switch default to true.

* Remove unnecessary parts from tests.
2024-12-14 19:54:40 +01:00
Felix Fontein
28e87f4602
Compose v2: improve parsing of dry-run building JSON events (#976)
* Catch more warnings that shouldn't be there.

* Add explicit handling of dry-run image build JSON events.

These produce some one-off ID values that don't make any sense as ID values.
2024-10-14 20:56:49 +02:00
Felix Fontein
423a9bbf61
Add Docker Compose v2 exec and run modules. (#969) 2024-09-27 13:00:48 +03:00
Felix Fontein
3cc27ecd65
Handle yet another random unstructured error output. (#949) 2024-08-07 15:58:23 +02:00
Felix Fontein
45b2531129
docker_compose_v2* modules: use --progress json for Compose 2.29.0+ (#931)
* Use --progress json for Compose 2.29.0+.

* Add changelog fragment.

* Fix/improve handling of warnings.

* Improve parsing of warnings and some one-off messages.

* Improve warnings.

* Handle tail messages.

* Fix bug in regular event parsing.
2024-07-25 18:33:42 +02:00
Felix Fontein
48c0cdf2c5
Imporve parsing of skipped messages. (#916) 2024-07-06 21:10:39 +02:00
Felix Fontein
4cac2ac021
Make sure that one of project_src and definition is provided. (#886) 2024-06-16 21:49:20 +02:00
Felix Fontein
8bcc3519d4
Add check_files_existing option. (#839) 2024-04-21 16:01:07 +02:00
Felix Fontein
9e8c367c47
docker_compose_v2: allow to specify inline compose definitions (#832)
* Allow to specify inline compose definitions.

* Remove comma that trips Python 2.7.

* Add tests.

* Add PyYAML as EE dependency.

* Be more explicit on PyYAML.
2024-04-09 17:41:12 +02:00
Felix Fontein
2925334a1a
Make sure project_src is an absolute path. (#828) 2024-04-04 21:39:38 +02:00
Felix Fontein
7102d38923
Better error message if Compose version is 'dev'. (#826) 2024-03-29 19:29:14 +01:00
Felix Fontein
4bab9a6b0e
Fix idempotency of docker_compose_v2_pull. (#814) 2024-03-13 13:20:11 +01:00
Felix Fontein
6aea7efed9
Improve parsing of warnings and errors (#811)
* Add logfmt message parser.

* Parse logfmt formatted warnings.

* Follow-up for #810.

* Fix handling of warning and error messages.

* Make Python 2 compatible.

* Linting. Improving tests.
2024-03-03 13:38:55 +00:00
Felix Fontein
37e28b62d3
Do not fail on non-fatal errors. (#810) 2024-02-28 21:43:30 +01:00
Felix Fontein
45d32d53c9
Do not consider 'Waiting' events as changes/actions. (#804) 2024-02-23 19:58:40 +01:00
Felix Fontein
6f5d67860c
docker_compose_v2: ignore some pull events (#803)
* Ignore some pull events.

* Adjust tests.
2024-02-23 18:24:16 +01:00
Felix Fontein
7b554082ea
Improve parsing. (#786) 2024-02-01 17:52:31 +00:00
Felix Fontein
b5d085bb88
Parse build events from stderr. (#779) 2024-01-25 06:40:32 +01:00
Felix Fontein
eebb73a503
docker_compose_v2: add files option (#775)
* Add files option.

* Shorten lines.
2024-01-24 07:15:00 +01:00
Felix Fontein
6082efc855
Improve docs sharing for docker_compose_v2* modules; fix examples and return docs for docker_compose_v2_pull (#761)
* Move more common documentation to docs fragment.

* Fix examples and return values for docker_compose_v2_pull.

* Remove ignore.
2024-01-17 07:53:44 +01:00
Felix Fontein
ab73061a5f
Also check for compose.yaml and compose.yml, and do not require the Compose file to be an actual file. (#759) 2024-01-16 19:03:29 +01:00
Felix Fontein
307dc4045a
Add docker_compose_v2_pull module (#751)
* Add docker_compose_v2_pull module.

* Improve and extend parsing of events.

* Add ignores.

* --policy is only available since Compose 2.22.0.
2024-01-13 14:36:26 +01:00
Felix Fontein
8ca5e2f810
Extract more common code and docs fragment for Docker Compose. (#748) 2024-01-07 18:17:10 +01:00
Felix Fontein
cb4dd2fed1
docker_compose_v2: move some code to module_utils (#747)
* Move some code to module_utils.

* Add unit tests.

Test cases are auto-generated from integration test logs.

* Rename ResourceEvent → Event.
2024-01-07 16:17:31 +01:00