ansible-collections / community.docker

Community Docker Collection for Ansible: modules and plugins for working with Docker
https://galaxy.ansible.com/ui/repo/published/community/docker/
GNU General Public License v3.0
198 stars 111 forks source link

[WARNING]: Cannot parse event from line: 'time="2024-03-25T21:10:19+02:00" level=warning msg="/containers/paperless/docker-compose.yaml: `version` is obsolete" #824

Closed mcanyucel closed 6 months ago

mcanyucel commented 6 months ago
SUMMARY

The warning pops up to report this. It is just a warning which possibly means that the module does not know how to handle when the obsolete version tag exists in a compose file and the Docker Compose complains about it.

ISSUE TYPE
COMPONENT NAME

community.docker.docker_compose_v2

ANSIBLE VERSION
ansible [core 2.16.4]
  config file = /home/styx/ansible/server-config/ansible.cfg
  configured module search path = ['/home/styx/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/styx/.local/lib/python3.11/site-packages/ansible
  ansible collection location = /home/styx/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/styx/.local/bin/ansible
  python version = 3.11.8 (main, Feb  7 2024, 21:52:08) [GCC 13.2.0] (/usr/bin/python3)
  jinja version = 3.1.2
  libyaml = True
COLLECTION VERSION
# /home/styx/.local/lib/python3.11/site-packages/ansible_collections
Collection       Version
---------------- -------
community.docker 3.8.0  
CONFIGURATION
CONFIG_FILE() = /home/styx/ansible/server-config/ansible.cfg
DEFAULT_HOST_LIST(/home/styx/ansible/server-config/ansible.cfg) = ['/home/styx/ansible/server-config/inventory/host.ini']
DEFAULT_STDOUT_CALLBACK(/home/styx/ansible/server-config/ansible.cfg) = yaml
HOST_KEY_CHECKING(/home/styx/ansible/server-config/ansible.cfg) = False
OS / ENVIRONMENT

Target OS: Debian bookworm

STEPS TO REPRODUCE

Create a stack with the following playbook

- name: Create Paperless-ngx stack
  community.docker.docker_compose_v2:
    project_src: /containers/paperless
    recreate: always
    pull: always
    state: present

The compose file can be found at the project repo.

EXPECTED RESULTS

Create the stack.

ACTUAL RESULTS

The stack is created with an unexpected warning popping up, asking me to report itself.

TASK [Create Paperless-ngx stack] ************************************************************************************************************************************************************************************************
[WARNING]: Cannot parse event from line: 'time="2024-03-25T21:10:19+02:00" level=warning msg="/containers/paperless/docker-compose.yaml: `version` is obsolete"'. Please report this at https://github.com/ansible-
collections/community.docker/issues/new?assignees=&labels=&projects=&template=bug_report.md
changed: [numenor]
felixfontein commented 6 months ago

Thanks for creating this report! I added parsing of such logfmt messages in community.docker 3.8.1, can you try that one out to see whether this "cannot parse event from line" warning still pops up? (It should emit a proper warning about version instead.)

I'll also take a look, but I probably won't manage before tomorrow :)

mcanyucel commented 6 months ago

Thanks for creating this report! I added parsing of such logfmt messages in community.docker 3.8.1, can you try that one out to see whether this "cannot parse event from line" warning still pops up? (It should emit a proper warning about version instead.)

I'll also take a look, but I probably won't manage before tomorrow :)

Sorry for the late reply. You're correct; in the version 3.8.1, the output is the proper warning:

[WARNING]: /var/lib/nomie/docker-compose.yaml: `version` is obsolete