Skip to content

fix(aocc): retry apt-get install -f with timeout options - #6

Closed
djkees wants to merge 4 commits into
developfrom
fix/aocc-debian-retry-timeout
Closed

djkees wants to merge 4 commits into
developfrom
fix/aocc-debian-retry-timeout

Conversation

@djkees

@djkees djkees commented Sep 14, 2026 •

Copy link
Copy Markdown
Owner

dpkg -i commonly leaves AOCC's declared dependencies unconfigured, and the apt-get install -f fixup step that resolves them had no resilience against transient mirror/network failures — unlike every other Debian-based installer (gfortran, ifort, ifx, flang, armflang), which all wrap their apt-get calls in a retry-with-backoff loop plus explicit Acquire::*::Timeout options and an outer process-level timeout guard.

  • Wraps the apt-get install -f -y call in a 3-attempt retry with backoff, matching gfortran/debian.ts's APT_TIMEOUT_OPTS pattern.
  • Adds the same outer timeout --signal=TERM --kill-after=30s 15m guard gfortran's retry loop uses, so a hang unrelated to network I/O (e.g. a held apt lock) fails fast into a retry instead of running until the job's overall timeout.
  • Adds a retry test mirroring gfortran/debian.test.ts's fake-timer style, and updates the existing install test's assertions for the new timeout flags.
  • Confirmed the retry test actually fails if maxAttempts is reverted to 1 — i.e. retry never happens (verified locally via temporary fault injection, not committed).

708/708 unit tests pass; lint is clean.

djkees and others added 4 commits September 14, 2026 12:48
dpkg -i commonly leaves AOCC's declared dependencies unconfigured, and the
apt-get install -f fixup step that resolves them had no resilience against
transient mirror/network failures, unlike every other Debian-based
installer (gfortran, ifort, ifx, flang, armflang). Wraps it in the same
retry-with-backoff + Acquire timeout options those installers already use.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The Acquire::*::Timeout options only bound individual HTTP connection
stages, not the whole process — a hang unrelated to network I/O (e.g. an
apt lock held by another process) would run until the job's overall
timeout instead of failing fast into a retry. Wraps the call in the same
outer `timeout --signal=TERM --kill-after=30s 15m` guard gfortran's
retry loop already uses.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@djkees
djkees force-pushed the fix/aocc-debian-retry-timeout branch from 127f1db to 5e3f2a2 Compare September 14, 2026 18:49
@djkees

djkees commented Sep 14, 2026

Copy link
Copy Markdown
Owner Author

Moving this upstream: fortran-lang#267

@djkees djkees closed this Sep 14, 2026
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