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

Add support for docker compose v2 in TestFixturesPlugin #16049

Merged
merged 5 commits into from
Sep 24, 2024

Conversation

cwperks
Copy link
Member

@cwperks cwperks commented Sep 23, 2024

Description

While looking into upgrading google dependencies to v2, I ran into an issue where docker compose related gradle tasks were being skipped on my Mac due to docker-compose not being present. This PR adds support for Docker Compose V2 (docker compose - without the hyphen)

Related Issues

Resolves: #16050

Dependabot updates have been failing for google related dependencies due to major version upgrade. Example: #16043

opensearch-api-specification repo did a similar update: opensearch-project/opensearch-api-specification#457

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@github-actions github-actions bot added bug Something isn't working Other labels Sep 23, 2024
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
@cwperks cwperks changed the title Update references for docker-compose to docker compose Add support for docker compose v2 in TestFixturePlugin Sep 24, 2024
@cwperks cwperks changed the title Add support for docker compose v2 in TestFixturePlugin Add support for docker compose v2 in TestFixturesPlugin Sep 24, 2024
Signed-off-by: Craig Perkins <[email protected]>
Copy link
Contributor

✅ Gradle check result for 4b6ecf8: SUCCESS

Copy link

codecov bot commented Sep 24, 2024

Codecov Report

Attention: Patch coverage is 0% with 9 lines in your changes missing coverage. Please review.

Project coverage is 71.89%. Comparing base (2b670cc) to head (4b6ecf8).
Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
...search/gradle/testfixtures/TestFixturesPlugin.java 0.00% 6 Missing ⚠️
...opensearch/gradle/docker/DockerSupportService.java 0.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #16049      +/-   ##
============================================
- Coverage     71.99%   71.89%   -0.11%     
+ Complexity    64408    64362      -46     
============================================
  Files          5281     5281              
  Lines        301003   301010       +7     
  Branches      43483    43486       +3     
============================================
- Hits         216721   216413     -308     
- Misses        66522    66798     +276     
- Partials      17760    17799      +39     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

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

This works, but ideally it should be figuring out which version of compose is available then using a map to run a different commend, avoids if's ;)

@dblock dblock added skip-changelog backport 2.x Backport to 2.x branch labels Sep 24, 2024
@dblock dblock merged commit 6a29119 into opensearch-project:main Sep 24, 2024
40 of 42 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Sep 24, 2024
* Update references for docker-compose to docker compose

Signed-off-by: Craig Perkins <[email protected]>

* Support both

Signed-off-by: Craig Perkins <[email protected]>

* Check if V2 is available

Signed-off-by: Craig Perkins <[email protected]>

* Add to CHANGELOG

Signed-off-by: Craig Perkins <[email protected]>

* Update CHANGELOG text

Signed-off-by: Craig Perkins <[email protected]>

---------

Signed-off-by: Craig Perkins <[email protected]>
(cherry picked from commit 6a29119)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Backport to 2.x branch bug Something isn't working Other skip-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] TestFixturesPlugin is still referencing docker-compose which has been replaced by docker compose
2 participants