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

… before starting kafka

Signed-off-by: Alexandre Rulleau <alexandre.rulleau@datadoghq.com>
@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.81%. Comparing base (64813c5) to head (34a1dec).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3560      +/-   ##
==========================================
- Coverage   61.95%   61.81%   -0.14%     
==========================================
  Files         140      140              
  Lines       13281    13281              
  Branches     1758     1758              
==========================================
- Hits         8228     8210      -18     
- Misses       4264     4282      +18     
  Partials      789      789              

see 4 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 64813c5...34a1dec. 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 added 2 commits January 8, 2026 15:22
Signed-off-by: Alexandre Rulleau <alexandre.rulleau@datadoghq.com>
Signed-off-by: Alexandre Rulleau <alexandre.rulleau@datadoghq.com>
@pr-commenter
Copy link

pr-commenter bot commented Jan 8, 2026

Benchmarks [ profiler ]

Benchmark execution time: 2026-01-08 16:29:43

Comparing candidate commit a8dc442 in PR branch leiyks/fix-flaky-ci-tests with baseline commit 64813c5 in branch master.

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

@Leiyks Leiyks force-pushed the leiyks/fix-flaky-ci-tests branch 4 times, most recently from c5a604b to a8dc442 Compare January 8, 2026 16:14
Signed-off-by: Alexandre Rulleau <alexandre.rulleau@datadoghq.com>
@Leiyks Leiyks force-pushed the leiyks/fix-flaky-ci-tests branch from a8dc442 to 34a1dec Compare January 9, 2026 12:47
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