-
Notifications
You must be signed in to change notification settings - Fork 37
Document pip constraints CI enforcement for all dependencies #198
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
Open
booxter
wants to merge
1
commit into
instructlab:main
Choose a base branch
from
booxter:ci-deps-constraints
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -120,6 +120,7 @@ Langgraph | |
leaderboard | ||
lifecycle | ||
lignment | ||
linters | ||
LLM | ||
LLMs | ||
llms | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# Dependency Constraints in InstructLab CI | ||
|
||
This document describes how Python dependencies should be managed in | ||
InstructLab CI. | ||
|
||
## Goals | ||
|
||
1. Ensure that the CI environment is consistent and reproducible. | ||
2. Ensure that new dependency releases do not break the CI environment. | ||
3. Ensure that we adopt new dependency releases in the CI environment in a | ||
timely manner. | ||
|
||
## Approach | ||
|
||
### Pin all versions with constraints files | ||
|
||
Each repository should contain a [pip | ||
constraints](https://pip.pypa.io/en/stable/user_guide/#constraints-files) file | ||
that lists the pinned versions of all dependencies used in the CI environment. | ||
|
||
In case a repository supports multiple platforms (`linux` vs `darwin`) or | ||
accelerators (`cuda`, `cpu`, `hpu`), multiple constraints files may be | ||
generated. | ||
|
||
The constraints files should be used in all CI jobs that install Python | ||
dependencies (using `pip` or otherwise), including linters, unit tests, | ||
integration tests, and functional tests. | ||
|
||
### Update constraints files regularly | ||
|
||
Each repository should define a new `tox` target called `constraints` that will | ||
re-generate all the constraints files in the project. | ||
|
||
Updates to these files should be generated automatically by the CI system and | ||
should not be modified manually (subject to rare exceptions). A periodic | ||
CI job should be added to ensure this happens on a regular basis (at least once | ||
a week). | ||
|
||
The job should run `tox -e constraints` and post the result as a PR for review. | ||
The PR will be validated by all the relevant CI jobs. Project core team is | ||
expected to review these PRs in a timely manner (within 3 business days). The | ||
team should make sure that all the relevant CI jobs are passing before merging | ||
the PR. | ||
|
||
### Uncap all dependencies | ||
|
||
At this point, no new dependency releases should affect the CI environment. | ||
Projects should then uncap all their dependencies in requirements files, as per | ||
[dependency management policy](../dependency-management.md). | ||
|
||
Note: In rare situations, a cap may be justified. For example, when we know for | ||
sure that a new release of the upstream dependency will break the project, and | ||
when we don't have capacity to deliver a fix in a timely manner. These | ||
situations should be rare and a mitigation plan should be in place to uncap the | ||
dependency. | ||
|
||
Specifically, | ||
|
||
- A tracking issue should be reported in the issue tracking system capturing | ||
any known details about the issue. | ||
- A new **temporary** constraint should be added to `constraints-dev.txt.in` | ||
file. The temporary constraint should refer to the tracking issue in a | ||
comment above it. | ||
- The tracking issue should be assigned a high priority and considered a | ||
blocker for an upcoming release. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.