-
Notifications
You must be signed in to change notification settings - Fork 121
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
Add docker compose v2 module #540
Conversation
Signed-off-by: Sid Sun <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution! I've added some first comments. Please also observe the failing tests.
@Sid-Sun I pushed some basic tests for the module to your branch. I've added the setup role in another PR, so if you want to run the tests locally, you first have to rebase your branch against the current To run the tests directly, you can add a playbook
and run (When you run the tests you will notice that some of the tests are currently failing, for example check mode and idempotency.) |
python-on-whales only supports Python 3.7 and above. Shouldn't the minimum supported Python version be mentioned in the module docs and the README? |
Signed-off-by: Sid Sun <[email protected]>
Docs Build 📝This PR is closed and any previously published docsite has been unpublished. |
I know this is still a WIP, but I was curious if the plan is for this implementation to reflect the idempotent behavior of v1. For example, in v1, pulling an image is only marked as changed when the image is in fact new/different. Whereas here, it's marked as changed as long as we aren't running under |
thanks for the tests @felixfontein idempotency requires getting output from python-on-wheels and the current logic in POW doesn't allow for returning output, i'll try reworking it |
Idempotency is a basic feature that almost all Ansible modules have (and should have). The exceptions are mainly cases where idempotency is impossible, for example the |
Hello there, I just pulled code today and noticed the setup_docker_compose_v2 test files, indicating that work was ongoing for supporting docker-compose v2. I am currently working on this as well, although I took the I believe we should let docker-compose manage indempotency all by itself unless we want to handle potentially clashing behavior. Getting the result of a docker-composer run is definitely achievable by reading what is written on stdout (while using the Now, about my ongoing work, I just want to get the job done and I don't see the point of both of us working on different implementations. I'm uneasy because I'd like to join the effort of supporting docker-compose v2, but after working on this I believe that the |
I agree,we should let docker compose manage idempotency. POW for this usecase seems to be a bit unideal, I have an open PR to change the API of POW to at least return the output though it hasn't gone anywhere yet. Thanks for working on this! hoping to see your implementation merge!😀 |
I'll close this PR for now. |
@Sid-Sun thanks for working on this! |
Signed-off-by: Sid Sun [email protected]
SUMMARY
Add module to support docker compose v2 via python-on-whales
the docker_compose_v2 module does not behave the same as the existing module, it lacks some features and does some things differently
returns from module are somewhat finicky as python on whales has a slightly weird logic to it
adds lacking support for compose v2 #216
ISSUE TYPE
COMPONENT NAME
docker_compose_v2