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

Idempotence test failure on the docker_compose_v2_pull #813

Closed
DeadNews opened this issue Mar 8, 2024 · 4 comments · Fixed by #814
Closed

Idempotence test failure on the docker_compose_v2_pull #813

DeadNews opened this issue Mar 8, 2024 · 4 comments · Fixed by #814
Labels
bug Something isn't working docker-compose-v2 Docker Compose v2

Comments

@DeadNews
Copy link

DeadNews commented Mar 8, 2024

SUMMARY

When running molecule test, the idempotence test fails on the task docker_compose_v2_pull.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

community.docker.docker_compose_v2_pull

ANSIBLE VERSION
$ ansible --version

ansible [core 2.16.3]
  config file = /home/deadnews/git/deadnews-template-ansible/ansible.cfg
  configured module search path = ['/home/deadnews/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/deadnews/.cache/pypoetry/virtualenvs/deadnews-template-ansible-EQAYLr04-py3.12/lib/python3.12/site-packages/ansible
  ansible collection location = /home/deadnews/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/deadnews/.cache/pypoetry/virtualenvs/deadnews-template-ansible-EQAYLr04-py3.12/bin/ansible
  python version = 3.12.2 (main, Feb 25 2024, 21:08:02) [GCC 13.2.1 20230801] (/home/deadnews/.cache/pypoetry/virtualenvs/deadnews-template-ansible-EQAYLr04-py3.12/bin/python)
  jinja version = 3.1.3
  libyaml = True
COLLECTION VERSION
$ ansible-galaxy collection list community.docker

# /home/deadnews/.ansible/collections/ansible_collections
Collection       Version
---------------- -------
community.docker 3.8.0
STEPS TO REPRODUCE
- name: Pull a Docker compose project
  community.docker.docker_compose_v2_pull:
    project_src: /path/to/project
$ molecule test --all

CRITICAL Idempotence test failed because of the following tasks:
*  => docker_compose_v2_pull : Pull a Docker compose project
@felixfontein
Copy link
Collaborator

Which Docker Compose version are you using? Also what's the stderr output of the supposedly idempotent run?

@felixfontein felixfontein added the docker-compose-v2 Docker Compose v2 label Mar 8, 2024
@DeadNews
Copy link
Author

DeadNews commented Mar 8, 2024

Which Docker Compose version are you using?

The latest version. Currently v2.24.7.

Also what's the stderr output of the supposedly idempotent run?

Play:

- name: Pull images for Docker Compose project
  community.docker.docker_compose_v2_pull:
    project_src: /path/to/project
  register: pull_output

- name: Show pull results
  ansible.builtin.debug:
    var: pull_output

- name: Pull images for Docker Compose project [2 pass]
  community.docker.docker_compose_v2_pull:
    project_src: /path/to/project
  register: pull_output_2

- name: Show pull results [2 pass]
  ansible.builtin.debug:
    var: pull_output_2

docker-compose.yml example:

version: "3"
services:
  web:
    image: ghcr.io/deadnews/deadnews-template-go:2.0.3@sha256:2d66ff9a4d36b3682b2f94ec7a575d3d2e6744ac678ecfc2b82b58200aa6f845

Output:

    "pull_output": {
        "actions": [
            {
                "id": "web",
                "status": "Pulling",
                "what": "service"
            }
        ],
        "changed": true,
        "failed": false,
        "stderr": " web Pulling \n web Pulled \n",
        "stderr_lines": [
            " web Pulling ",
            " web Pulled "
        ]
    }
    "pull_output_2": {
        "actions": [
            {
                "id": "web",
                "status": "Pulling",
                "what": "service"
            }
        ],
        "changed": true,
        "failed": false,
        "stderr": " web Pulling \n web Pulled \n",
        "stderr_lines": [
            " web Pulling ",
            " web Pulled "
        ]
    }

@felixfontein
Copy link
Collaborator

Basically #803 fixed this for docker_compose_v2, I guess I'll have to fix it the same way for docker_compose_v2_pull...

@felixfontein
Copy link
Collaborator

#814 should fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working docker-compose-v2 Docker Compose v2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants