fix(connectors): Harden Elasticsearch sink test readiness - #3729
Open
ryerraguntla wants to merge 11 commits into
Open
fix(connectors): Harden Elasticsearch sink test readiness#3729ryerraguntla wants to merge 11 commits into
ryerraguntla wants to merge 11 commits into
Conversation
Add a timeout to the Elasticsearch sink transport, make connectors-runtime readiness check `/health`, and strengthen the Elasticsearch test fixture startup path with retry, cluster-health polling, and stale-index cleanup. Also refresh the sink index before counting documents so test assertions see newly indexed data sooner.
Use short-timeout probes without retries for cluster health and stale index sweep, and cap docker rm so a wedged daemon cannot stall setup.
|
Thanks for the PR. It is labeled Slash commands (own line, regular comment) move it around the queue:
See CONTRIBUTING.md for details. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3729 +/- ##
=============================================
- Coverage 75.86% 38.71% -37.16%
Complexity 969 969
=============================================
Files 1323 1310 -13
Lines 160111 135293 -24818
Branches 133501 110729 -22772
=============================================
- Hits 121476 52376 -69100
- Misses 34993 80145 +45152
+ Partials 3642 2772 -870
🚀 New features to boost your workflow:
|
Contributor
Author
|
/request-review @user-or-team |
Only docker rm the shared reuse container after inspect shows a removable state, and serialize recovery with a cross-process lock so transient start flakes cannot yank a healthy instance from a peer nextest worker.
Contributor
Author
|
/ready |
hubcio
requested changes
Jul 23, 2026
hubcio
left a comment
Contributor
There was a problem hiding this comment.
not in this diff, same class of problem:
- elasticsearch source
create_client()(core/connectors/sources/elasticsearch_source/src/lib.rs:304) still builds its transport with no timeout - sameopen()-hang failure mode this PR fixes for the sink, so source tests keep the #3728 flake class. worth a follow-up. mcp.rswait_ready()still uses the pattern this PR fixed for connectors: GET/, anyOk(_)counts as ready, no process-crash fast-fail. consistency follow-up.
short-timeout health clients, wait_for_status , cluster readiness, async try_lock recovery, and timeout docs clarifying client-global clamp vs apache#3728 flake fix.
Contributor
Author
|
/ready |
numinnex
reviewed
Jul 31, 2026
slbotbm
requested changes
Aug 2, 2026
Use short-timeout probe clients for both refresh and document count polling so degraded Elasticsearch endpoints do not stall fixture waits for minutes. Also simplify the removable-wedged check to only treat non-running Docker states as safe to force-remove, and improve the failure warning with manual recovery guidance for genuinely wedged running containers.
Contributor
Author
|
/ready |
Contributor
Author
|
/request-review @slbotbm |
slbotbm
approved these changes
Aug 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
iggy-connectorsnever becomes healthy because sink
open()can hang on Elasticsearch HTTPwith no client timeout, while the connectors HTTP API only binds after
plugin open.
127.0.0.1, alwaysre-check
/_cluster/healthon reuse attach, self-heal a wedgediggy-test-elasticsearchcontainer only, and sweep stale harness indicesolder than 30 minutes.
/healthand fail fast if thechild process dies during retries; refresh the index before document-count
polls in the sink fixture.
Closes #3728
Test plan
cargo fmt --allcargo sort --no-format --workspacecargo clippy -p iggy_connector_elasticsearch_sink -p integration --all-features --all-targets -- -D warningscargo test -p integration -- connectors::elasticsearch::elasticsearch_sink::elasticsearch_sink_stores_json_messagesdocker rm -frecovery targets onlyiggy-test-elasticsearch(no other Elasticsearch containers)
iggy-test-elasticsearchrunning and re-runthe sink test to verify reuse + readiness path
Notes
iggy-test-elasticsearchonly.tests sharing the reused container are not disrupted.