slachiewicz opened a new pull request, #3841: URL: https://github.com/apache/thrift/pull/3841
Every Linux job installs packages with `apt-get` at apt's defaults. This adds one apt configuration fragment, `.github/apt/99-ci-network`, and copies it into `/etc/apt/apt.conf.d/` before each of the 22 `apt-get update` steps in `build.yml`, `cmake.yml`, `sca.yml` and `make-dist.yml`. The runner images resolve packages through a mirror list (`mirror+file:/etc/apt/apt-mirrors.txt`: azure.archive.ubuntu.com, then archive.ubuntu.com, then security.ubuntu.com). apt only hands an item to the next mirror once it has failed on the current one, and on a transient failure it first retries the same mirror `Acquire::Retries` times, which already defaults to 3 in the apt 2.4 and 2.8 the runners ship. The http method also reconnects and resends once on its own before it reports a failure. A stalled mirror therefore costs 4 attempts x 2 x 30 s plus back-off, about four minutes per item, before apt falls over. That is how the compiler job of [run 34574616061](https://github.com/apache/thrift/actions/runs/34574616061/job/103184144542) fetched 8 of 132 packages in its 10 minute step budget. The fragment sets `Acquire::Retries` to 0 and the http and https inactivity timeouts to 20 s, so a stalled item falls over to the next mirror after 40 s. The three mirrors in the list provide the redundancy the same-mirror retries were providing. It also sets `DPkg::Lock::Timeout` to 120 s, which is an addition beyond the retry and timeout change: `apt-get` fails immediately when another apt process holds the lock, and this makes it wait instead. This bounds intermittent stalls, which is what the failed run showed. A primary mirror that stalls on every connection still costs 40 s per package and would exceed a 10 minute step; only dropping the mirror from the list would fix that. The https timeout path is not exercised by the measurement below, and the loopback stall is a stand-in for the Azure network. No open PR touches apt configuration. #3816 adds job-level timeouts to `build.yml` on different lines; whichever lands second rebases. Ticket: [THRIFT-6234](https://issues.apache.org/jira/browse/THRIFT-6234). Verified: `apt-config dump` with the fragment mounted on `ubuntu:22.04` (apt 2.4.14) and `ubuntu:24.04` (apt 2.8.3) → all four settings present. Against a local mirror that accepts connections and never answers, `apt-get install sl` on `ubuntu:22.04` with the fragment → `.deb` ignored on the stalled mirror at 40 s, fetched from the fallback mirror, install complete at 42 s; the same `apt-get update` phase with defaults had not reached the fallback mirror after 500 s, with `Acquire::Retries` 1 after 300 s, with 0 after 60 s. zizmor 1.30.1 on the four workflows → no findings. *This change was created with AI assistance.* -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
