#364 · Browser jobs run in Playwright's image, so a slow mirror cannot stall them (#351)
- timeline-app
- pull request
Closes #351. The `Browser / webkit` job hung again today: run 40527472727 on #362 spent 29+ minutes in `npx playwright install --with-deps webkit`, which apt-installs ~130 packages from the runner's Ubuntu mirror. The first CI run of this PR then showed the mirror itself was the problem: Azure's mirror served the PostgreSQL job's packages at 44 kB/s. - **Browser** (chromium, firefox, webkit) and **UI capacity advice** jobs now run in `mcr.microsoft.com/playwright:v1.58.2-noble`, which already has the browsers and their system packages. No apt step remains. `npx playwright install "$BROWSER"` (without `--with-deps`) stays as a 5-minute step: it does nothing while the image matches the package, and downloads only the browser if they ever drift. - **Every other job that installs packages on the runner** (PostgreSQL, desktop UI, desktop packages, benchmarks, Pages) first runs `scripts/ubuntu-archive.sh`. It points apt at Ubuntu's own `archive.ubuntu.com` instead of `azure.archive.ubuntu.com`, and has apt retry failed downloads (`Acquire::Retries 3`, 30 s timeout). Docker builds already use their distributions' own archives. - The remaining `--with-deps chromium` installs (PostgreSQL job, benchmarks, Pages) each get their own `timeout-minutes: 10`, so a stall fails that step quickly instead of using up the job's budget. - `test/ci-workflows.test.mjs` fails if a workflow's Playwright image tag isn't the `playwright` package's version, so a bump updates both. Tested locally: the WebKit job's steps (`npm ci`, `npm run build`, `test:platform`, `test:browser`, `test:offline:browser`) all pass inside the image, as root. `ubuntu-archive.sh` rewrites Azure-style `ubuntu.sources` in an `ubuntu:24.04` container, and `apt-get update` then runs from Canonical's archive. The browser jobs passed in this PR's first CI run.