From d78d15c368a71f1247f24e5148241a7fea1945db Mon Sep 17 00:00:00 2001 From: Edy Cu Date: Thu, 10 Sep 2026 00:48:11 +0700 Subject: [PATCH 1/2] ci(e2e): a red badge should mean the tests failed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `playwright install --with-deps` runs `apt-get update` over every repo the runner image has configured, Google's Chrome repo included. We do not use it — Playwright downloads its own chromium — but when it published a bad index today (`Hash Sum mismatch` on dl.google.com/linux/chrome-stable/deb) the whole install exited 100 and took this job down four times, on branches that had not touched a line of UI code. The repo is public and the README carries this workflow's badge, so a red E2E during judging is a claim about our tests. It should not be able to mean "Google was mid-publish". Drop the repo we do not need, and retry once for an ordinary transient. --- .github/workflows/e2e.yaml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 45289f7..b1360ed 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -62,8 +62,20 @@ jobs: echo "::warning::bundle ${size} KB exceeds the 6000 KB warning threshold" fi + # `--with-deps` runs `apt-get update` across every repo the runner image has configured, + # including Google's Chrome repo — which we do not use, because Playwright downloads its own + # chromium build. On 2026-09-09 that repo published a bad index (`Hash Sum mismatch` on + # `dl.google.com/linux/chrome-stable/deb`) and took this job down four times in a row, on + # branches that had not touched a line of UI code. A red E2E badge on a public repo during + # judging is a claim about our tests, so it should not be able to mean "Google was mid-publish". + # The repo we do not need is dropped, and one retry covers an ordinary transient. - name: Install Playwright browsers - run: yarn playwright install --with-deps chromium + run: | + sudo rm -f /etc/apt/sources.list.d/google-chrome.list + yarn playwright install --with-deps chromium && exit 0 + echo "::warning::first browser install failed — retrying once" + sleep 30 + yarn playwright install --with-deps chromium - name: Run E2E tests run: yarn playwright test From 6e19428154d0ddb33921c5cdd6d80182ddbe3a96 Mon Sep 17 00:00:00 2001 From: Edy Cu Date: Thu, 10 Sep 2026 00:54:21 +0700 Subject: [PATCH 2/2] ci(e2e): match the apt source by host, not by filename The first attempt removed /etc/apt/sources.list.d/google-chrome.list and the job failed identically: the runner image does not always name it that. Match on dl.google.com instead, across whatever file declares it. --- .github/workflows/e2e.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index b1360ed..5cf31ad 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -71,7 +71,15 @@ jobs: # The repo we do not need is dropped, and one retry covers an ordinary transient. - name: Install Playwright browsers run: | - sudo rm -f /etc/apt/sources.list.d/google-chrome.list + # The list file is not always named google-chrome.list (the image has used deb822 + # `.sources` too), so match on the host rather than guessing the filename. Only files + # under sources.list.d are removed; the main sources.list is edited line-wise, never + # deleted, because apt needs it. + for f in $(grep -rl 'dl\.google\.com' /etc/apt/sources.list.d 2>/dev/null || true); do + echo "removing unused apt source: $f" + sudo rm -f "$f" + done + sudo sed -i '/dl\.google\.com/d' /etc/apt/sources.list || true yarn playwright install --with-deps chromium && exit 0 echo "::warning::first browser install failed — retrying once" sleep 30