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

docker_compose_v2* modules: use --progress json for Compose 2.29.0+ #931

Merged
merged 7 commits into from
Jul 25, 2024

Conversation

felixfontein
Copy link
Collaborator

SUMMARY

Compose 2.29.0 is out: https://github.com/docker/compose/releases/tag/v2.29.0

It features --progress json output (docker/compose#11478), which makes it easier to parse its output.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

docker_compose_v2*

status,
text,
)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The structured output is still somewhat messy, but that's unfortunately not a surprise if you look at how the events are created that the JSON progress dumps (the progress dumping itself is rather dumb, it does not do fancy transforms).

If someone ever wants to rewrite Compose again, I would suggest to start with a proper machine readable output before trying to make it look nice. That will avoid quite some messy progess events from the beginning...

@felixfontein
Copy link
Collaborator Author

(The tests likely didn't run with Compose 2.29.0 in CI so far since the release didn't happen that long ago. In a few days they should actually run with 2.29.0. I locally ran the tests with a self-compiled Compose 2.29.0 and there they seem to pass, if I didn't screw up anything :) )

@felixfontein
Copy link
Collaborator Author

(Arch Linux already has compose 2.29.0 out by now, so it should be used in the tests.)

@felixfontein
Copy link
Collaborator Author

I moved the last commit to #932 and will rebase once that's merged.

@felixfontein felixfontein changed the title [WIP] Use --progress json for Compose 2.29.0+ docker_compose_v2* modules: use --progress json for Compose 2.29.0+ Jul 17, 2024
@felixfontein
Copy link
Collaborator Author

Hmm I want to test this more thouroughly and potentially add more warnings (like for non-JSON lines).

@felixfontein felixfontein force-pushed the compose-json branch 2 times, most recently from 104829c to 3dae320 Compare July 20, 2024 14:58
@felixfontein felixfontein marked this pull request as ready for review July 20, 2024 15:12
@felixfontein
Copy link
Collaborator Author

TODO: support tail flag.

@felixfontein
Copy link
Collaborator Author

The failing check is unrelated...

@felixfontein felixfontein merged commit 45b2531 into ansible-collections:main Jul 25, 2024
126 of 127 checks passed
@felixfontein felixfontein deleted the compose-json branch July 25, 2024 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant