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(dependencies): remove usage of sqlalchemy in DB extras. Add default wait timeout for wait_for_logs #525

Merged
merged 15 commits into from
Apr 16, 2024

Conversation

santi
Copy link
Collaborator

@santi santi commented Apr 3, 2024

Removes usage of sqlalchemy, as part of the work described in #526.

  • Adds default timeout to the wait_for_logs waiting strategy, the same timeout used by default in the wait_container_is_ready strategy.
  • Changes wait strategy for mysql container to wait for logs indicating that the DB engine is ready to accept connections (MySQL performs a restart as part of its startup procedure, so the logs will always appear twice.
  • Add More tests for different mysql and mariadb versions to ensure consistency in wait strategy.
  • Remove x86 emulation for ARM devices for MariaDB, as it MariaDB images support ARM architectures already.
  • Change wait strategy for oracle-free, as the images produce a consistent DATABASE IS READY TO USE! log message on startup.

Next steps will be to remove sqlalchemy as a bundled dependency entirely, but I have not included it in this PR as I consider it a bigger change than just changing wait strategies as an internal implementation detail. I plan to do this as part of a bigger rework where i remove the DbContainer class and standardize configuration hooks and wait strategies across containers (not just DB containers, all containers in need of a configuration and readiness step). See #527 for WIP.

@santi santi changed the title Feat/alternative db wait strategies feat(databases): clientless wait strategies Apr 3, 2024
@santi santi changed the title feat(databases): clientless wait strategies feat(dependencies): remove usage of sqlalchemy in DB extras. Add default wait timeout for wait_for_logs Apr 4, 2024
@santi santi marked this pull request as ready for review April 4, 2024 08:09
@alexanderankin alexanderankin changed the title feat(dependencies): remove usage of sqlalchemy in DB extras. Add default wait timeout for wait_for_logs fix(dependencies): remove usage of sqlalchemy in DB extras. Add default wait timeout for wait_for_logs Apr 14, 2024
@alexanderankin
Copy link
Collaborator

since this is such a small change to core and the pypi semver refers to core not modules, ive changed this to a fix. i think that makes sense and what was discussed here - #446 (comment) - if that is okay, please merge @santi

@alexanderankin alexanderankin merged commit fefb9d0 into main Apr 16, 2024
20 checks passed
@alexanderankin alexanderankin deleted the feat/alternative-db-wait-strategies branch April 16, 2024 12:25
alexanderankin pushed a commit that referenced this pull request Apr 17, 2024
🤖 I have created a release *beep* *boop*
---


##
[4.4.0](testcontainers-v4.3.3...testcontainers-v4.4.0)
(2024-04-17)


### Features

* **labels:** Add common testcontainers labels
([#519](#519))
([e04b7ac](e04b7ac))
* **network:** Add network context manager
([#367](#367))
([11964de](11964de))


### Bug Fixes

* **core:**
[#486](#486)
for colima delay for port avail for connect
([#543](#543))
([90bb780](90bb780))
* **core:** add TESTCONTAINERS_HOST_OVERRIDE as alternative to TC_HOST
([#384](#384))
([8073874](8073874))
* **dependencies:** remove usage of `sqlalchemy` in DB extras. Add
default wait timeout for `wait_for_logs`
([#525](#525))
([fefb9d0](fefb9d0))
* tests for Kafka container running on ARM64 CPU
([#536](#536))
([29b5179](29b5179))

---
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.

2 participants