Skip to content

Conversation

@Leiyks
Copy link
Contributor

@Leiyks Leiyks commented Jan 8, 2026

This PR addresses several recurring flaky tests.

1. Kafka Integration Tests - Race Condition

Issue:
Kafka and Zookeeper start in parallel. Kafka attempts to connect before Zookeeper completes initialization.

Fix:

  • .gitlab/generate-common.php: Added Zookeeper readiness check to Kafka entrypoint (waits for ruok/imok response)
  • .gitlab/wait-for-service-ready.sh: Added Zookeeper service detection and native health check, increased Kafka settle time

2. CentOS Package Verification - Yum Timeouts

Issue:
verify centos failing with "Exiting on user cancel" - actually yum's 30-second stalled download timeout. Retries happened immediately, hitting same network issues.

Fix:

  • dockerfiles/verify_packages/centos/install.sh: Increased yum timeout to 300s, added 5-second delay between retries

3. Profiling Tests - PHP 7.X jit allocation

Issue:
allocation_jit_01.phpt failing on PHP 7.X versions even tho jit feature is available for 8.0+ versions.

Fix:

  • profiling/tests/phpt/allocation_jit_01.phpt: Added skip condition for PHP < 8.0 (consistent with other JIT tests)

4. Extension CI Tests - Valgrind Timeouts

Issue:
agent_sampling-standalone-asm_*.phpt timing out during valgrind run (second pass with memory checking). Valgrind causes slowdown which is enough to hit PHP 60s test timeout.

Fix:

  • tests/ext/background-sender/agent_sampling-standalone-asm_*.phpt: Increased maxIteration and loop number of iterations

@Leiyks Leiyks changed the title fix(test_integrations_kafka): properly wait for zookeeper to be ready… fix(CI): resolve flaky tests Jan 8, 2026
@codecov-commenter
Copy link

codecov-commenter commented Jan 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.90%. Comparing base (4a26042) to head (88ce401).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3560      +/-   ##
==========================================
+ Coverage   61.81%   61.90%   +0.09%     
==========================================
  Files         140      140              
  Lines       13281    13281              
  Branches     1758     1758              
==========================================
+ Hits         8209     8221      +12     
+ Misses       4282     4272      -10     
+ Partials      790      788       -2     

see 2 files 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 4a26042...88ce401. 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.

@pr-commenter
Copy link

pr-commenter bot commented Jan 8, 2026

Benchmarks [ profiler ]

Benchmark execution time: 2026-01-13 10:50:17

Comparing candidate commit 88ce401 in PR branch leiyks/fix-flaky-ci-tests with baseline commit 4a26042 in branch master.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 30 metrics, 6 unstable metrics.

@Leiyks Leiyks force-pushed the leiyks/fix-flaky-ci-tests branch 5 times, most recently from a8dc442 to 34a1dec Compare January 9, 2026 12:47
@Leiyks Leiyks marked this pull request as ready for review January 9, 2026 13:05
@Leiyks Leiyks requested review from a team as code owners January 9, 2026 13:05
@Leiyks Leiyks force-pushed the leiyks/fix-flaky-ci-tests branch from 34a1dec to 9648227 Compare January 9, 2026 13:21
… before starting kafka

Signed-off-by: Alexandre Rulleau <alexandre.rulleau@datadoghq.com>
Signed-off-by: Alexandre Rulleau <alexandre.rulleau@datadoghq.com>
Signed-off-by: Alexandre Rulleau <alexandre.rulleau@datadoghq.com>
Signed-off-by: Alexandre Rulleau <alexandre.rulleau@datadoghq.com>
@Leiyks Leiyks force-pushed the leiyks/fix-flaky-ci-tests branch from 9648227 to 88ce401 Compare January 13, 2026 10:36
@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Jan 13, 2026

⚠️ Tests

Fix all issues with Cursor

⚠️ Warnings

🧪 2063 Tests failed

testSearchPhpBinaries from integration.DDTrace\Tests\Integration\PHPInstallerTest (Datadog) (Fix with Cursor)
Risky Test
phpvfscomposer://tests/vendor/phpunit/phpunit/phpunit:52

    testSimplePushAndProcess from laravel-58-test.DDTrace\Tests\Integrations\Laravel\V5_8\QueueTest (Fix with Cursor)

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: 6966300e00000000d934a34407c4bed7
tid: 6966300e00000000
hexProcessTraceId: d934a34407c4bed7
hexProcessSpanId: 89e1581ee2fef71e
processTraceId: 15651314117602754263
processSpanId: 9935319142636648222
View all

ℹ️ Info

❄️ No new flaky tests detected

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

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