Skip to content

fix(test): stabilize crashtracker_segfault_disabled test and isolate RC requests in request-replayer#3668

Open
Leiyks wants to merge 5 commits intomasterfrom
leiyks/fix-request-replayer-bug
Open

fix(test): stabilize crashtracker_segfault_disabled test and isolate RC requests in request-replayer#3668
Leiyks wants to merge 5 commits intomasterfrom
leiyks/fix-request-replayer-bug

Conversation

@Leiyks
Copy link
Contributor

@Leiyks Leiyks commented Feb 23, 2026

Problem

crashtracker_segfault_disabled.phpt was flaking because commit 32aaf0a7b started writing /v0.7/config remote-config poll requests into the same dump file as telemetry. This caused the test's broad matcher to find false positives and never time out as expected.

Fix

Request-replayer: /v0.7/config requests are now written to a dedicated rc_requests.json file and exposed via a new /replay-rc-requests endpoint, keeping /replay uncontaminated by RC traffic.

Test rewrite: replaced the fragile timeout-based negative assertion with a bounded 5 s poll that looks for is_crash: true in telemetry logs — the definitive indicator that a crash report was sent. Also added clearDumpedData() before the test runs to avoid stale entries, and suppressed segfault stderr output (2>/dev/null) so the --EXPECT-- check is not polluted by the shell message.

@datadog-datadog-prod-us1-2
Copy link

datadog-datadog-prod-us1-2 bot commented Feb 23, 2026

⚠️ Tests

Fix all issues with BitsAI or with Cursor

⚠️ Warnings

🧪 1028 Tests failed

testSearchPhpBinaries from integration.DDTrace\Tests\Integration\PHPInstallerTest (Datadog) (Fix with Cursor)
DDTrace\Tests\Integration\PHPInstallerTest::testSearchPhpBinaries
Test code or tested code printed unexpected output: Searching for available php binaries, this operation might take a while.
testSimplePushAndProcess from laravel-58-test.DDTrace\Tests\Integrations\Laravel\V5_8\QueueTest (Datadog) (Fix with Cursor)
DDTrace\Tests\Integrations\Laravel\V5_8\QueueTest::testSimplePushAndProcess
Test code or tested code printed unexpected output: spanLinksTraceId: 69a0163d00000000068d4366d8bb4829
tid: 69a0163d00000000
hexProcessTraceId: 068d4366d8bb4829
hexProcessSpanId: f779bd91f2ba65be
processTraceId: 472107644945647657
processSpanId: 17832492634090399166

phpvfscomposer://tests/vendor/phpunit/phpunit/phpunit:106
testSimplePushAndProcess from laravel-8x-test.DDTrace\Tests\Integrations\Laravel\V8_x\QueueTest (Datadog) (Fix with Cursor)
DDTrace\Tests\Integrations\Laravel\V8_x\QueueTest::testSimplePushAndProcess
Test code or tested code printed unexpected output: spanLinksTraceId: 69a01759000000002ab030d9184f427f
tid: 69a0175900000000
hexProcessTraceId: 2ab030d9184f427f
hexProcessSpanId: 2d3be325ce3293ce
processTraceId: 3076012254467932799
processSpanId: 3259448506845402062

phpvfscomposer://tests/vendor/phpunit/phpunit/phpunit:106
View all

ℹ️ Info

❄️ No new flaky tests detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 584ffcd | Docs | Datadog PR Page | Was this helpful? Give us feedback!

@codecov-commenter
Copy link

codecov-commenter commented Feb 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.17%. Comparing base (07b618a) to head (584ffcd).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3668      +/-   ##
==========================================
- Coverage   62.19%   62.17%   -0.02%     
==========================================
  Files         141      141              
  Lines       13352    13352              
  Branches     1746     1746              
==========================================
- Hits         8304     8302       -2     
- Misses       4256     4259       +3     
+ Partials      792      791       -1     

see 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 07b618a...584ffcd. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Leiyks Leiyks force-pushed the leiyks/fix-request-replayer-bug branch 11 times, most recently from e4fbacc to 84fd1d7 Compare February 25, 2026 10:13
@Leiyks Leiyks changed the title feat(request-replayer): write remote config to a separate file test(crashtracker): fix segfault_disabled flakiness with new request-replayer image Feb 25, 2026
@Leiyks Leiyks marked this pull request as ready for review February 25, 2026 10:21
@Leiyks Leiyks requested a review from a team as a code owner February 25, 2026 10:21
@Leiyks Leiyks force-pushed the leiyks/fix-request-replayer-bug branch 2 times, most recently from c62d5f4 to af5d446 Compare February 25, 2026 16:15
@Leiyks Leiyks changed the title test(crashtracker): fix segfault_disabled flakiness with new request-replayer image fix(test): stabilize crashtracker_segfault_disabled test and isolate RC requests in request-replayer Feb 26, 2026
@Leiyks Leiyks force-pushed the leiyks/fix-request-replayer-bug branch from af5d446 to 693878e Compare February 26, 2026 09:00
Signed-off-by: Alexandre Rulleau <alexandre.rulleau@datadoghq.com>
…properly filter

Signed-off-by: Alexandre Rulleau <alexandre.rulleau@datadoghq.com>
Signed-off-by: Alexandre Rulleau <alexandre.rulleau@datadoghq.com>
…able

Signed-off-by: Alexandre Rulleau <alexandre.rulleau@datadoghq.com>
… non-debug request-replayer

- Add 2>/dev/null to silence segfault output from child process on stdout
- Switch CI to use php-request-replayer-2.0 instead of the debug variant
@Leiyks Leiyks force-pushed the leiyks/fix-request-replayer-bug branch from 693878e to 584ffcd Compare February 26, 2026 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants