CI: centralize bounded APT installation - #1892
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (10)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThis change adds a reusable APT installation action with validation, retries, recovery, source isolation, and required or optional package handling. CI workflows use the action for Linux setup. Documentation and packaging checks now require ChangesAPT installation and CI setup
Estimated code review effort: 4 (Complex) | ~45 minutes Merge Risk: ⚪ Minimal · up to The PR bounds CI package-manager operations, makes optional tooling non-blocking, and standardizes Ninja installation without any supplied evidence of an actionable merge-blocking risk. Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
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 |
ChaoZheng109
left a comment
There was a problem hiding this comment.
Two Should-fix items from a full review of this PR. The diagnosis and the overall approach look right to me — putting the bound on the apt call rather than the workflow step is the judgement that makes the required/optional split possible, the "every apt invocation" claim holds under an exhaustive sweep of .github/ at HEAD, and both packaging jobs are green so the PyPI-ninja path is exercised end to end. These two are the parts I'd want addressed or answered before merge.
9c03323 to
e153ed8
Compare
|
已将 APT 稳定性改动更新为最终单提交(
验证结果:
|
374900b to
8eb4423
Compare
- Add a shared action for timed APT retries and recovery. - Reuse it across packaging, lint, unit-test, and GCC setup jobs. - Keep update commands compatible with Bash 3.2 nounset handling. - Document the behavior and cover workflow changes with unit tests.
Problem
packaging-matrixcould remain in Set up C++ compiler until the job's60-minute limit when an Ubuntu package mirror stalled. The mirror instability
predates this change; #1805 did not create it, but its packaging-tool setup
introduced unbounded
apt-get updateandapt-get installcalls that exposedthe job to it.
Of the OS packages installed there, only the host compiler is required.
ccacheis an optimization and the packaging matrix already supports runningwithout it.
ninjacan be installed with the Python build dependencies insteadof requiring another system-package install.
Changes
apt-installcomposite action for required and optionalpackages. Every update, install, and dpkg recovery operation has a wall-clock
bound; interrupted state is cleaned up before retrying.
pre-commit, and no-hardware UT. If a required install fails, refresh the
system indexes once and retry the install.
setup-gcc-15, preservingthe runner's existing Ubuntu indexes. The PPA update and required install
each receive one retry.
ccacheas optional in packaging: an APT or Homebrew failure emits awarning and the matrix continues without compiler caching.
ninja>=1.11with the venv and update the packaging documentation andverification hint accordingly.
Bash 3.2 compatibility used by macOS runners.
Bounds
.sourcesfileThese are per-operation bounds. No job-level
timeout-minutesvalue is changed.Testing
CI run 32325726639.