Repository navigation
fix(tests): run the worker-replacement chaos test under strict supervision - #51296
mateo-berri wants to merge 1 commit into
Conversation
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
PR overviewNo security issues were found in this pull request. Reviews
|
[Low impact] This test-only change appears safe to merge. SummaryThe worker-replacement test now uses strict supervision. The worker-pause test keeps lenient supervision through a separate fixture. Removing the fixed timeout lets the runner apply its calibrated budget.
Reviews (1) · Last reviewed commit: "Use strict supervision for worker replac..." · Reviewed by Greptile |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 41e0d91. Configure here.
Handwritten 1-3 sentence description
The fine-tuning chaos test that kills each proxy worker could time out in CI because its proxy ran with the long healthcheck meant for the worker-pause test, so uvicorn took minutes to notice each dead worker. This gives the kill test its own proxy with normal supervision and lets the module use the calibrated per-test timeout, so the scheduled
extensionsrun stops failing on itDetails
TLDR
Problem this solves:
test_a_replaced_worker_still_sends_the_provider_file_idshit pytest-timeout (>480s) in scheduled run 42680944695WorkerHealthcheck.LENIENT, which is12 x import_seconds, 262s on that boxtimeout(480)also bypassed the calibrated budget (920s on that box)How it solves it:
rig(STRICT, 5s healthcheck) andsuspension_rig(LENIENT)test_each_worker_alone_sends_the_provider_file_idssuspends workers, so only it uses LENIENT_support/budget.pycalibration like other owned-proxy testsTriage verdict is a test/harness bug, not a product or infra fault. The CI proxy log for gw11 shows both killed workers were reaped and replaced (
Child process [102829] died, thenStarted server process [269067]ready about 280s after test start). The harness and lockfile have no diff between the last passing shad10de278c1and the failing457365f, the combination came in with #46552Screenshots / Proof of Fix
Shared setup is local PostgreSQL and Redis per
tests/integration/README.md, two-worker owned proxies built by the same_rigthe test uses. The script suspends each worker for 0.8s so the supervisor has a ping in flight, SIGKILLs it, then measures kill to reap and kill to replacement readiness. LENIENT was scaled to this box's calibration (36s), STRICT stays 5sreal_proxy_healthcheck_proof.py
Before (072290e, fixture used LENIENT for the kill test)
Each kill waits out the full lenient healthcheck. At CI's 262s that is two waits over 480s, which is the reported timeout inside
_wait_until_reapedAfter (41e0d91, kill test uses STRICT)
Full module at the tip via
uv run python tests/integration/run.py extensionsfiltered to this file, two pytest workersGates were
ruff check,ruff format --checkandscripts/test_quality_gate.py --base origin/main, all cleanType
✅ Test
Caveats (if any)
Low
Link to Devin session: https://app.devin.ai/sessions/4818bd0c68974edaa320f8d39ba32257
Open in Devin Desktop: https://app.devin.ai/desktop/session/4818bd0c68974edaa320f8d39ba32257?variant=devin
Requested by: @mateo-berri
Bugbot summary