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

healthcheck support in docker-compose configuration #1825

Conversation

StasShymov
Copy link
Contributor

@StasShymov StasShymov commented Sep 26, 2024

  • Docker-compose healthcheck configuration support
  • Docker container wait timeout default value made configurable using startContainerWaitTimeout configuration option

@StasShymov StasShymov force-pushed the support-healthcheck-in-external-docker-compose-config branch 2 times, most recently from 6872407 to 4af1ed1 Compare September 26, 2024 19:35
@rohanKanojia
Copy link
Member

@StasShymov : Hello, do you think changes in this pull request collide with #1736 (it's a draft PR that was created some time ago but author didn't get time to fix it) ?

@StasShymov
Copy link
Contributor Author

StasShymov commented Sep 27, 2024

@rohanKanojia yes, partially
Both are adding support for healthcheck configuration in docker compose.
But mine doesn't touch any existing <run> definitions, since there is already <wait>:

Add <healthCheck> to <run> as known from <build>

@StasShymov StasShymov force-pushed the support-healthcheck-in-external-docker-compose-config branch from 4ffd6ee to 71a1f3e Compare September 27, 2024 13:44
@StasShymov StasShymov force-pushed the support-healthcheck-in-external-docker-compose-config branch 2 times, most recently from 9133596 to 5265b05 Compare September 30, 2024 07:44
Copy link

codecov bot commented Sep 30, 2024

Codecov Report

Attention: Patch coverage is 84.84848% with 15 lines in your changes missing coverage. Please review.

Project coverage is 66.24%. Comparing base (150970d) to head (ca38e86).
Report is 21 commits behind head on master.

Files with missing lines Patch % Lines
.../maven/docker/access/util/ComposeDurationUtil.java 82.14% 3 Missing and 2 partials ⚠️
...g/handler/compose/DockerComposeServiceWrapper.java 86.11% 1 Missing and 4 partials ⚠️
...c/main/java/io/fabric8/maven/docker/StartMojo.java 0.00% 2 Missing ⚠️
...a/io/fabric8/maven/docker/service/WaitService.java 0.00% 2 Missing ⚠️
...ic8/maven/docker/access/ContainerCreateConfig.java 96.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1825      +/-   ##
============================================
+ Coverage     65.87%   66.24%   +0.37%     
- Complexity     2306     2346      +40     
============================================
  Files           172      174       +2     
  Lines         10194    10342     +148     
  Branches       1408     1434      +26     
============================================
+ Hits           6715     6851     +136     
- Misses         2926     2928       +2     
- Partials        553      563      +10     
Files with missing lines Coverage Δ
...ic8/maven/docker/config/RunImageConfiguration.java 91.25% <100.00%> (+0.14%) ⬆️
...ig/handler/compose/DockerComposeConfigHandler.java 73.45% <100.00%> (+0.23%) ⬆️
...va/io/fabric8/maven/docker/service/RunService.java 68.10% <100.00%> (+0.10%) ⬆️
...ic8/maven/docker/access/ContainerCreateConfig.java 88.07% <96.00%> (+2.19%) ⬆️
...c/main/java/io/fabric8/maven/docker/StartMojo.java 0.00% <0.00%> (ø)
...a/io/fabric8/maven/docker/service/WaitService.java 4.16% <0.00%> (-0.08%) ⬇️
.../maven/docker/access/util/ComposeDurationUtil.java 82.14% <82.14%> (ø)
...g/handler/compose/DockerComposeServiceWrapper.java 68.53% <86.11%> (+2.53%) ⬆️

... and 3 files with indirect coverage changes

@StasShymov StasShymov force-pushed the support-healthcheck-in-external-docker-compose-config branch from 5265b05 to d627688 Compare October 4, 2024 12:24
@StasShymov
Copy link
Contributor Author

@rohanKanojia is there anything I can do to help this patch go through?

@rohanKanojia
Copy link
Member

@StasShymov : Let me try to get this merged this weekend.

import java.util.Map;
import java.util.Properties;
import java.util.Set;
import java.util.*;
Copy link
Member

@rohanKanojia rohanKanojia Oct 12, 2024

Choose a reason for hiding this comment

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

Could you please revert these wildcard import changes?

@rohanKanojia
Copy link
Member

@StasShymov : Is it possible to write an integration test for this functionality? I see there are integration tests for docker-compose in it/ folder .

@StasShymov StasShymov force-pushed the support-healthcheck-in-external-docker-compose-config branch from b6c8e3d to ca38e86 Compare October 12, 2024 09:20
@StasShymov StasShymov force-pushed the support-healthcheck-in-external-docker-compose-config branch from 9f5f2b9 to 335f804 Compare October 12, 2024 10:12
@StasShymov
Copy link
Contributor Author

@rohanKanojia I updated the one that already exists, does it look ok to you?

@StasShymov StasShymov force-pushed the support-healthcheck-in-external-docker-compose-config branch from 335f804 to 612e1d5 Compare October 12, 2024 11:45
Copy link

sonarcloud bot commented Oct 12, 2024

@StasShymov
Copy link
Contributor Author

I confirmed that it/docker-compose-dependon is still green after my changes

@rohanKanojia rohanKanojia merged commit 1d9cf08 into fabric8io:master Oct 12, 2024
23 of 24 checks passed
@rohanKanojia
Copy link
Member

@StasShymov : Thanks a lot!

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.

2 participants