Skip to content

fix(ci): harden Ubuntu Lighthouse and Playwright browser setup against apt mirror flakiness - #2192

Merged
BigSimmo merged 5 commits into
mainfrom
gemini/fix-ubuntu-lighthouse-flakiness
Aug 20, 2026
Merged

fix(ci): harden Ubuntu Lighthouse and Playwright browser setup against apt mirror flakiness#2192
BigSimmo merged 5 commits into
mainfrom
gemini/fix-ubuntu-lighthouse-flakiness

Conversation

@BigSimmo

Copy link
Copy Markdown
Owner

Summary

This PR permanently resolves Ubuntu runner flakiness during Lighthouse test runs and Playwright browser installations (such as the failure observed on PR #2184).

Root Cause

GitHub-hosted Ubuntu runners default to azure.archive.ubuntu.com. During Setup pinned Chromium, Playwright runs npx playwright install-deps which calls apt-get update. When the Azure mirror experiences rate-limiting, connection drops, or sync issues (Ign: lines), the step hangs or fails. Additionally, setup-lighthouse-chromium lacked per-attempt timeouts and retries.

Changes

  1. Apt Mirror Redirection & Resilience Configuration:
    • Automatically rewrites azure.archive.ubuntu.com to the official canonical archive.ubuntu.com in /etc/apt/sources.list and /etc/apt/sources.list.d/*.sources.
    • Provisions /etc/apt/apt.conf.d/99flaky-mirror-resilience with Acquire::Retries "3" and fast 30s timeouts (Acquire::http::Timeout "30", Acquire::https::Timeout "30").
  2. Bounded Timeouts & Retries in CI Actions:
    • Wraps browser and dependency installations in .github/actions/setup-lighthouse-chromium/action.yml, .github/actions/setup-ui-e2e/action.yml, and .github/workflows/ci.yml in a bounded loop (timeout 180, 3 attempts, 5s backoff).
  3. CI Cache Safety Contract Tests:
    • Added unit test assertions in tests/ci-cache-safety.test.ts to enforce mirror sanitization, timeout bounds, and retry loops across all browser setup actions on every PR.

Verification

  • npm run test:ci-workflows (15/15 suites passed, 317 tests)
  • npm run check:github-actions (passed)
  • npm run check:ci-scope (passed)
  • git diff --check (clean)

…t apt mirror flakiness
- Redirect flaky azure.archive.ubuntu.com mirror to canonical archive.ubuntu.com
- Configure APT resilience settings (30s timeout, 3 retries) in /etc/apt/apt.conf.d/99flaky-mirror-resilience
- Enforce bounded timeout (180s) and 3-attempt retry loop in setup-lighthouse-chromium, setup-ui-e2e, and ci.yml ui-matrix
- Add unit contract assertions in tests/ci-cache-safety.test.ts
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitaiBot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your current included review allowance is based on your included PR review attempts over the past 7 days.

Next review available in:40 minutes

Limit details: You’ve used the included review currently available. Your 85 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.

How can I continue?

Wait for the limit to reset, then comment @coderabbitai review or push new commits to the PR.

An organization admin can change what happens after included review limits in Billing.

How do review limits work?

CodeRabbit enforces per-developer PR review limits within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 70a1b9a1-e588-4b56-acb3-bb58e5f8314b

📥 Commits

Reviewing files that changed from the base of the PR and between bfbea24 and 29b56ad.

📒 Files selected for processing (4)
  • .github/actions/setup-lighthouse-chromium/action.yml
  • .github/actions/setup-ui-e2e/action.yml
  • .github/workflows/ci.yml
  • tests/ci-cache-safety.test.ts

Comment @coderabbitai help to get the list of available commands.

@supabase

supabaseBot commented Aug 19, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@BigSimmo
BigSimmo enabled auto-merge (squash) August 20, 2026 13:38
@github-actions

github-actionsBot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

CI triage

CI failed on this PR. Automated classification of the 2 failed job(s):

  • Lighthouse budgetneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.
  • PR requiredmain-side: the same job also failed on the latest completed main CI run.

Compared with main CI run #12589 (failure).

Classification is evidence routing, not permission to ignore a failure. Exact quarantined Playwright identities remain governed by the flake ledger.

@BigSimmo
BigSimmo merged commit 1dad6b8 into mainAug 20, 2026
26 checks passed
@BigSimmo
BigSimmo deleted the gemini/fix-ubuntu-lighthouse-flakiness branch August 20, 2026 15:13
Sign up for freeto 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.

1 participant

@BigSimmo