ci: bound the apt install and prefer the canonical Ubuntu archive - #289
Merged
Conversation
The hosted runner resolves its Ubuntu mirror through /etc/apt/apt-mirrors.txt, which points at azure.archive.ubuntu.com. That mirror fails intermittently and apt spends minutes of retries before it falls back, so an unbounded package step can consume a whole run: in openadapt-flow a TeX install ran 3h11m and hit the run limit, and in openadapt-capture a test job ran over an hour on main. headed-pixel-campaign has a 15-minute job budget but the X11 fixture step had no bound of its own, so one hung apt call could spend all 15 minutes and the campaign -- the point of the job -- would never run. Bound the step to 5 minutes and prefer the canonical archive. Five minutes is a wide margin: the equivalent apt step in openadapt-capture takes 19s, and 5 minutes still covers three update attempts plus 30s of backoff while leaving at least 10 of the 15 job minutes for `uv sync` and the campaign. The package list, the `command -v` guard that skips apt when the tools already exist, and the trailing tkinter check are unchanged. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
In
complex-visual.yml, jobheaded-pixel-campaignhastimeout-minutes: 15, but the step Ensure local X11 fixture tools had no bound of its own.Ensure local X11 fixture tools: no timeout -> 5 minutes, plus the mirror preference and a boundedapt-get updateretry.Runner OS for the changed job:
ubuntu-latest. It is the only job in this file.Why
A job-level timeout is not enough. One hung apt call spends all 15 minutes and the headed pixel campaign -- the entire point of the job -- never runs. The job fails on a timeout that names the wrong cause.
The hosted runner resolves its Ubuntu mirror through
/etc/apt/apt-mirrors.txt, which points atazure.archive.ubuntu.com. That mirror fails intermittently. apt does fall back to the canonical archive, but it spends the whole budget getting there. Two incidents on 2026-08-19: inopenadapt-flowa TeX install ran 3h11m and hit the run limit, and inopenadapt-capturea test job ran over an hour onmain.Measured results of the same fix elsewhere: openadapt-flow #374 took the TeX install from a 10-minute timeout to 83s; openadapt-capture #81 takes 19s.
Why 5 minutes
It has to fit inside the 15-minute job and still leave room for the real work:
apt-get updateattempts plus 10s + 20s of backoff, then the install -- comfortably under 5 minutes.uv sync --lockedand the campaign itself.What did not change
sudo apt-get install --yes xvfb xauth.command -v Xvfb/xvfb-runguard is preserved, so when the tools already exist no apt runs at all.python -c 'import tkinter'check is preserved and still fails the step.Ensure local X11 fixture toolsis the only one.Tests
actionlint .github/workflows/complex-visual.yml-- clean (shellcheck present, so therunblocks were shell-linted too).python3 -c "import yaml; yaml.safe_load(open(F))"-- parses.bash -non all 5runblocks in the file -- all parse.apt-get,sudo,sleep, andpython, in four paths:install --yes xvfb xauthruns, tkinter checked, exit 0.This PR changes
.github/workflows/complex-visual.yml, which is in the workflow's ownpathstrigger, so the changed job runs on this PR.Pre-existing unrelated failure: does not actually appear here
The brief for this change warned that
evidence-freshnessfails because published evidence is pinned to openadapt-flow 1.30.0 while 1.31.0 is current. I checked rather than assumed, and the accurate position is:mainhas failed every day from 2026-08-12 through 2026-08-19 (runs 31575973097 ... 32226408725), with no commit of mine involved.pull_requesttrigger is path-filtered todocs/eval_results/**,scripts/check_published_evidence_freshness.py, and.github/workflows/evidence-freshness.yml. This PR touches only.github/workflows/complex-visual.yml, so the check is not queued here at all.Out of scope for this PR either way, and left alone deliberately.
🤖 Generated with Claude Code