Skip to content

ci: add APT retries to prevent transient mirror sync failures#679

Merged
tillkamppeter merged 5 commits intoOpenPrinting:masterfrom
rkt0209:master
Mar 9, 2026
Merged

ci: add APT retries to prevent transient mirror sync failures#679
tillkamppeter merged 5 commits intoOpenPrinting:masterfrom
rkt0209:master

Conversation

@rkt0209
Copy link
Contributor

@rkt0209 rkt0209 commented Mar 9, 2026

Overview

This is a quick stability patch for the newly implemented multi-architecture CI workflow. It resolves a known, transient network issue with the Ubuntu package servers that can cause the emulated QEMU runners (armv7 and riscv64) to randomly fail during the dependency installation phase.

The Issue

Occasionally, the ports.ubuntu.com servers perform a live mirror sync at the exact moment the GitHub Action triggers apt-get update. This causes apt to fetch a package list with a mismatched file size, throwing the following fatal error and halting the CI:
E: Failed to fetch http://ports.ubuntu.com/.../Packages.gz File has unexpected size (618582 != 618585). Mirror sync in progress?

The Fix

By appending -o Acquire::Retries=3 to the apt-get update commands in both the native and emulated blocks, apt will now gracefully back off and retry the connection instead of immediately crashing the build. This makes the CI significantly more resilient to upstream server hiccups.

@tillkamppeter tillkamppeter merged commit 1255e20 into OpenPrinting:master Mar 9, 2026
7 checks passed
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.

2 participants