bazel-contrib / bazel-contrib/rules_uv
failures with autogenerated `_test` when using `pypi.fury.io` and `python_platform`
- Dominant language
- Starlark
- Stars
- 29
- Forks
- 12
- PR merge metrics
- No merged PRs in 30d
Description
I'm generating a lock file like this:
```
pip_compile(
name = "requirements",
extra_args = [
"--quiet",
"--extra-index-url=https://pypi.fury.io/team-dmm/",
"--index-strategy=unsafe-best-match",
],
python_platform = "aarch64-manylinux_2_40",
requirements_in = "requirements.in",
requirements_txt = "requirements.lock",
)
```
And I have only this in `requirements.in`:
```
pygame
```
But when I run the `_test` target, I get this error:
```
==================== Test output for //:requirements_test:
FAIL: req_test.lock is out-of-date. Run 'bazel run @@//:requirements' to update.
6,66c6,63
< pygame==2.6.1 \
< --hash=sha256:00827aba089355925902d533f9c41e79a799641f03746c50a374dc5c3362e43d \
< --hash=sha256:fb6e8d0547f30ddc845f4fd1e33070ef548233ad0dbf21f7ecea768883d1bbdc
---
> pygame==2.6.0 \
> --hash=sha256:098029d01a46ea4e30620dfb7c28a577070b456c8fc96350dde05f85c0bf51b5 \
> --hash=sha256:fea019713d0c89dfd5909225aa933010100035d1cd30e6c936e8b6f00529fb80
================================================================================
Target //:requirements_test up-to-date:
bazel-bin/requirements_test
```
(A bunch of hashes omitted for brevity)
If I remove either `"--extra-index-url=https://pypi.fury.io/team-dmm/",` or `python_platform = "aarch64-manylinux_2_40",` then the lock generation and _test succeed.
`https://pypi.fury.io/team-dmm/pygame` lists only:
```
pygame-2.6.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
pygame-2.6.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
```
Using versions:
* Bazel 8.1.1
* rules_uv 0.71.0
* I'm on Linux Ubuntu 22.04, x86_64
Contributor guide
Research direction
Start with the pip_compile configuration shown in the issue, requirements.in, requirements.lock, and the generated req_test.lock. Reproduce with Bazel 8.1.1 and rules_uv 0.71.0 using both the private extra index and python_platform, then compare the lock produced by bazel run @@//:requirements with the _test result. Done means the generated lock remains consistent and requirements_test passes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100