Repository navigation
fix(test-consume): harden enginex hive reporting against connection errors - #3335
danceratopz wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## forks/amsterdam #3335 +/- ##
================================================
Coverage 93.90% 93.90%
================================================
Files 624 624
Lines 36905 36905
Branches 3326 3326
================================================
Hits 34655 34655
Misses 1569 1569
Partials 681 681
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
888b8ec to
d1c8015
Compare
Track executed, reported, and pre-Hive skipped test IDs per worker, then verify the aggregate after the session-wide EngineX suite finishes. Skip the invariant for distributed early stops and fail both undercounts and overcounts. Leave non-idempotent Hive requests single-shot so ambiguous response failures cannot duplicate them; ethereum-hive owns safe connection-establishment retries. Add focused accounting and real xdist early-stop coverage, and make the pytest_hive directories regular packages to avoid test import collisions.
d1c8015 to
171b479
Compare
|
Closing in favour of #3879. The root cause (one new TCP connection per hive API call, which exhausted ephemeral ports) is fixed in hive-python-api#18 (ethereum/hive-python-api#18), released in ethereum-hive v0.1.0 (https://pypi.org/project/ethereum-hive/0.1.0/), which this repo already requires. Since then, every consume-enginex run on hive.ethpandaops.io (178 runs from 2026-09-21 to 2026-10-21, all clients) reported the full test count of its fixture release, and the latest geth, reth and Nethermind runs have no "Test was terminated by host" results. The extra result-count check here is no longer worth its size. #3879 keeps the one remaining fix from this PR: end each hive test only once. |
Draft: refreshed CI and final confirmation pending
The root transport fix is shipped and is now the project baseline: hive-python-api#18 merged,
ethereum-hivev0.1.0 is published on PyPI, and execution-specs#3472 updatedforks/amsterdamto useethereum-hive>=0.1.0,<1.0.0.Description
This PR adds complementary simulator-side detection for the silent Hive result loss observed during the TIME_WAIT ephemeral-port exhaustion incident behind sporadic Nethermind
consume-enginexdashboard failures on 2026-07-18/19. The package fix pools Hive API connections and safely retries connection establishment; this PR makes any remaining reporting loss visible and fails the pytest run.reported-test-count-checkfailures after-x,--maxfail, or another partial run.reported-test-count-checkmeta-test to Hive and raisesHiveReportedTestCountError, so missing results cannot silently shrink the dashboard total.start_test,end_test, andregister_multi_test_clientare not retried at the application layer. This avoids duplicating a Hive request when a response-side disconnect is surfaced asrequests.ConnectionErrorafter the server may already have processed the POST. Safe connection-establishment retries remain the responsibility ofethereum-hivev0.1.0.The accounting helpers live in
plugins/pytest_hive/reporting.py. Thepytest_hiveplugin and test directories are regular packages to avoid pytest prepend-mode import collisions.Validation
--devand Nethermind: 12,888 Cancun tests at-n 4, identical verdicts, 12,888/12,888 reported, and peak TIME_WAIT toward the Hive API reduced from 9,684 to 66 with the pooled package.--dev,consume enginex, tests@v20.0.2, geth, and Nethermind: 7,848/7,848 passed.pytest -n 2 -xregression covering cross-worker early-stop behavior.just staticpassed, including Ruff, mypy, codespell, vulture, actionlint, andethereum-spec-lint.Dependency status
The package-side work and dependency update are complete:
ethereum-hivev0.1.0 tag and PyPI package.forks/amsterdam.Related issues and PRs
The original incident was simulator-side Hive API ephemeral-port exhaustion, not a Nethermind client defect. The root transport fix is hive-python-api#18; this PR provides complementary reporting hardening and silent-loss detection.
Checklist
just static<type>(<area>): <title>, where<type>and<area>come from an appropriateC-<type>, respectivelyA-<area>, label. The title should match the target squash commit message.Cute animal picture