Skip to content

DEVOPS-117: Install only Chromium for e2e and bound/retry the apt step - #964

Merged
danieljrc888 merged 2 commits into
mainfrom
legatus/devops-117
Nov 19, 2026
Merged

danieljrc888 merged 2 commits into
mainfrom
legatus/devops-117

Conversation

@jmlago

@jmlago jmlago commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Fixes DEVOPS-117.

What changed

.github/workflows/e2e.yml: the single npx playwright install --with-deps step is replaced by:

  1. Install Playwright system dependencies (Chromium): npx playwright install-deps chromium, timeout-minutes: 12, continue-on-error: true.
  2. Retry Playwright system dependencies (Chromium): runs only if step 1 failed or timed out. It runs sudo dpkg --configure -a to repair any interrupted dpkg state, then installs the deps again. timeout-minutes: 10, and this time a failure fails the job.
  3. Install Playwright Chromium: npx playwright install chromium, timeout-minutes: 5.

Why: playwright.config.ts only defines a chromium project, but install --with-deps without a browser argument installed Chromium, Firefox and WebKit plus all their system packages. In run 44401638599 that was 181 new packages and 126 MB from the Ubuntu mirror. The package where the run stalled, libmfx1, is not a Chromium dependency. With Playwright 1.55.0 on ubuntu24.04, install-deps --dry-run lists 33 direct packages for chromium against 78 for all browsers. Less download means less exposure to a slow mirror. If the mirror does stall, the job now retries after 12 minutes instead of using up the whole job timeout.

How it was tested

  • actionlint .github/workflows/e2e.yml passes.
  • npx [email protected] install-deps --dry-run [chromium] with PLAYWRIGHT_HOST_PLATFORM_OVERRIDE=ubuntu24.04-x64 lists 33 packages for Chromium only and 78 for all browsers.
  • This PR's e2e run 44422901838 passed (170 tests in 2.7 min). The mirror was slow during that run (us-east-2.ec2.archive.ubuntu.com, 83 kB/s), but the Chromium-only install needed 9 new packages and 32 MB instead of 181 and 126 MB. It finished in 7m19s, where the old command at that speed would have taken about 25 minutes. Because that came close to the original 8-minute cap, a follow-up commit raises the caps.
  • After the follow-up commit, e2e run 44424493675 also passed. The mirror was still slow and the first deps attempt took 9m49s, inside the new 12-minute cap, so the retry was skipped. With the original 8-minute cap that run would have retried.

Assumptions

  • I chose to install only Chromium and add a bounded retry. I did not switch to the mcr.microsoft.com/playwright container because its tag must match the locked @playwright/test version exactly (1.55.0, with dependabot PR chore(deps-dev): bump @playwright/test from 1.55.0 to 1.61.0 in the minor-and-patch group across 1 directory #379 open to bump it). That is easy to break on the next upgrade.
  • I did not add an apt package cache: restoring .deb files and their dependencies from the Actions cache is fragile, and once fewer packages are installed a healthy run already takes well under a minute. Browser binaries come from the Playwright CDN in a few seconds, so I did not cache them either.
  • Job timeout-minutes goes from 30 to 40 so both apt attempts fit: 12 + 10 for the deps, 5 for the browser, about 1 min for npm ci and about 3 min for build plus tests. 12 minutes for the first attempt leaves headroom for a slow but working mirror (see "How it was tested").
  • One retry is enough: the failures in the ticket were intermittent and later runs on the same branches passed.

Summary by CodeRabbit

  • Tests
    • Automated end-to-end test setup now installs only the required browser and retries system dependency installation if the initial attempt fails. This may help the browser test workflow complete more reliably when dependency setup encounters temporary issues.

The e2e job installed system packages for Chromium, Firefox and WebKit
although only Chromium is used. When the runner's Ubuntu mirror serves
packages at a few KB/s, that install consumed the full 30-minute job
timeout. Install only Chromium and its dependencies, cap the apt step at
8 minutes and retry it once.

Refs DEVOPS-117
@netlify

netlify Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for genlayer-docs ready!

Name Link
🔨 Latest commit bfd1e5c
🔍 Latest deploy log https://app.netlify.com/projects/genlayer-docs/deploys/6afe3a68eb0f8389f87ad006
😎 Deploy Preview https://deploy-preview-964--genlayer-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The E2E workflow now installs Chromium system dependencies and the Chromium browser in separate steps. If the first dependency installation fails, the workflow runs dpkg --configure -a and retries.

Changes: E2E Browser Installation

Layer / File(s) Summary
Chromium installation and retry
.github/workflows/e2e.yml
The workflow installs Chromium system dependencies with an eight-minute timeout. If that step fails, it runs dpkg --configure -a and retries with the same timeout. A separate Chromium browser installation step has a five-minute timeout.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Suggested reviewers: epsjunior

Merge Risk: Minimal · up to c09db

The e2e workflow now installs only Chromium's system dependencies and browser, and it retries the dependency install once with bounded timeouts. No actionable merge-blocking issue was found. The remaining risk is limited to occasional CI flakiness.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the ticket, then the two changes: installing only Chromium for e2e and bounding/retrying the apt step. These match the raw summary and objectives. It does not follow the Conventional C…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description is thorough and covers what changed, why, how it was tested, and assumptions. It links the Linear issue DEVOPS-117 and gives concrete evidence: package counts, run IDs, and timing. The…
Full details: Title check

Explanation

The title names the ticket, then the two changes: installing only Chromium for e2e and bounding/retrying the apt step. These match the raw summary and objectives. It does not follow the Conventional Commits format that the repository template asks for, but the check criteria only cover relation to the change, so it passes.

Full details: Description check

Explanation

The description is thorough and covers what changed, why, how it was tested, and assumptions. It links the Linear issue DEVOPS-117 and gives concrete evidence: package counts, run IDs, and timing. The template is a generic PR shell with a Conventional Commits title reminder and a Description section. The author did not add a 'Closes #' line, but the template marks that line as optional when no GitHub issue applies. The description mostly satisfies the template, so this check passes.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f7b14e2e-8a96-4cbb-9690-1536c239003c
Commits

Reviewing files that changed from the base of the PR and between 90f98c2 and c09dbe7.

Files selected for processing: 1

  • .github/workflows/e2e.yml

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

The first PR run fetched the reduced 32 MB at 83 kB/s and took 7m19s,
close to the 8-minute cap. Raise the attempt to 12 minutes, the retry to
10 minutes and the job timeout to 40 minutes so both attempts fit.

Refs DEVOPS-117
@jmlago

jmlago commented Nov 19, 2026

Copy link
Copy Markdown
Member Author

Legatus audit: Approved (commit bfd1e5c)

No merge-blocking findings. The workflow implements the ticket’s bounded-retry option and installs only the browser used by the tests. Independently ran CI=true npm run test:e2e in an Ubuntu Playwright container: 170 passed. Worktree removed; nothing pushed or merged.

Performance limitation: CI on this head passed, but system dependencies took 9m49s. The one-minute target remains unproven; the retry was skipped.

LEGATUS-TICKET
team: DXP
title: Release docs checker crashes when python3 is unavailable
repo: genlayer-docs
blocks: no
scripts/check-v06-release-docs.js:222 calls result.stderr.trim() without handling a failed process launch. Running CI=true npm run test:e2e on Marte, where python3 is absent, failed during build with TypeError: Cannot read properties of null (reading 'trim'). Expected an actionable missing-Python diagnostic. This code is unchanged by the PR; tests passed in the container with Python available.
LEGATUS-END

@jmlago
jmlago requested a review from rrabenda November 19, 2026 00:29

@danieljrc888 danieljrc888 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approved at the head I reviewed; the requested changes are resolved.

@danieljrc888
danieljrc888 merged commit cc42620 into main Nov 19, 2026
7 checks passed
@danieljrc888
danieljrc888 deleted the legatus/devops-117 branch November 19, 2026 04:03
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.

2 participants