Repository navigation
[3703 by Claude Opus 5.5] CI: Chromium install times out when the hosted runner's apt mirror stalls on font packages - #3704
Conversation
…fferent apt mirror than the one that stalled, instead of repeating the same fetch. It hasn't run on a real hosted runner yet; that will happen in this PR's CI. Upstream `main` is the same commit as this branch's base, so nothing there had fixed this already. What changed - Mirror demotion before the retry: after a timed-out first attempt, the script stops apt as before. It then rewrites every mirror list the runner's apt sources point to. On the hosted `ubuntu-24.04` image that is `/etc/apt/apt-mirrors.txt`. Whichever mirror apt would try first (lowest `priority:`, and every tied one) moves to the end. The other mirrors keep their order and the moved one stays as a last resort. - Fallback: if only that one mirror is listed, `http://archive.ubuntu.com/ubuntu/` goes first. - Why this works: apt always picks the lowest priority. Entries without a priority come last, and ties are broken by a per-machine random choice, so the same mirror wins every time. I took this from apt's source code. - Failure handling: if no mirror list is configured, or it can't be read or rewritten, the step prints a warning and retries as before. Two timed-out attempts still fail the step with the same error, any other failure still ends it straight away, and the time limit is unchanged. Self-hosted runners still only download the browser. - Minimum-speed limit: apt has no such setting for HTTP, so this wasn't an option. Font packages: I kept `--with-deps` unchanged. Which fonts are installed changes how the browser tests render, and I couldn't check here that the suites pass without them on `ubuntu-24.04`. Moving away from the slow mirror covers the library packages too, not only the fonts. Testing - Real apt: I set up two local mirrors with apt 2.6 in the container. With the 30-second timeout, a mirror that sends one byte per second still held the first download until it was killed. After the script's rewrite, the second download fetched from the healthy mirror in under a second. - Script tests: `test/ciChromiumInstall.test.mjs` now runs against a scratch `/etc/apt` (set through a new `PROPR_CI_APT_ETC` variable). New cases cover: - the hosted mirror list being reordered between attempts, or left alone when the first attempt succeeds - both attempts timing out - running as root - tied, missing and extra priority tags - lists in both apt source-file formats, and a list shared by several sources being rewritten only once - a missing, empty or unwritable mirror list - Results: 10 of 10 tests pass, and the new tests fail against the old script. The related CI routing, workflow and release-validation tests pass, `shellcheck --exclude=SC2016` is clean, and `npm run release:verify` passes. I also added an Unreleased "Fixed" entry to `CHANGELOG.md`. There are no visual previews, since nothing visible changes.
|
/ultrafix goal=8 max=3 |
|
🔄 Ultrafix loop started (goal: 8/10, max cycles: 3) First action:
|
|
✅ AI Code Review Complete requested by @integry Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR addresses stalled apt downloads by changing mirror priorities before the existing bounded retry. It needs a localized correctness fix: the newly supported unranked-list path can explicitly prefer the same mirror that stalled. ✅ Bounded failure propagation — Two timed-out attempts still fail, and other installation errors retain their exit status. ✅ Host isolation — The self-hosted path exits before any apt configuration changes. ✅ Recovery coverage — Tests cover normal priority demotion, missing lists, write refusal, and root execution. The supplied current-head status reports 27 passed checks and no failures or pending checks. This review is static; no commands were run. The linked issue’s acceptance criteria are truncated, so assessment is limited to the visible objective and changed behavior. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F1: 🔴 Unranked lists can retry the stalled mirror
SuggestionsThese are optional follow-ups and are not sent to S1: 🟢 Exercise actual apt mirror selectionA small isolated integration test could verify that apt consumes the rewritten list and selects the intended endpoint. Current tests provide useful shell-control coverage, but stub the entire installation command. This additional coverage is optional; the demonstrated ordering defect can be corrected and regression-tested locally. ScoreThe implementation preserves important failure and host boundaries, and current checks pass. One reachable recovery path still defeats the central mirror-switching behavior. Score: 6/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
✅ Applied the requested follow-up changes in commit 6d98f5f
Summary of ChangesI fixed F1. When every mirror in the list is tied, the retry now starts from a mirror the first attempt could not have used, even when The fix (
Tests (
I also updated the CHANGELOG entry to describe the fallback order. No preview was made because nothing here is visual. Review digestRisk-tiered paths
Diff size: 3 files changed, +83/−15 lines 🤖 Implementation Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
…y now starts from a mirror the first attempt could not have used, even when `archive.ubuntu.com` is already listed. `node --test test/ciChromiumInstall.test.mjs` passes (11/11), and the new tests fail on the branch's previous script. This still hasn't run on a real hosted runner; the PR's CI will be the first time. I fixed F1. When every mirror in the list is tied, the retry now starts from a mirror the first attempt could not have used, even when `archive.ubuntu.com` is already listed. `node --test test/ciChromiumInstall.test.mjs` passes (11/11), and the new tests fail on the branch's previous script. This still hasn't run on a real hosted runner; the PR's CI will be the first time. **The fix (`scripts/ci-install-chromium.sh`)** - **Why the old code failed:** when no entry outranks another, apt picks one of them using a seed tied to the machine. The script can't tell which mirror stalled, so no listed mirror is safe to put first. - **What it does now:** in that case it puts the first fallback mirror that isn't in the list at the front. That is `archive.ubuntu.com`, or `security.ubuntu.com` when `archive.ubuntu.com` is already listed. The hosted runners already list `security.ubuntu.com` as a full mirror. - **Same bug, second case:** a list whose only entry is `archive.ubuntu.com` used to be retried against that same mirror. It now goes to `security.ubuntu.com` first. - **Remaining limit:** if both fallbacks are already in the tied list, there's no safe choice left. The script then warns that the retry may reuse the slow mirror, and retries anyway. **Tests (`test/ciChromiumInstall.test.mjs`)** - I added a helper that works out which mirrors apt could try first: the lowest explicit priority, or every entry when none has one. For each fixture, it checks that the retry has exactly one first choice and that it's not a mirror the first attempt could have used. So the tests check what apt would fetch from, not just the rewritten text. - The `unranked.txt` expectation now has `security.ubuntu.com` first. I added an `archive-only.txt` fixture, and a test for the case where both fallbacks are already tied, which checks the warning and the unchanged list. - The tests ran under mawk, which is the `awk` on hosted Ubuntu. I also updated the CHANGELOG entry to describe the fallback order. No preview was made because nothing here is visual. PR: #3704 Comment by: @propr-ultrafix (ID: 0) Model: Claude Opus 5.5
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR addresses stalled hosted-runner mirrors by changing mirror priority before the existing bounded retry. It is merge-ready within the supplied scope, conditional on the five pending checks completing successfully; no current checks have failed. ✅ Targeted recovery — Mirror rewriting occurs only after the first timed-out hosted install, after apt cleanup. Successful installs and the self-hosted path remain unchanged. ✅ Failure propagation preserved — Non-timeout failures retain their exit status, and two timed-out attempts still fail the step. ✅ Focused regression coverage — Added tests cover priority ordering, tied and singleton lists, root execution, and unavailable mirror lists. This review used static analysis only; no commands were run. The linked issue’s acceptance criteria are truncated, so requirements beyond the visible text could not be assessed. Merge blockersNo merge blockers. SuggestionsThese are optional follow-ups and are not sent to S2: 🟢 Verify selection with real aptThe S3: 🟢 Qualify the changelog guarantee
ScoreThe change is focused, preserves existing failure behavior, and includes substantial regression coverage. Static review found no merge blockers; hosted validation remains pending. Score: 8/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
🔀 Resolved merge conflicts from Conflicting Files
Resolution SummaryI resolved the one merge conflict, in What the conflict was about: both branches added entries under
How I resolved it: I kept every entry from both sides, unchanged. Why: the entries cover separate changes, so nothing needed to be merged or rewritten. The order follows the Keep a Changelog convention the file says it uses, where Changed and Removed come before Fixed. Checks: the file has no conflict markers left, and 🤖 Resolution Details
System-triggered merge conflict resolution |
…ium-install-times-20261118-1101-hz1 Automatically resolved merge conflicts after merging target branch into PR branch. Resolved conflicts in: - CHANGELOG.md PR: #3704 Model: Claude Opus 5.5
AI Implementation Summary
Closes #3703
Branch:
3703/claude-opus-5-5-ci-chromium-install-times-20261118-1101-hz1Commits: ✅ Changes committed (f4cbb25)
AI Processing Completed
Execution Details:
Summary:
The retry in
scripts/ci-install-chromium.shnow downloads from a different apt mirror than the one that stalled, instead of repeating the same fetch. It hasn't run on a real hosted runner yet; that will happen in this PR's CI. Upstreammainis the same commit as this branch's base, so nothing there had fixed this already.What changed
ubuntu-24.04image that is/etc/apt/apt-mirrors.txt. Whichever mirror apt would try first (lowestpriority:, and every tied one) moves to the end. The other mirrors keep their order and the moved one stays as a last resort.http://archive.ubuntu.com/ubuntu/goes first.Font packages: I kept
--with-depsunchanged. Which fonts are installed changes how the browser tests render, and I couldn't check here that the suites pass without them onubuntu-24.04. Moving away from the slow mirror covers the library packages too, not only the fonts.Testing
test/ciChromiumInstall.test.mjsnow runs against a scratch/etc/apt(set through a newPROPR_CI_APT_ETCvariable). New cases cover:shellcheck --exclude=SC2016is clean, andnpm run release:verifypasses.I also added an Unreleased "Fixed" entry to
CHANGELOG.md. There are no visual previews, since nothing visible changes.Review digest
Risk-tiered paths
scripts/ci-install-chromium.sh(+88/−1)CHANGELOG.md(+13/−0)test/ciChromiumInstall.test.mjs(+168/−8)Diff size: 3 files changed, +269/−9 lines
View task for the run's logs and conversation.
This PR was created automatically by ProPR after processing issue #3703.
💡 Need changes?
Comment on this PR to request refinements — the AI agent monitors comments and will update the implementation based on your feedback. Keep iterating until you're satisfied!