-
-
Notifications
You must be signed in to change notification settings - Fork 11.8k
[Build] Use pip constraints to pin dependency versions #30197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a robust mechanism for pinning dependency versions using pip constraints, which is a significant step towards ensuring reproducible builds. The implementation across the various Dockerfiles is well-executed, and the addition of the compile_constraints.sh script and the detailed README.md is commendable. I have identified one critical issue in the constraint generation script for ROCm builds that could lead to incorrect dependencies being installed. The fix is straightforward and detailed in the review comment.
c3a2fe3 to
f37585f
Compare
f37585f to
b7b2022
Compare
Signed-off-by: Nick Hill <[email protected]> Co-authored-by: Claude Code Signed-off-by: Nick Hill <[email protected]>
b7b2022 to
bbb974e
Compare
For ROCm Docker builds Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: Nick Hill <[email protected]>
| ./compile_constraints.sh | ||
| ``` | ||
|
|
||
| This will resolve all dependencies to their latest compatible versions available on PyPI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that we're trying to insulate ourselves from package versions that break us, we are expecting this updated package set to break with some regularity ... and yet we do want to update to the latest version of dependencies as quickly as possible
In #28071 you're suggesting (I guess) running compile_constraints.sh in an updated job that will submit a PR.
When that fails, someone will narrow down which package broke us, and submit a separate PR with a version block in requirements/*.txt e.g. requests!=2.16.1,>= 2.26.0 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@markmc yes exactly, or adjust code accordingly. But as also discussed in that issue, perhaps dependabot can be used to automate opening the PRs rather than a job that runs the script.
Used claude code for this.
I think an alternative option could be to use
.infiles like we already do for the test dependencies.Resolves #28071.