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

fix(core): Avoid hanging upon bad docker host connection #742

Merged

Conversation

mmwinther
Copy link
Contributor

@mmwinther mmwinther commented Nov 25, 2024

  • Shorten the socket connection timeout
  • Add a timeout on waiting for logs
  • Add check for host and port values
  • The previous implementation technically would have timed out, but the default socket
    timeout * 50 iterations is a very long time to wait.

Resolves #741

- Shorten the socket connection timeout
- Add a timeout on waiting for logs
- Add check for host and port values
- This _technically_ would already have timed out, though the default
timeout * 50 iterations is a long time to wait.
@mmwinther mmwinther marked this pull request as ready for review November 25, 2024 11:31
@mmwinther mmwinther changed the title Avoid hanging upon bad docker host connection fix(core): Avoid hanging upon bad docker host connection Nov 25, 2024
Copy link
Member

@alexanderankin alexanderankin left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link

codecov bot commented Nov 25, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 2 lines in your changes missing coverage. Please review.

Please upload report for BASE (main@932ee30). Learn more about missing BASE report.

Files with missing lines Patch % Lines
core/testcontainers/core/container.py 60.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #742   +/-   ##
=======================================
  Coverage        ?   85.37%           
=======================================
  Files           ?       12           
  Lines           ?      670           
  Branches        ?      105           
=======================================
  Hits            ?      572           
  Misses          ?       75           
  Partials        ?       23           

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


🚨 Try these New Features:

@alexanderankin alexanderankin merged commit 4ced198 into testcontainers:main Nov 25, 2024
10 checks passed
alexanderankin pushed a commit that referenced this pull request Dec 10, 2024
🤖 I have created a release *beep* *boop*
---


##
[4.9.0](testcontainers-v4.8.2...testcontainers-v4.9.0)
(2024-11-26)


### Features

* **compose:** support for setting profiles
([#738](#738))
([3e00e71](3e00e71))
* **core:** Support working with env files
([#737](#737))
([932ee30](932ee30))


### Bug Fixes

* allow running all tests
([#721](#721))
([f958cf9](f958cf9))
* **core:** Avoid hanging upon bad docker host connection
([#742](#742))
([4ced198](4ced198))
* **core:** running testcontainer inside container
([#714](#714))
([85a6666](85a6666))
* **generic:** Also catch URLError waiting for ServerContainer
([#743](#743))
([24e354f](24e354f))
* update wait_for_logs to not throw on 'created', and an optimization
([#719](#719))
([271ca9a](271ca9a))
* Vault health check
([#734](#734))
([79434d6](79434d6))


### Documentation

* Documentation fix for ServerContainer
([#671](#671))
([0303d47](0303d47))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+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
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: ServerContainer hangs indefinitely waiting for ryuk to start
2 participants