Skip to content

Conversation

@Leiyks
Copy link
Contributor

@Leiyks Leiyks commented Jan 13, 2026

Description

This PR fixes multiple sources of test flakiness in CI by implementing proper retry/wait logic and fixing dependency installation.

  1. Laravel Octane Test Flakiness
  • Added waitUntilServerRunning() to properly wait for Octane server startup instead of fixed sleep(1)
  • Eliminates race condition causing NULL traces when tests run before server is ready
  1. SQLSRV Connection Flakiness
  • Added retry logic (30 attempts, 500ms delay) for SQL Server connections
  • Handles variable container startup time
  1. PHP-FPM/Nginx Startup Race Condition
  • Added waitUntilServerRunning() to both PhpFpm and NginxServer classes
  • Fixed startup order: PHP-FPM starts first (nginx depends on it), then nginx
  • Eliminates 502 Bad Gateway errors when tests run before backends are ready
  1. System Tests Docker Hub Authentication
  • Auto-install unzip (via apt-get/apk) when missing to extract Vault CLI
  • Fixes "unzip: not found" error preventing Docker Hub login
  1. CentOS Package Verification
  • Added retry loop (3 attempts) for yum update
  • Handles vault.centos.org reliability issues

@datadog-datadog-prod-us1
Copy link

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

⚠️ Tests

Fix all issues with Cursor

⚠️ Warnings

🧪 1024 Tests failed

    testSearchPhpBinaries from integration.DDTrace\Tests\Integration\PHPInstallerTest (Fix with Cursor)

    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: 6970ca6600000000993eda600631da26
tid: 6970ca6600000000
hexProcessTraceId: 993eda600631da26
hexProcessSpanId: c0af6f7169142aca
processTraceId: 11042503442314680870
processSpanId: 13884438709091445450

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: 0f1711b | Docs | Datadog PR Page | Was this helpful? Give us feedback!

@pr-commenter
Copy link

pr-commenter bot commented Jan 13, 2026

Benchmarks [ profiler ]

Benchmark execution time: 2026-01-14 12:51:37

Comparing candidate commit 65e5637 in PR branch leiyks/fix-sqlsrv-and-laravel-octane-flakiness with baseline commit 9c58f4d in branch leiyks/fix-flaky-ci-tests.

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

scenario:php-profiler-timeline-memory-with-profiler-and-timeline

  • 🟥 execution_time [+29.593ms; +47.922ms] or [+2.434%; +3.942%]
  • 🟩 cpu_usage_percentage [-2.945%; -2.051%]

@Leiyks Leiyks force-pushed the leiyks/fix-sqlsrv-and-laravel-octane-flakiness branch from dc4603b to e5e9236 Compare January 13, 2026 16:06
@codecov-commenter
Copy link

codecov-commenter commented Jan 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.01%. Comparing base (0f0c13a) to head (0f1711b).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3574      +/-   ##
==========================================
+ Coverage   61.91%   62.01%   +0.10%     
==========================================
  Files         140      140              
  Lines       13311    13311              
  Branches     1762     1762              
==========================================
+ Hits         8241     8255      +14     
+ Misses       4280     4267      -13     
+ Partials      790      789       -1     

see 3 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 0f0c13a...0f1711b. 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-sqlsrv-and-laravel-octane-flakiness branch 2 times, most recently from f6b9f95 to 618b303 Compare January 14, 2026 12:34
@Leiyks Leiyks changed the base branch from master to leiyks/fix-flaky-ci-tests January 14, 2026 12:35
@Leiyks Leiyks force-pushed the leiyks/fix-sqlsrv-and-laravel-octane-flakiness branch 2 times, most recently from 8daff81 to 65e5637 Compare January 14, 2026 12:38
Base automatically changed from leiyks/fix-flaky-ci-tests to master January 14, 2026 13:05
@Leiyks Leiyks force-pushed the leiyks/fix-sqlsrv-and-laravel-octane-flakiness branch from 65e5637 to 744d6a2 Compare January 20, 2026 16:16
@Leiyks Leiyks force-pushed the leiyks/fix-sqlsrv-and-laravel-octane-flakiness branch from 744d6a2 to 2b0af90 Compare January 20, 2026 16:30
@Leiyks Leiyks marked this pull request as ready for review January 20, 2026 16:43
@Leiyks Leiyks requested a review from a team as a code owner January 20, 2026 16:43
@Leiyks Leiyks changed the title fix(test_integrations_kafka): properly wait for zookeeper to be ready… Reduce CI tests flakiness Jan 20, 2026
@Leiyks Leiyks force-pushed the leiyks/fix-sqlsrv-and-laravel-octane-flakiness branch from e200f81 to 0f1711b Compare January 21, 2026 12:36
@Leiyks Leiyks requested a review from bwoebi January 21, 2026 12:36
Copy link
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.

Looks good to me now, thanks :-)

@Leiyks Leiyks merged commit e24c6c2 into master Jan 21, 2026
2000 of 2008 checks passed
@Leiyks Leiyks deleted the leiyks/fix-sqlsrv-and-laravel-octane-flakiness branch January 21, 2026 13:32
@github-actions github-actions bot added this to the 1.17.0 milestone Jan 21, 2026
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.

4 participants