Skip to content

ci: the docs job drops the runner's regional apt mirror on either cloud, and downloads before it unpacks - #589

Merged
tesseractAZ merged 3 commits into
mainfrom
claude/apt-aws-mirror
Nov 21, 2026
Merged

tesseractAZ merged 3 commits into
mainfrom
claude/apt-aws-mirror

Conversation

@tesseractAZ

Copy link
Copy Markdown
Owner

Why

The runner's /etc/apt/apt-mirrors.txt lists a regional mirror first, and the runner's cloud picks it. #549's filter matched only the Azure name. Recent Build documentation (.docx + .pdf) jobs on main and PRs:

Runner First mirror after the step LibreOffice 100 MB Job
Azure (8 runs) archive.ubuntu.com (azure dropped) 3–12 s 42–52 s
AWS (2 runs, 2026-11-19) us-east-2.ec2.archive.ubuntu.com (kept) 1 min 4 s – 2 min 2 min 21 s – 3 min 22 s

The same AWS mirror served pandoc at 53 kB/s on a sibling add-on's run that day, 10+ min per install. apt leaves a mirror only when it fails, never when it is slow.

What changes (ci.yml docs-docx only)

  • Prefer the main Ubuntu archive now drops any *.archive.ubuntu.com entry (either cloud's regional mirror), and only while archive.ubuntu.com stays listed. It logs what it dropped. It uses grep -vE and sudo cp instead of sed -i, so the same script runs under GNU and BSD tools, and the test runs it.
  • pandoc: the apt fallback now prints a ::warning::, so a pin that stopped matching can't pass silently. curl --retry 2 --max-time 60 bounds the download at 180 s, down from 480.
  • Download, then install: each apt install (the pandoc fallback and LibreOffice) is a bounded --download-only, then an install from the local cache. A bound fires only during the download, never while dpkg unpacks, which is the 10-26 failure. LibreOffice's APT_OPTS gains DPkg::Lock::Timeout=60.
  • Bounds: pandoc 12 → 14 min, LibreOffice 10 → 13 min, job 40 → 45 min. The steps sum to 38, plus 5, the release job's rule.

Pinned

  • server/test/workflowTimeouts.test.ts gets 7 tests. They run the mirror step's own script (stub sudo, temp list) against an Azure list, an AWS list, a list with no main archive, one with no regional mirror, and no list at all. They also pin the download-then-install pairs, the lock wait, the sha256 check before dpkg -i, the fallback warning, and each step's bound against its commands' and the job's against its steps'.
  • scripts/mutate-ci-apt-mirror.mjs: 10/10 mutants killed.
  • mutate-v1187-3i xlvii is repointed to the 45-min bound; xlvii/xlviii are still killed.
  • docs/reference/12-configuration-deployment-security.md describes the rule for both clouds.

Release

CI only: the add-on image does not change, so there is no config.yaml bump and no release (as with #548/#549). images.yml's release job is unchanged; it still installs pandoc with apt, best-effort and bounded.

🤖 Generated with Claude Code

tesseractAZ and others added 3 commits November 21, 2026 14:42
…ud, and downloads before it unpacks

The runner's /etc/apt/apt-mirrors.txt lists a regional mirror first, and the
runner's cloud picks it: azure.archive.ubuntu.com on an Azure runner,
<region>.ec2.archive.ubuntu.com on an AWS one. The 10-26 filter (#549)
matched only the Azure name. On the AWS runners of 2026-11-19 the docs job
kept us-east-2.ec2.archive.ubuntu.com, and LibreOffice's 100 MB took
1-2 min against 3-12 s from archive.ubuntu.com on the Azure runners. A
sibling add-on saw that mirror at 53 kB/s, which is 10+ min per install.

- "Prefer the main Ubuntu archive" drops any *.archive.ubuntu.com entry,
  and only while archive.ubuntu.com stays listed. It logs what it dropped,
  and uses grep and cp instead of sed -i, so the same script runs under
  GNU and BSD tools.
- The pandoc fallback prints a ::warning:: when it runs, so a pin that
  stopped matching cannot pass silently.
- Each apt install (the pandoc fallback, LibreOffice) is a bounded
  --download-only and then an install from the cache, so a bound fires
  only during the download, never while dpkg unpacks (the 10-26 failure).
  LibreOffice's APT_OPTS gains DPkg::Lock::Timeout=60.
- Bounds: the pandoc step goes 12 -> 14 min (curl --retry 2 --max-time 60),
  LibreOffice 10 -> 13 min, and the job 40 -> 45 min (steps sum to 38,
  plus 5).
- workflowTimeouts.test.ts runs the mirror step's own script against an
  Azure list, an AWS list, a list with no main archive, one with no
  regional mirror, and no list at all. It also pins the download-then-
  install pairs, the lock wait, the sha256 check before dpkg, the fallback
  warning, and each step's bound against its commands' and the job's
  against its steps'.
- scripts/mutate-ci-apt-mirror.mjs: 10/10 mutants killed.
  mutate-v1187-3i xlvii is repointed to the 45-min bound, still killed.
- docs/reference/12: describes the rule for both clouds.

CI only: the add-on image does not change, so no release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…omment

ci.yml's docs job bound is now 45 min, the same as images.yml's release job.
check-mutant-anchors.mjs counts an anchor across every file a harness targets,
so the bare `    timeout-minutes: 45\n` matched twice for both mutants. Each
now includes the comment line above its own bound. 5664/5664 anchors
resolve; xxxiv, xlvii and xlviii are still killed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
check-doc-claims holds these counts exactly. This branch adds one harness
(mutate-ci-apt-mirror.mjs, 10 anchors) and seven tests in
workflowTimeouts.test.ts, on top of v1.208.0's 154 / 6039 / 6,919.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tesseractAZ
tesseractAZ force-pushed the claude/apt-aws-mirror branch from 8c147d6 to 7f2b21d Compare November 21, 2026 21:45
@tesseractAZ
tesseractAZ merged commit d7e5e1f into main Nov 21, 2026
15 checks passed
@tesseractAZ
tesseractAZ deleted the claude/apt-aws-mirror branch November 21, 2026 22:07
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.

1 participant