-
Notifications
You must be signed in to change notification settings - Fork 123
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
Idempotency broken (again) #142
Comments
I don't get changes done in #119 why was the change in https://github.com/tonal/community.docker/blob/9c0c2b90b8c60abfe145b7d01afeac369b16892f/plugins/modules/docker_compose.py#L773 reverted if the pull is already done in https://github.com/tonal/community.docker/blob/9c0c2b90b8c60abfe145b7d01afeac369b16892f/plugins/modules/docker_compose.py#L729 |
I guess it would really help if someone would add tests for |
It's broken due to this |
@felixfontein I'd be glad to help on this matter and add integration tests for this module. I'll open a PR in a few days. |
Yes, I suggested that in #119 (review) The whole module code looks pretty fishy anyway,
I don't understand what's the problem with these lines. If |
Is it? Then perhaps my understanding of the code is too poor. I have a very simple compose project with a single service and a pretty simple Ansible task:
The result is, |
To me, it looks like |
I guess the code then needs to check whether the only action in the convergence plan is |
I'm happy to review and merge a fix for this, but I won't write it. So if someone wants to step up, feel free :) |
I'll try to take a closer look during this week and create a PR. |
@xoxys I totally misremembered writing integration tests for |
I've now added some basic CI for docker_compose, including preparations for a test that will fail due to this issue (https://github.com/ansible-collections/community.docker/blob/main/tests/integration/targets/docker_compose/tasks/tests/start-stop.yml#L222-L223). You can see in #152 that uncommenting these lines make CI fail (which verifies this issue in CI). So if anyone wants to work on this, uncomment these two lines and fix the module to pass tests, that should be a good start ;-) |
Please note that I'll release 1.7.0 tomorrow, so if you want a fix for this to get in, please hurry :) |
I'm trying to understanding this, and running integration test with re-enabling failing test results in:
Why is it returning |
|
I now created #159 to fix this. |
Thanks a lot! Sorry could not find free time to work on it on my own... |
SUMMARY
We had fixed idempotency issue in this commit bcd7b9b now its broken again due to #119...
The service reports
changed
now on every playbook run even ifstopped
is set totrue
.\cc @tonal
ISSUE TYPE
COMPONENT NAME
docker-compose
The text was updated successfully, but these errors were encountered: