🧰 ci: Provision Pinned Redis Binaries Without a Distro Mirror (#18055)

* 🧰 ci: Provision Pinned Redis Binaries Without a Distro Mirror

The MCP list_changed jobs and Cache Integration Tests installed redis-server and redis-tools with apt-get at test time. When the runners could not resolve the Ubuntu mirrors, apt-get update spent 3m20s giving up, the install stalled into the step timeout, and the next step found no redis-cli. The version was whatever the mirror served that day.

A composite action now restores redis-server and redis-cli 8.0.5 from the Actions cache and, on a miss, builds them once from the pinned upstream commit with bounded retries. The step fails with one clear error when Redis cannot be provisioned.

* 🔦 ci: Keep Lighthouse Running When the Ubuntu Mirror Is Unreachable

The Lighthouse job installed its pinned Chromium with `playwright install --with-deps`, which runs apt-get first. With the Ubuntu mirrors unresolvable, apt exited 100 and the job failed before any audit ran.

On the runner every library Chromium links is already present with the preinstalled Chrome; the only packages apt added were nine optional fonts. The browser download stays fatal and keeps the lockfile-pinned build, while the system packages go through the bounded best-effort script the Playwright jobs already use.

* ⏱️ ci: Give the Cold Redis Build Room on a Slow Runner

The first hosted runs built Redis in 49, 58 and 103 seconds. A 180 second cap left the slowest of those less than twice its own time, so a slower runner would have failed a job for being slow. The build may now take 300 seconds and the calling steps eight minutes; an unreachable host still fails within 98 seconds. The ready line reports the fetch and the build separately.
This commit is contained in:
Danny Avila 2026-11-11 10:29:25 -05:00 • committed by GitHub
parent b1591d291b
commit bb3cac9d95
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 703 additions and 36 deletions

View file

@ -1,6 +1,7 @@
#!/usr/bin/env bash
#
# Installs Playwright's optional font packages for the `chrome` channel.
# Installs Playwright's optional font packages for the `chrome` channel, or for
# the browser named as the first argument.
#
# The GitHub runner ships Chrome as an apt package, so every library Playwright
# lists is already satisfied by apt itself. The only packages `install-deps` adds
@ -8,6 +9,11 @@
# the one spec that takes screenshots gates the comparison behind
# `E2E_VISUAL_SNAPSHOTS`, which CI never sets.
#
# Lighthouse passes `chromium`: its lockfile-pinned build links the same
# libraries the runner's Chrome already brought in, so on the runner the same
# fonts are all that is missing, and a launch that did lack a library fails in
# the workflow's own browser check rather than here.
#
# Ubuntu's mirrors stall often enough that a hard failure here has repeatedly
# taken down whole e2e runs, so each attempt is capped and a final failure is
# only a warning. The workflow keeps `continue-on-error: true` as a backstop for
@ -15,11 +21,12 @@
set -uo pipefail
readonly BROWSER="${1:-chrome}"
readonly ATTEMPT_TIMEOUT_SECONDS=70
readonly MAX_ATTEMPTS=3
for attempt in $(seq 1 "${MAX_ATTEMPTS}"); do
if timeout "${ATTEMPT_TIMEOUT_SECONDS}" npx playwright install-deps chrome; then
if timeout "${ATTEMPT_TIMEOUT_SECONDS}" npx playwright install-deps "${BROWSER}"; then
exit 0
fi
echo "::warning::playwright install-deps attempt ${attempt}/${MAX_ATTEMPTS} failed or timed out"