Skip to content

improvement(ci): install e2e browser system packages from a per-image cache - #10258

Merged
waleedlatif1 merged 7 commits into
stagingfrom
ci/playwright-apt-cache
Nov 20, 2026
Merged

waleedlatif1 merged 7 commits into
stagingfrom
ci/playwright-apt-cache

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • On GitHub-hosted runners, playwright install-deps apt-installs the browsers' system libraries on every e2e job: 181 packages / 126 MB for WebKit, through apt-get update and an Ubuntu mirror. When a mirror stalls, the job stalls with it. One markdown-viewer run spent 16 minutes in that wait before its first check (median run: 168s)
  • install-playwright.sh now installs from a directory of cached .deb files when one is given. A cold or incomplete cache falls back to install-deps and then stores what apt downloaded
  • The e2e job restores that directory with actions/cache, keyed by runner image (ImageOS-ImageVersion), bun.lock (the Playwright version) and group
  • http-e2e.sh logs how long the browser install took and whether it came from the cache, so the effect is visible in every job log
  • Cached packages install with dpkg -i, not apt: apt prefers a repository copy of a package whose version matches a cached file and tries to fetch it
  • Two e2e flakes that showed up on this PR's runs (one already failed on other branches) fixed at their cause:
    • markdown-viewer "Keyboard selection did not select text": the click could land the caret at the edge of "bold", where ArrowLeft crosses the preceding space and Shift+ArrowRight selects only that space. The check now starts with the caret inside the word and waits for the selection to equal "l"
    • browser-extension "The attachment strip faded a fully visible chip": two single-frame screenshots of a just-attached chip were compared byte for byte. Each is now taken once two consecutive captures match

Type of Change

  • Improvement

Testing

  • shellcheck, actionlint
  • This PR's run is cold (fills the cache); a re-run of the e2e jobs shows the warm path. Before/after install times go in a comment

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Nov 20, 2026 10:40pm UTC

Request Review

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 3 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread .github/scripts/http-e2e.sh Resolved
Comment thread .github/workflows/checks.yml Resolved
Comment thread .github/scripts/install-playwright.sh Resolved
@greptile-apps

greptile-apps Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues remain from this review.

Summary

The PR caches Playwright system packages by runner image, lockfile, and suite group.

  • E2E jobs reuse browser system packages from a matching cache.
  • Attachment screenshots settle before the edge-fade check compares them.
  • Markdown viewer checks that keyboard selection picks the intended letter.

Reviews (6) · Last reviewed commit: "fix(e2e): start the markdown keyboard se..." · Reviewed by Greptile

Comment thread .github/scripts/http-e2e.sh Resolved
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 3 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread .github/workflows/checks.yml Resolved
@waleedlatif1
waleedlatif1 force-pushed the ci/playwright-apt-cache branch from 680509d to 1f5ddd5 Compare November 20, 2026 21:40
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 3 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

Measured on this PR's runs ("Browser install took Ns", timed inside install-playwright.sh):

group cold (mirror) warm (cache, dpkg)
markdown-viewer (WebKit, 186 pkgs) 93s 33s
organization-search 38s 19s
scim 30s 24s
browser-extension-navigation 29s 20s
browser-extension-composer 28s 21s
browser-extension-access 26s 14s
assistant-actions 22s 19s
workflow-code-ui 31s 19s

All eight warm installs came from the cache with no mirror access. The cold runs on this branch also showed the failure mode this removes: one browser-extension-access install took 438s. On #10251 a markdown-viewer job sat 19 minutes mid-download of libavfilter9 until its step bound.

apt-get install ./cache/*.deb --no-download could not do this. apt prefers the repository copy of a package whose version matches a cached file and tries to fetch it ("Unable to fetch some archives"). The cache install uses dpkg -i instead; the key pins the runner image, so the files are exactly the set apt installed there.

The cache only benefits PRs once staging has saved one: a cache saved on a PR is scoped to that PR. The first validation run on staging after merge seeds it.

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 3 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread .github/scripts/install-playwright.sh Resolved
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 3 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 5 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit 2689d4e into staging Nov 20, 2026
88 of 89 checks passed
@waleedlatif1
waleedlatif1 deleted the ci/playwright-apt-cache branch November 20, 2026 23:46

This branch was previously deployed

1 inactive deployment
Preview — fc721005 Deployed Nov 20, 2026 by vercel[bot]
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.

1 participant