Repository navigation
Make the apt install in the lib-python jobs survive a stalled mirror - #4132
Open
slachiewicz wants to merge 1 commit into
Open
slachiewicz wants to merge 1 commit into
slachiewicz wants to merge 1 commit into
Conversation
Member
Code reviewNo blocking issues found. Checked for bugs and CLAUDE.md compliance. Two suggestions, below the bar for an issue but verified:
thrift/.github/actions/apt-install/install.sh Lines 24 to 26 in 0dac8e3
🤖 Generated with Claude Code |
slachiewicz
force-pushed
the
ci-apt-install-action
branch
from
November 13, 2026 16:58
0dac8e3 to
b7adbc4
Compare
slachiewicz
force-pushed
the
ci-apt-install-action
branch
from
November 21, 2026 09:04
b7adbc4 to
a099305
Compare
slachiewicz
force-pushed
the
ci-apt-install-action
branch
from
November 21, 2026 11:07
a099305 to
2667d47
Compare
slachiewicz
force-pushed
the
ci-apt-install-action
branch
from
November 21, 2026 16:04
2667d47 to
3d9d7c2
Compare
Client: build
The lib-python job spends its whole 20 minutes in apt-get when an Ubuntu
mirror stalls, and the log then only says that the job was cancelled.
.github/apt/99-ci-network bounds a mirror that stops answering, but not
one that keeps trickling bytes, and nothing stops the runner's apt-daily
timers from taking the dpkg lock under the install.
Add a composite action, .github/actions/apt-install, that
* copies the CI apt settings as before,
* disarms apt-daily.timer and apt-daily-upgrade.timer and waits for a
run already in flight instead of killing it mid-dpkg,
* runs apt-get update and install under `timeout`, so one attempt has
a budget (45 s and 120 s by default) rather than the job's,
* retries up to three times, pointing the sources at archive.ubuntu.com
from the second attempt on instead of the runner's mirror list, and
runs dpkg --configure -a first in case the previous attempt was
stopped half-way through a package.
The lib-python jobs of build.yml and sca.yml use it with a step-level
timeout-minutes as the backstop, so a run that still exceeds the budget
fails on that step with the attempts in the log, not as a cancelled job.
The sca.yml job has no job timeout at all, so the step timeout is its
only bound. The other jobs can move to the action once it has
proven itself there.
The local action is referenced with the self-repository `$/` syntax that
zizmor asks for, and the two new files carry ASF license headers. The
fallback points at HTTPS, and the wait for apt-daily services is bounded.
At the default budgets the timer wait and the apt-get calls of all three
attempts fit under the step timeout, and so does one stalled
dpkg --configure between attempts; two stalled ones do not.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
slachiewicz
force-pushed
the
ci-apt-install-action
branch
from
November 21, 2026 16:08
3d9d7c2 to
3d6a96f
Compare
Member
Author
|
Thanks, both are in |
This branch has not been deployed
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.
The
lib-python (3.12)leg of #4122 (run 42256683325) spent its whole 20 minutes inside "Install dependencies" and was cancelled with only "The job has exceeded the maximum execution time of 20m0s" to show for it..github/apt/99-ci-network(#3841) bounds a mirror that stops answering, but not one that keeps trickling bytes, and nothing stops the runner'sapt-dailytimers from taking the dpkg lock under the install.This adds a composite action,
.github/actions/apt-install, that does the following:apt-daily.timerandapt-daily-upgrade.timerand waits up to 120 s for a run already in flight instead of killing it mid-dpkg,apt-get updateandinstallundertimeout, so one attempt has a budget (45 s and 120 s by default) rather than the job's,https://archive.ubuntu.comfrom the second attempt on instead of the runner's mirror list, and runsdpkg --configure -afirst in case the previous attempt was stopped half-way through a package.The
lib-pythonjobs ofbuild.ymlandsca.ymluse it, referenced with the$/self-repository syntax, with a step-leveltimeout-minutes: 15as the backstop: a run that still exceeds the budget fails on that step with the attempts visible in the log, not as a cancelled job. Thesca.ymljob has no job timeout, so that step timeout is its only bound.The PR does not move the other jobs' apt steps; they can follow once the action has proven itself here.
Verified:
zizmor --offline→ no findings on the action and both workflows;install.shagainst stubbedapt-get/dpkg→ stalled update ends with status 124, sources rewritten,dpkg --configure -a, retry.[skip ci]anywhere in the commit message to free up build resources.Generated-by: Claude Fable 5.1