Skip to content

Commit 4e0c567

Browse files
authored
feat: use uv pip compile for update-constraints (backport #26) (#27)
pip-tools are very slow. What takes it 10+ minutes to resolve all dependencies can be done in seconds with `uv`. This is especially problematic when we attempt to run `update-constraints` against a repo with a huge dependency tree (like instructlab/instructlab) which may even time out in gate because of how slow pip-compile is. `uv pip compile` is, largely, a drop-in replacement for `pip-compile`, so the transition is very simple. Signed-off-by: Ihar Hrachyshka <[email protected]> **Checklist:** - [ ] **Commit Message Formatting**: Commit titles and messages follow guidelines in the [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/#summary). - [ ] [Changelog](https://github.com/instructlab/ci-actions/blob/main/CHANGELOG.md) updated with breaking and/or notable changes for the next minor release. - [ ] Documentation has been added and/or updated, if applicable. - [ ] Unit tests have been added and/or updated. (If this is not applicable, please provide a justification.) - [ ] Integration testing has been performed, if applicable ## Description of this Change <hr>This is an automatic backport of pull request #26 done by [Mergify](https://mergify.com). Approved-by: courtneypacheco Approved-by: ktdreyer
2 parents f2b31b5 + 1f92be8 commit 4e0c567

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

actions/update-constraints/generate_constraints.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,11 @@ REQUIREMENTS_FILES=$(grep -v '^#' requirements-files.in | tr '\n' ' ')
1616
CONSTRAINTS_FILE=constraints-dev.txt
1717

1818
# shellcheck disable=SC2086
19-
pip-compile -U \
19+
uv pip compile -U \
2020
--no-header \
2121
--annotate \
2222
--annotation-style line \
2323
--allow-unsafe \
24-
--strip-extras \
2524
--output-file=$CONSTRAINTS_FILE \
2625
--constraint constraints-dev.txt.in \
2726
$REQUIREMENTS_FILES

actions/update-constraints/update-constraints.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ for InstructLab CI.
1313
## Requirements
1414

1515
The project should define a new `constraints` tox target in `tox.ini` file that
16-
will install a particular version of `pip-tools`. It's advised to pin the
17-
`pip-tools` version in the `tox` environment definition to avoid any potential
18-
breakages due to changes in the `pip-compile` tool itself.
16+
will install a particular version of `uv`. It's advised to pin the
17+
`uv` version in the `tox` environment definition to avoid any potential
18+
breakages due to changes in the `uv` tool itself.
1919

2020
Example `tox.ini` entry:
2121

@@ -26,7 +26,7 @@ basepython = {[testenv:py3]basepython}
2626
skip_install = True
2727
skipsdist = true
2828
deps =
29-
pip-tools==7.4.1
29+
uv==0.7.8
3030
commands = {posargs}
3131
allowlist_externals = *
3232
```

0 commit comments

Comments
 (0)