cleanup(bootstrapper): expose DEFAULT_BG_THREADS as public class constant#1261
Conversation
|
Warning Review limit reached
Next review available in: 50 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThe bootstrapper package now exports only Estimated code review effort: 1 (Trivial) | ~3 minutes 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/fromager/bootstrapper/_bootstrapper.py`:
- Line 81: Update the _num_bg_threads assignment in the bootstrapper initializer
to distinguish an explicit num_bg_threads value of 0 from None or other absent
values, so 0 continues to normalize to one worker while omitted values use
DEFAULT_BG_THREADS. Preserve the existing max(1, ...) lower-bound behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 672a3a07-8548-4585-ac7e-f3d445ff22af
📒 Files selected for processing (4)
src/fromager/bootstrapper/__init__.pysrc/fromager/bootstrapper/_bootstrapper.pysrc/fromager/bootstrapper/_types.pysrc/fromager/commands/bootstrap.py
🚧 Files skipped from review as they are similar to previous changes (1)
- src/fromager/bootstrapper/init.py
LalatenduMohanty
left a comment
There was a problem hiding this comment.
The PR looks good to me. Once you fix the PR description we should be able to merge it.
smoparth
left a comment
There was a problem hiding this comment.
Making DEFAULT_BG_THREADS as public is good choice. I just mentioned small nitpick above.
_DEFAULT_BG_THREADS from __all__DEFAULT_BG_THREADS as public class constant
…nstant Make `DEFAULT_BG_THREADS` a public class constant on `Bootstrapper` instead of a private module-level `_DEFAULT_BG_THREADS` in `_types.py`. The CLI layer now references `Bootstrapper.DEFAULT_BG_THREADS` for the `--bg-threads` default, keeping the thread-count knowledge with the bootstrapper while giving it a clean public API surface. Co-Authored-By: Claude <claude@anthropic.com> Closes: python-wheel-build#1246 Signed-off-by: Rohan Devasthale <rdevasth@redhat.com>
Make
DEFAULT_BG_THREADSa public class constant onBootstrapperinstead of a private module-level
_DEFAULT_BG_THREADSin_types.py.The CLI layer now references
Bootstrapper.DEFAULT_BG_THREADSfor the--bg-threadsdefault, keeping the thread-count knowledge with thebootstrapper while giving it a clean public API surface.
Closes: #1246