fix(bootstrap): auto-disable constraints and extend e2e test coverage#1057
fix(bootstrap): auto-disable constraints and extend e2e test coverage#1057rd4398 wants to merge 1 commit intopython-wheel-build:mainfrom
Conversation
Two related fixes for --multiple-versions flag:
1. **Auto-disable constraints with --multiple-versions**
- When --multiple-versions flag is enabled, automatically set
skip_constraints=True because constraints.txt cannot handle
multiple versions of the same package
- Log informative message: "automatically disabling constraints
generation (incompatible with --multiple-versions)"
2. **Extend e2e test to verify dependency chain handling**
- Use generous constraint range (flit-core>=3.9,<3.12) instead
of pinning to single version
- Verify that multiple versions of flit-core are built (not just
tomli), confirming --multiple-versions works for entire chain
- Check for at least 2 flit-core versions (test found 3)
- Remove `|| true` since constraints are now auto-disabled
The e2e test now validates that --multiple-versions bootstraps
multiple versions of both top-level packages AND their dependencies,
providing better test coverage.
Fixes: python-wheel-build#1044
Fixes: python-wheel-build#1045
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Signed-off-by: Rohan Devasthale <rdevasth@redhat.com>
📝 WalkthroughWalkthroughThe changes implement automatic constraint disabling for the Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 the current code and only fix it if needed.
Inline comments:
In `@e2e/test_bootstrap_multiple_versions.sh`:
- Line 13: The trap currently expands $constraints_file when the trap is
registered rather than at exit, and won't handle paths with spaces; change the
trap registration for rm -f $constraints_file to use single quotes around the
command and quote the variable inside (i.e., trap 'rm -f "$constraints_file"'
EXIT) so the variable is expanded at runtime and paths with spaces are handled
safely; update the trap line that references constraints_file accordingly.
🪄 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: 45560f03-d9fd-44c4-a6d5-fe08dd291471
📒 Files selected for processing (2)
e2e/test_bootstrap_multiple_versions.shsrc/fromager/commands/bootstrap.py
|
FWIW, LGTM @rd4398 |
Two related fixes for --multiple-versions flag:
Auto-disable constraints with --multiple-versions
Extend e2e test to verify dependency chain handling
|| truesince constraints are now auto-disabledThe e2e test now validates that --multiple-versions bootstraps multiple versions of both top-level packages AND their dependencies, providing better test coverage.
Fixes: #1044
Fixes: #1045