Skip to content

fix(ci): skip valgrind-sensitive background-sender tests and increase live-debugger timeout#3754

Draft
Leiyks wants to merge 19 commits intomasterfrom
leiyks/fix-ci-sampling-debugger-tests
Draft

fix(ci): skip valgrind-sensitive background-sender tests and increase live-debugger timeout#3754
Leiyks wants to merge 19 commits intomasterfrom
leiyks/fix-ci-sampling-debugger-tests

Conversation

@Leiyks
Copy link
Copy Markdown
Contributor

@Leiyks Leiyks commented Mar 30, 2026

What

  • Add valgrind skip guard to agent_sampling.phpt and agent_sampling-standalone-asm_{01,02,03}.phpt
  • Increase debugger_span_probe_class.phpt collection window from 10s to 30s

Why

Background-sender tests (test_extension_ci on PHP 7.1 / 7.4 / 8.3): these tests use synchronous_flush (100ms default timeout) + network I/O via waitForDataAndReplay(). Under valgrind's 10–50× slowdown, the background sender thread never completes within 100ms, causing 300s process timeouts. The guard (USE_ZEND_ALLOC === '0') already exists in adjacent files (agent_sampling_sidecar.phpt) — these 4 were simply missing it.

Live-debugger test (min install tests): debugger_span_probe_class.phpt collects sidecar diagnostics in a do/while loop with a 10s window. For probe 1 (an already-resolved class), the sidecar sends INSTALLED asynchronously at hook-install time — before EMITTING fires. Under resource-constrained CI pods this async delivery can arrive after the window closes. 30s gives sufficient headroom.

How

  • --SKIPIF-- block expanded in 4 files: adds if (getenv('USE_ZEND_ALLOC') === '0' && !getenv('SKIP_ASAN')) die('skip timing sensitive test - valgrind is too slow');
  • debugger_span_probe_class.phpt:64: time() - 10time() - 30

Testing

  • CI: test_extension_ci [7.1 / 7.4 / 8.3] expected green (valgrind pass no longer times out)
  • CI: min install tests expected green (live-debugger probe collection has sufficient window)

… live-debugger timeout

- Add valgrind skip guard to agent_sampling.phpt and agent_sampling-standalone-asm_{01,02,03}.phpt:
  these tests use synchronous_flush (100ms timeout) + network I/O which time out under valgrind's
  10-50x slowdown. Matches the guard already present in agent_sampling_sidecar.phpt.
- Increase debugger_span_probe_class.phpt collection window from 10s to 30s:
  the sidecar's async INSTALLED diagnostic for immediately-resolved class probes can arrive
  late under resource-constrained CI pods (1 CPU / 512Mi service limit).
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.84%. Comparing base (fd1ba67) to head (65c257e).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3754      +/-   ##
==========================================
- Coverage   68.85%   68.84%   -0.02%     
==========================================
  Files         166      166              
  Lines       19015    19015              
  Branches     1792     1792              
==========================================
- Hits        13093    13091       -2     
- Misses       5111     5114       +3     
+ Partials      811      810       -1     
Flag Coverage Δ
helper-rust-integration 78.82% <ø> (ø)
helper-rust-unit 49.36% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
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 fd1ba67...65c257e. 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.

@datadog-prod-us1-3
Copy link
Copy Markdown

datadog-prod-us1-3 bot commented Mar 30, 2026

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 60.68% (+0.00%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 65c257e | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback!

Leiyks added 18 commits March 30, 2026 22:01
…ass probe

Bar's INSTALLED diagnostic is sent asynchronously via sidecar and may
not arrive within the collection window under resource-constrained CI
environments. Since await_probe_installation() already confirms the hook
is installed before any function is called, EMITTING is sufficient proof
that the probe works. Reduce threshold to 4 events (Delayed's full
RECEIVED/INSTALLED/EMITTING lifecycle + Bar's EMITTING) and switch to
--EXPECTREGEX-- to make Bar's INSTALLED optional.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants