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

container information stauff #271

Merged
merged 16 commits into from Jul 21, 2021
Merged

container information stauff #271

merged 16 commits into from Jul 21, 2021

Conversation

01101101M
Copy link
Contributor

some small features added:
  • implement Healthcheck Wait strategy
  • get ContainerState
  • ability to wait for the container exit

@mdelapenya
Copy link
Collaborator

Hi @01101101M, could you share here or in a new issue the motivation for this change? We'd like to better understand the use cases and the real needs to add it.

Thanks in advance!

@01101101M
Copy link
Contributor Author

Hey @mdelapenya, first of all, thank you for your time.

Why it's important:
  • providing all the features available in the java version (such as Healthcheck Wait strategy)
  • it would be very nice to be able to inspect container properties such as RunningStatus, ExitCode, Health, etc.
  • also in my case, I have a worker container and want to use its output so i need to wait for the container to exit

wait/healt.go Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Mar 11, 2021

Codecov Report

Merging #271 (d2374fc) into master (0d6a586) will decrease coverage by 2.33%.
The diff coverage is 21.81%.

❗ Current head d2374fc differs from pull request most recent head a4ac403. Consider uploading reports for the commit a4ac403 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master     #271      +/-   ##
==========================================
- Coverage   63.63%   61.30%   -2.34%     
==========================================
  Files          13       15       +2     
  Lines         924      920       -4     
==========================================
- Hits          588      564      -24     
- Misses        247      269      +22     
+ Partials       89       87       -2     
Impacted Files Coverage Δ
container.go 84.37% <ø> (-0.92%) ⬇️
docker.go 64.04% <0.00%> (-1.66%) ⬇️
wait/health.go 0.00% <0.00%> (ø)
wait/wait.go 100.00% <ø> (ø)
wait/exit.go 48.00% <48.00%> (ø)
compose.go 73.46% <0.00%> (-0.58%) ⬇️
wait/sql.go 0.00% <0.00%> (ø)
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ddd3e32...a4ac403. Read the comment docs.

Copy link
Collaborator

@mdelapenya mdelapenya left a comment

Choose a reason for hiding this comment

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

@01101101M sorry for the delay with the review. I added a tiny rename in a method.

Could you verify that all wait implementation provide the new State method?

docker.go Outdated Show resolved Hide resolved
@01101101M
Copy link
Contributor Author

@01101101M sorry for the delay with the review. I added a tiny rename in a method.

Could you verify that all wait implementation provide the new State method?

Great! That would be nice.
I'll check it out ASAP.

@01101101M
Copy link
Contributor Author

@mdelapenya
The State method is implemented on the DockerContainer and is required by Container and StrategyTarget. Considering that all wait Strategies are using the StrategyTarget interface, The State method is accessible from all wait implementation and outside the package.

Copy link
Collaborator

@mdelapenya mdelapenya left a comment

Choose a reason for hiding this comment

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

LGTM!

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

4 participants