apt: make the apt-cacher-ng proxy non-fatal (pipelining off + reachability fallback)#10004
apt: make the apt-cacher-ng proxy non-fatal (pipelining off + reachability fallback)#10004igorpecovnik wants to merge 2 commits into
Conversation
Through a caching proxy, pipelined index requests can get mismatched against fast-changing repo indexes (e.g. beta.armbian.com), producing "File has unexpected size" / hash-sum mismatch failures during apt-get update. Set Acquire::http::Pipeline-Depth=0 wherever the build routes apt through a proxy: the in-chroot apt-get (chroot_sdcard_apt_get) and the mmdebstrap base bootstrap. Gated on MANAGE_ACNG=yes or APT_PROXY_ADDR set, so direct (no-proxy) builds are unaffected.
A self-hosted GitHub runner injects http_proxy/https_proxy into every job from its environment; docker.sh forwards it into the container and main-config derives APT_PROXY_ADDR from it. When that points at a cache the host can't reach (e.g. a LAN apt-cacher-ng baked into a VPS image), every apt operation hard-fails with "No route to host"/"connection timed out". Probe host:port with a 2s TCP connect before adopting APT_PROXY_ADDR (covers both env-derived and pre-set/NetBox values); if it doesn't connect, warn and unset it so the build goes direct instead of failing.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughAdds TCP reachability validation for ChangesAPT Proxy Validation and Pipeline-Depth Hardening
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Robustness for builds that route apt through an apt-cacher-ng proxy. Split out of
fix/docker-unique-image-tag.Touches
main-config.sh,runners.sh,rootfs-create.sh.Summary by CodeRabbit