Skip to content

Conversation

@jserv
Copy link
Contributor

@jserv jserv commented Nov 12, 2025

Ubuntu package mirrors occasionally sync during CI execution, causing transient failures with file size mismatches. Add 3-attempt retry loops with exponential backoff to all apt update operations across host-x64, host-arm64, and static-analysis jobs.

  • Wrap apt-get/apt update in retry loops with 5s delay between attempts
  • Add Acquire::Retries=3 flag to all apt commands for download resilience
  • Apply to install steps and fallback wget installation paths

Summary by cubic

Improve CI reliability by adding apt retries, disabling AppStream metadata, and continuing even when apt update fails during mirror sync. Applies to host-x64, host-arm64, and static-analysis jobs.

  • Bug Fixes
    • Add /etc/apt/apt.conf.d/99-ci-reliability with Acquire::Retries=3, dep11 disabled, APT::Update::Error-Mode "any", and Acquire::Check-Valid-Until "false".
    • Tolerate non-zero apt update exits; in run-on-arch install step use set +e and exit 0; retry critical installs with --no-download.
    • No build behavior changes; fewer flaky setup failures.

Written for commit 8cdca41. Summary will update automatically on new commits.

@jserv jserv changed the title CI: Re-try apt ops for mirror sync resilience CI: Retry apt ops for mirror sync resilience Nov 12, 2025
Ubuntu package mirrors occasionally sync during CI execution, causing
transient failures with file size mismatches. Add 3-attempt retry loops
with exponential backoff to all apt update operations across host-x64,
host-arm64, and static-analysis jobs.
- Wrap apt-get/apt update in retry loops with 5s delay between attempts
- Add Acquire::Retries=3 flag to all apt commands for download resilience
- Apply to install steps and fallback wget installation paths
Copy link
Contributor Author

@jserv jserv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmarks

Benchmark suite Current: 07640f3 Previous: a2e6c13 Ratio
Dhrystone 1267 Average DMIPS over 10 runs 1324 Average DMIPS over 10 runs 1.04
Coremark 920.518 Average iterations/sec over 10 runs 917.677 Average iterations/sec over 10 runs 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@jserv jserv force-pushed the ci-apt branch 5 times, most recently from a2e6c13 to 07640f3 Compare November 12, 2025 06:52
Command-line flags (-o Acquire::IndexTargets::deb::DEP-11::DefaultEnabled)
were not taking effect, causing continued dep11 download failures during
mirror synchronization.

The config file approach failed because apt still attempted dep11
downloads despite configuration. This comprehensive fix uses multiple
defense layers to ensure CI reliability.

The Error-Mode approach still allowed exit code 100 to propagate to
run-on-arch-action wrapper. Now even core package indexes (Packages.gz)
are failing during mirror sync, not just dep11 metadata.
- set +e means shell CANNOT exit on command failure
- Explicit exit code capture prevents automatic failure propagation
- exit 0 forces success regardless of what happened before
- run-on-arch-action sees success exit code, continues workflow
- apt install will use whatever package indexes are available (cached/partial)
@jserv jserv merged commit b8ae7b9 into master Nov 12, 2025
20 checks passed
@jserv jserv deleted the ci-apt branch November 12, 2025 07:52
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