GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(elasticsearch): Use wait strategy instead of deprecated decorator by artem-ilin · Pull Request #915 · testcontainers/testcontainers-python

Conversation

@artem-ilin

@artem-ilin artem-ilin commented Nov 4, 2025

Copy link
Copy Markdown
Contributor

Part of fixing #874.

Decided to remove get_url method as it's no longer used and is not part of the protocol.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@artem-ilin

artem-ilin commented Nov 5, 2025

Copy link
Copy Markdown
Contributor Author

@alexanderankin whenever you have time please take a look

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@artem-ilin

artem-ilin commented Nov 12, 2025

Copy link
Copy Markdown
Contributor Author

@alexanderankin kind reminder

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@artem-ilin
artem-ilin force-pushed the elasticsearch-wait-strategy branch from afd19bc to 3fe0eb8 Compare November 14, 2025 13:57
@artem-ilin
fix(elasticsearch): Use wait strategy instead of deprecated decorator
2d39872
@artem-ilin
artem-ilin force-pushed the elasticsearch-wait-strategy branch from 3fe0eb8 to 2d39872 Compare December 5, 2025 11:16
@artem-ilin artem-ilin mentioned this pull request Dec 5, 2025
fix(minio): Use wait strategy instead of deprecated decorator #899
Merged
@artem-ilin
Merge branch 'main' into elasticsearch-wait-strategy
3c08dbb
@artem-ilin

artem-ilin commented Dec 5, 2025

Copy link
Copy Markdown
Contributor Author

@alexanderankin please take a look

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

alexanderankin
alexanderankin approved these changes Dec 5, 2025
View reviewed changes
@alexanderankin

alexanderankin commented Dec 5, 2025

Copy link
Copy Markdown
Member

lets see the tests pass on python 3.9 for the module and then merge

artem-ilin reacted with rocket emoji
All reactions
  • 🚀 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@codecov

codecov Bot commented Dec 5, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.93%. Comparing base (2d9eee3) to head (3c08dbb).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #915      +/-   ##
==========================================
- Coverage   78.18%   77.93%   -0.25%     
==========================================
  Files          14       14              
  Lines        1210     1210              
  Branches      187      187              
==========================================
- Hits          946      943       -3     
- Misses        222      226       +4     
+ Partials       42       41       -1     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@artem-ilin

artem-ilin commented Dec 5, 2025

Copy link
Copy Markdown
Contributor Author

@alexanderankin Huge thanks! Tests seem to pass. The codecov and docs/build jobs fail in the main branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@alexanderankin
alexanderankin merged commit c785ecd into testcontainers:main Dec 5, 2025
@github-actions github-actions Bot mentioned this pull request Dec 5, 2025
chore(main): release testcontainers 4.14.0 #921
Merged
@artem-ilin
artem-ilin deleted the elasticsearch-wait-strategy branch December 5, 2025 18:18
@jbrinkman jbrinkman mentioned this pull request Dec 11, 2025
valkey test container daric93/testcontainers-python#1
Open
@pmorch pmorch mentioned this pull request Dec 27, 2025
fix(mongodb): Use wait strategy instead of deprecated wait_for_logs #943
Merged
alexanderankin pushed a commit that referenced this pull request Jan 7, 2026
@github-actions
chore(main): release testcontainers 4.14.0 (#921)
d7953b8
🤖 I have created a release *beep* *boop*
---


##
[4.14.0](testcontainers-v4.13.3...testcontainers-v4.14.0)
(2026-01-07)


### Features

* Add ExecWaitStrategy and migrate Postgres from deprecated decorator
([#935](#935))
([2d9eee3](2d9eee3))


### Bug Fixes

* add ruff to deps
([#919](#919))
([5853d32](5853d32))
* **cassandra,mysqk,kafka:** Use wait strategy instead of deprecated
wait_for_logs
([#945](#945))
([b7791b9](b7791b9))
* **core:** recreate poetry lockfile with latest versions of libraries
([#946](#946))
([9a97385](9a97385))
* **elasticsearch:** Use wait strategy instead of deprecated decorator
([#915](#915))
([c785ecd](c785ecd))
* **minio:** minio client requires kwargs now
([#933](#933))
([37f5902](37f5902))
* **minio:** Use wait strategy instead of deprecated decorator
([#899](#899))
([febccb7](febccb7))

---
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>
@maspetsberger

maspetsberger commented Jan 12, 2026

Copy link
Copy Markdown

Is there a specfic reason why the get_url function was removed?
It was a quite convenient way for downstream users to connect to, and pretty much all other containers offer a comparable feature.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@alexanderankin

alexanderankin commented Jan 12, 2026

Copy link
Copy Markdown
Member

i would probably say that this is because it is not specific to this subclass of Container, but that is not great, we can bring that back.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@artem-ilin

artem-ilin commented Jan 12, 2026

Copy link
Copy Markdown
Contributor Author

@maspetsberger I apologize for the inconvenience.
My motivation was that the method is not used internally anymore and was not documented.
Probably it was not a good idea to just remove it, without deprecation or anything.
Anyway, you can use f"http://{es.get_container_host_ip()}:{es.get_exposed_port(es.port)}" as a hot fix.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@maspetsberger

maspetsberger commented Jan 13, 2026

Copy link
Copy Markdown

No worries Artem, I got it sorted on my end - after all it is not that complex of a function.

If you can put it in the backlog to bring it back, that would be appreciated.
I think it would be good for convenience as well as architecture (since it allows for hiding the internals).

Thanks for responding so quickly.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

alexanderankin added a commit that referenced this pull request Jun 3, 2026
@pmorch @alexanderankin
fix(mongodb): Use wait strategy instead of deprecated wait_for_logs (#…
c8118e7
…943)

# fix(mongodb): Use wait strategy instead of deprecated wait_for_logs

## Summary

Replace the deprecated `wait_for_logs` function with
`LogMessageWaitStrategy` in the MongoDB container module.

This is part of a fix for
#874 and
similar to:
- #899 (MinIO - merged)
- #915 (Elasticsearch - merged)
- #935 (Postgres - merged)
- #903 (Kafka/Redpanda - open)
- #914 (Redis - open)
- #941 (Redis - open)

## Changes

- Import `LogMessageWaitStrategy` instead of `wait_for_logs`
- Pass `_wait_strategy=LogMessageWaitStrategy(...)` to parent
constructor
- Override `_connect()` with empty implementation (DbContainer's base
implementation uses SQLAlchemy which doesn't apply to MongoDB)

## Testing

All existing MongoDB tests pass:
```
poetry run pytest modules/mongodb/tests/ -v
======================== 4 passed in 16.26s ========================
```

No deprecation warnings from testcontainers after this change.

Co-authored-by: David Ankin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@alexanderankin alexanderankin alexanderankin approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@artem-ilin @alexanderankin @maspetsberger
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.