Fix ping-pong send ConnectionResetError noise at ERROR level (OPS-3616)#68
Open
palantir-valiot[bot] wants to merge 2 commits into
Open
Fix ping-pong send ConnectionResetError noise at ERROR level (OPS-3616)#68palantir-valiot[bot] wants to merge 2 commits into
palantir-valiot[bot] wants to merge 2 commits into
Palantir - Valiot / Palantir PR Reviewer
succeeded
Jun 24, 2026 in 23s
No issues found
Overall Assessment
This PR fixes noisy ERROR+traceback logs in _ping_pong when transient connection errors (ConnectionResetError, BrokenPipeError, etc.) occur during the keep-alive ping send. The fix mirrors the exact classification pattern already used in _sub_routing_loop recv (OPS-3485). No blocking bugs found.
Findings
No actionable findings.
Notes
- TDD followed per AGENTS.md: tests written first (red because send path always emitted ERROR), then made green by the
isinstance(e, TRANSIENT_WS_ERRORS)guard. - Tests are hermetic (<100 ms, no sockets,
patch("time.sleep")+ side-effect termination) and modeled exactly on the existing recv regression tests. TRANSIENT_WS_ERRORSconstant (defined at module level, lines 35-40) is reused; the log message for transient cases matches the recv path exactly.- Version bump, CHANGELOG entry, and CI checks (format/bandit/pytest/lock) all completed as required.
Loading