test(fastapi): skip flaky websocket subprocess test on 3.19#18982
test(fastapi): skip flaky websocket subprocess test on 3.19#18982christophe-papazian wants to merge 1 commit into
Conversation
|
|
🎉 All green!🧪 All tests passed 🔗 Commit SHA: 0625a8b | Docs | Datadog PR Page | Give us feedback! |
The fastapi websocket subprocess tests (test_traced_websocket, test_websocket_only_sends, test_websocket_tracing_sampling_not_inherited, test_websocket_tracing_not_separate_traces) assert the child process emits no STDERR, but a benign asyncio event-loop teardown warning (BaseEventLoop.__del__ ... 'Invalid file descriptor: -1') pollutes STDERR and fails them deterministically on the release pipeline. It is not a tracer bug (the traceback is pure CPython asyncio, no ddtrace frames), and main already resolves it by running these in-process. Skip them on 3.19. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
d731c1b to
0625a8b
Compare
Performance SLOsComparing candidate christophe-papazian/skip-fastapi-websocket-ws-teardown (0625a8b) with baseline 3.19 (de71349) 🟡 Near SLO Breach (3 suites)🟡 errortrackingflasksqli - 6/6✅ errortracking-enabled-allTime: ✅ 2.107ms (SLO: <2.300ms -8.4%) vs baseline: -0.1% Memory: ✅ 55.371MB (SLO: <56.500MB 🟡 -2.0%) vs baseline: +5.5% ✅ errortracking-enabled-userTime: ✅ 2.126ms (SLO: <2.250ms -5.5%) vs baseline: +0.2% Memory: ✅ 55.432MB (SLO: <56.500MB 🟡 -1.9%) vs baseline: +5.6% ✅ tracer-enabledTime: ✅ 2.111ms (SLO: <2.300ms -8.2%) vs baseline: ~same Memory: ✅ 55.273MB (SLO: <56.500MB -2.2%) vs baseline: +5.3% 🟡 flasksimple - 18/18✅ appsec-getTime: ✅ 4.636ms (SLO: <4.750ms -2.4%) vs baseline: ~same Memory: ✅ 64.737MB (SLO: <66.500MB -2.7%) vs baseline: +5.0% ✅ appsec-postTime: ✅ 6.671ms (SLO: <6.750ms 🟡 -1.2%) vs baseline: +0.3% Memory: ✅ 65.108MB (SLO: <66.500MB -2.1%) vs baseline: +4.8% ✅ appsec-telemetryTime: ✅ 4.625ms (SLO: <4.750ms -2.6%) vs baseline: -0.2% Memory: ✅ 64.758MB (SLO: <66.500MB -2.6%) vs baseline: +4.9% ✅ debuggerTime: ✅ 1.872ms (SLO: <2.000ms -6.4%) vs baseline: ~same Memory: ✅ 48.511MB (SLO: <49.500MB 🟡 -2.0%) vs baseline: +4.6% ✅ iast-getTime: ✅ 1.877ms (SLO: <2.000ms -6.1%) vs baseline: +0.6% Memory: ✅ 45.064MB (SLO: <49.000MB -8.0%) vs baseline: +4.0% ✅ profilerTime: ✅ 1.934ms (SLO: <2.100ms -7.9%) vs baseline: ~same Memory: ✅ 48.121MB (SLO: <50.000MB -3.8%) vs baseline: +4.8% ✅ resource-renamingTime: ✅ 3.400ms (SLO: <3.650ms -6.9%) vs baseline: ~same Memory: ✅ 55.401MB (SLO: <56.000MB 🟡 -1.1%) vs baseline: +5.2% ✅ tracerTime: ✅ 3.386ms (SLO: <3.650ms -7.2%) vs baseline: -0.3% Memory: ✅ 55.295MB (SLO: <56.500MB -2.1%) vs baseline: +4.8% ✅ tracer-nativeTime: ✅ 3.388ms (SLO: <3.650ms -7.2%) vs baseline: +0.2% Memory: ✅ 55.441MB (SLO: <60.000MB -7.6%) vs baseline: +4.9% 🟡 flasksqli - 6/6✅ appsec-enabledTime: ✅ 4.048ms (SLO: <4.200ms -3.6%) vs baseline: +0.3% Memory: ✅ 65.284MB (SLO: <66.000MB 🟡 -1.1%) vs baseline: +4.7% ✅ iast-enabledTime: ✅ 2.505ms (SLO: <2.800ms 📉 -10.5%) vs baseline: -0.3% Memory: ✅ 61.226MB (SLO: <62.500MB -2.0%) vs baseline: +4.9% ✅ tracer-enabledTime: ✅ 2.099ms (SLO: <2.250ms -6.7%) vs baseline: ~same Memory: ✅ 55.551MB (SLO: <56.500MB 🟡 -1.7%) vs baseline: +5.2%
|
Why
The fastapi websocket subprocess tests are the only tests consistently failing on the 3.19 release pipeline (
contrib/fastapi 1/4):test_traced_websockettest_websocket_only_sendstest_websocket_tracing_sampling_not_inheritedtest_websocket_tracing_not_separate_tracesEach runs in a subprocess and asserts the child's STDERR is empty, but Python's asyncio event loop emits a benign teardown warning at interpreter shutdown:
which pollutes STDERR and fails the assertion deterministically.
This is not a tracer bug — the traceback is pure CPython
asyncio/selectors(noddtraceframes) and Python itself ignores the exception (process exits 0).mainalready resolves it by running these tests in-process. Rather than backport that larger refactor to a release branch, we skip them on 3.19.changelog/no-changelog (test-only change)
🤖 Generated with Claude Code