Skip to content

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

Merged
Leiyks merged 31 commits intomasterfrom
leiyks/fix-ci-sampling-debugger-tests
Apr 1, 2026
Merged

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

Conversation

@Leiyks
Copy link
Copy Markdown
Contributor

@Leiyks Leiyks commented Mar 30, 2026

What

  • Skip valgrind for background-sender tests (agent_sampling.phpt + 3 ASM variants)
  • Fix debugger_span_probe_class.phpt flakiness in min install tests
  • Pin symfony/event-dispatcher to 7.3.* to fix test_web_symfony_latest

Why

Valgrind / background-sender: these tests use synchronous_flush (100ms timeout) + network I/O. Under valgrind's 10–50× slowdown the sender never completes, causing 300s timeouts. The skip guard already exists in agent_sampling_sidecar.phpt — these 4 files were missing it.

Live-debugger flakiness: probe 1's INSTALLED diagnostic races the collection window under constrained CI pods. Since await_probe_installation() already confirms the hook is installed, INSTALLED is redundant. Fix reduces threshold to 4 events and strips INSTALLED from probe 1's output.

Symfony latest: symfony/event-dispatcher v7.4.0 introduced an Undefined array key WorkerRunningEvent bug in TraceableEventDispatcher (dev mode). Symfony's error handler converts this to an exception, causing messenger:consume to exit with code 1. Pinned to 7.3.* to match the other Symfony 7.3.x components already pinned in composer.json.

Testing

10-pipeline stability run: min install tests 10/10 ✅, test_extension_ci no new failures ✅.

… 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

Fix all issues with BitsAI or with Cursor

⚠️ Warnings

🧪 1 Test failed

initializationError from com.datadog.appsec.php.integration.Apache2ModTests   View in Datadog   (Fix with Cursor)
org.testcontainers.containers.ContainerFetchException: Can't get Docker image: RemoteDockerImage(imageName=669783387624.dkr.ecr.us-east-1.amazonaws.com/dockerhub/datadog/dd-appsec-php-ci@sha256:d4d8c0d950330bd3c6a6225857aec8eae6989fe38409bccf96d87c480cd7bedb, imagePullPolicy=DefaultPullPolicy(), imageNameSubstitutor=org.testcontainers.utility.ImageNameSubstitutor$LogWrappedImageNameSubstitutor@573aeab2)

org.testcontainers.containers.ContainerFetchException: Can't get Docker image: RemoteDockerImage(imageName=669783387624.dkr.ecr.us-east-1.amazonaws.com/dockerhub/datadog/dd-appsec-php-ci@sha256:d4d8c0d950330bd3c6a6225857aec8eae6989fe38409bccf96d87c480cd7bedb, imagePullPolicy=DefaultPullPolicy(), imageNameSubstitutor=org.testcontainers.utility.ImageNameSubstitutor$LogWrappedImageNameSubstitutor@573aeab2)
	at app//org.testcontainers.containers.GenericContainer.getDockerImageName(GenericContainer.java:1308)
	at app//org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:346)
	at app//com.datadog.appsec.php.docker.AppSecContainer.doStart(AppSecContainer.groovy:110)
	at app//org.testcontainers.containers.GenericContainer.start(GenericContainer.java:317)
	at app//org.testcontainers.junit.jupiter.TestcontainersExtension$StoreAdapter.start(TestcontainersExtension.java:276)
	at app//org.testcontainers.junit.jupiter.TestcontainersExtension$StoreAdapter.access$200(TestcontainersExtension.java:263)
	at app//org.testcontainers.junit.jupiter.TestcontainersExtension.lambda$startContainers$4(TestcontainersExtension.java:83)
...

ℹ️ Info

No other issues found (see more)

❄️ No new flaky tests detected

🎯 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: 57088ad | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback!

Leiyks added 26 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.
--EXPECTREGEX-- forward slashes in the URL broke the PCRE delimiter.
Switch back to --EXPECTF-- and normalize probe 1's state list in PHP:
strip INSTALLED (which the sidecar delivers async and may miss the
collection window) so the output is deterministic. The hook being
installed is already confirmed by await_probe_installation().
Leiyks added 4 commits April 1, 2026 13:40
symfony/event-dispatcher v7.4.0 introduced a regression in
TraceableEventDispatcher that triggers "Undefined array key
WorkerRunningEvent" in dev mode. Symfony's error handler converts this
PHP warning to an exception, causing messenger:consume to exit with
code 1 and breaking testAsyncWithTracerDisabledOnConsume.

Pin to 7.3.* to match the other pinned Symfony 7.3.x components
(framework-bundle 7.3.4, console 7.3.4, messenger 7.3.3).
@Leiyks Leiyks marked this pull request as ready for review April 1, 2026 14:14
@Leiyks Leiyks requested a review from a team as a code owner April 1, 2026 14:14
Copy link
Copy Markdown
Collaborator

@bwoebi bwoebi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking care of this!

@Leiyks Leiyks merged commit 856068a into master Apr 1, 2026
2100 checks passed
@Leiyks Leiyks deleted the leiyks/fix-ci-sampling-debugger-tests branch April 1, 2026 16:31
@github-actions github-actions Bot added this to the 1.18.0 milestone Apr 1, 2026
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.

3 participants