-
Notifications
You must be signed in to change notification settings - Fork 645
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 support for Docker Compose depends_on long syntax #1718
Add support for Docker Compose depends_on long syntax #1718
Conversation
fabric8io#888 As of Docker Compose v2.1, there is a new map-based long syntax to express dependencies of containers among each other that is much more sophisticated than the old list based. This commit solves the immediate problem described in fabric8io#888, where this new syntax is simply rejected. The dependsOn concept of DMP is now feed with the map's keys. Limitation: the wait conditions expressed with the new syntax are not added with this commit. See also: fabric8io#888 See also: https://github.com/compose-spec/compose-spec/blob/master/spec.md#long-syntax-1 See also: https://docs.docker.com/compose/compose-file/compose-file-v2/#depends_on
…bric8io#888 Extract the Docker Compose v2.1+ depends_on conditions and apply them as Docker Maven Plugin waiting configurations. Limitations: this mapping requires an inversion of the data model in use. Docker Compose has waiting conditions located at the depending service, while this plugin puts them on the dependent service/s.
@rohanKanojia @rhuss I opened this draft PR hoping for some initial feedback. Also: I added unit tests for this, but there seem to be no integration tests. How is testing done to actually make sure it works in reality? |
There are some integration tests in |
Codecov Report
@@ Coverage Diff @@
## master #1718 +/- ##
============================================
+ Coverage 65.11% 65.22% +0.11%
- Complexity 2253 2273 +20
============================================
Files 172 172
Lines 10109 10171 +62
Branches 1390 1402 +12
============================================
+ Hits 6582 6634 +52
- Misses 2977 2984 +7
- Partials 550 553 +3
|
Done. Very simple, but clearly shows it works. |
@rohanKanojia @rhuss unless you tell me we should include the Please note that the 3 Sonarcloud bugs are not on me - they have been present before. Let me know if you want me to include a fix for them. |
SonarCloud Quality Gate failed. 3 Bugs 88.7% Coverage The version of Java (11.0.21) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17. Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
Cool, thanks! I'm just on the road and will be back next week to have a look. But maybe @rohanKanojia is faster :) Thanks again ... |
@poikilotherm : Thanks a lot for your work! It looks good to me. In my opinion, healthcheck support could be added in a follow up PR. Let me merge this one. |
Closes #888
TODO: