-
Notifications
You must be signed in to change notification settings - Fork 2
fix: Improve Lighthouse CI server startup reliability #221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
π§ Lighthouse CI improvements: 1. β Extended server ready timeout from 30s to 120s (2 minutes) 2. β Enhanced ready pattern to match multiple Next.js startup messages 3. β Added additional Chrome flags for CI environment stability 4. β Reduced number of runs from 3 to 1 for faster CI execution 5. β Better error handling for server startup issues π― Root cause fixes: - Server timeout issues in CI environment - Chrome interstitial errors due to server not being ready - Improved pattern matching for Next.js startup messages This should resolve the 'Chrome prevented page load with an interstitial' errors.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedThe pull request is closed. WalkthroughBroadened Lighthouse CI readiness regex, increased server startup timeout to 120000 ms, reduced Lighthouse runs to 1, and added Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Runner as CLI Runner
participant Server as Test Server
participant Lighthouse as Lighthouse
participant Upload as Upload Target
Runner->>Server: execute startServerCommand
Note over Runner,Server: Wait for readiness pattern: "Ready in" | "ready on" | "Local:"
alt Ready before 120s
Server-->>Runner: readiness match
Runner->>Lighthouse: run audit (numberOfRuns=1, chromeFlags include --disable-gpu)
Lighthouse-->>Runner: results
Runner->>Upload: upload results
else Timeout (>=120s)
Server-->>Runner: no readiness match
Runner-->>Runner: abort due to timeout
end
Estimated code review effortπ― 2 (Simple) | β±οΈ ~8 minutes Poem
π Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro π Files selected for processing (1)
β¨ Finishing Touches
π§ͺ Generate unit tests
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
π§Ή Nitpick comments (2)
lighthouserc.js (2)
14-14: Timeout counts the build step; decouple build from start or bump further.Because
startServerCommandalso runs the build, 120s can still be tight on CI. Prefer building earlier and only starting here; otherwise increase the timeout.Option A (preferred) β move build out of LHCI and only start the server:
- startServerCommand: 'npm run build && npm run start', + startServerCommand: 'npm run start',Option B β keep as-is but give more headroom:
- startServerReadyTimeout: 120000, + startServerReadyTimeout: 300000,
15-15: Single run increases metric variance; consider 2β3 runs or relax thresholds.Going from 3β1 speeds CI but may cause flaky assertion failures. If you keep 1 run, consider slightly relaxing perf thresholds; otherwise set 2 for a compromise.
Apply this if you want a middle ground:
- numberOfRuns: 1, + numberOfRuns: 2,
π Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
π Files selected for processing (1)
lighthouserc.js(1 hunks)
β° Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Test Suite
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
π§ Lighthouse CI improvements:
π― Root cause fixes:
This should resolve the 'Chrome prevented page load with an interstitial' errors.
Summary by CodeRabbit
New Features
Bug Fixes
Chores
Tests