Sylwester Lachiewicz created THRIFT-6234:
--------------------------------------------

             Summary: Configure apt retries and timeouts in GitHub Actions 
workflows
                 Key: THRIFT-6234
                 URL: https://issues.apache.org/jira/browse/THRIFT-6234
             Project: Thrift
          Issue Type: Improvement
          Components: Build Process
            Reporter: Sylwester Lachiewicz


Every Linux job in the GitHub Actions workflows ({{build.yml}}, {{cmake.yml}}, 
{{sca.yml}}, {{make-dist.yml}}) installs packages with {{apt-get}} at apt's 
defaults: no retries and a 120 second inactivity timeout per connection.

The GitHub runner images point {{sources.list}} at a mirror list 
({{mirror+file:/etc/apt/apt-mirrors.txt}}: azure.archive.ubuntu.com, then 
archive.ubuntu.com, then security.ubuntu.com). apt only moves to the next 
mirror when a fetch fails, so a stalled primary mirror runs the step into its 
{{timeout-minutes}} instead of failing over.

Example: [Build with CMake run 
34574616061|https://github.com/apache/thrift/actions/runs/34574616061/job/103184144542]
 on master fetched 8 of 132 packages in 10 minutes, with gaps of 2 to 3 minutes 
between single downloads, and hit the 10 minute step timeout before compiling 
anything. The same workflow passed on the commits before and after.

Proposal: ship one apt configuration fragment in the repository and copy it 
into {{/etc/apt/apt.conf.d/}} before each {{apt-get update}}:

{code}
Acquire::Retries "3";
Acquire::http::Timeout "30";
Acquire::https::Timeout "30";
DPkg::Lock::Timeout "120";
{code}

The shorter timeout lets the mirror fallback engage, the retries cover 
transient failures, and the lock timeout waits for unattended-upgrades instead 
of failing immediately when it holds the dpkg lock.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to