Open
Description
π bug report
Affected Rule
The issue is caused by the rule: `pip.parse` used in `MODULE.bazel`Is this a regression?
Unknown. We have not used this feature on previous versions.Description
A clear and concise description of the problem...pip.parse
with experimental_index_url
configured appears to invalidate the cache of third party pypi packages. Specifically I see a frequent rebuild of Fetching module extension pip in @@rules_python~//python/extensions:pip.bzl; starting
reported in the beginning of builds despite nothing changing followed by fetches of all the packages again.
π¬ Minimal Reproduction
I can make a reproduction, but I don't think it's particularly useful if folks do not have a mirror already set up to test. The relevant needs are just to have
- A requirements file with some third party dependencies pip compiled to a lock file with the index url embedded.
- A credential helper that provides authentication to the index.
- A
MODULE.bazel
file that also setsexperimental_index_url
to the same index. - A
py_binary
or some other buildable target. bazel build <the target>
- Stop the bazel server with
bazel shutdown
- Rerun the command and observe it fetch from the index again.
π Your Environment
Operating System:
Ubuntu 22.04
Output of bazel version
:
Bazelisk version: v1.17.0
Build label: 7.5.0
Build target: @@//src/main/java/com/google/devtools/build/lib/bazel:BazelServer
Build time: Thu Jan 30 18:33:17 2025 (1738261997)
Build timestamp: 1738261997
Build timestamp as int: 1738261997
Rules_python version:
1.4.1