Skip to content

Commit 852e954

Browse files
authored
fix(pip): do not use experimental_index_url for publish_deps (#3311)
Currently, experimental_index_url will trigger network access (by the bzlmod extension logic) as it figures out the wheels. This is problematic because this network access always occurs, even if a user isn't using the publish tool. Additionally, failed network accesses can get Bazel into stuck state requiring `bazel shutdown` to fix it. To fix, don't use experimental_index_url for the publish tool deps. Once bazelbuild/bazel#24777 is merged, we can roll it back, but then we may need to check-in the `MODULE.bazel.lock` file into git. This should be no-op for most users because the publisher is usually run from with `host == exec`, but there is a small chance that people will hit #2241. Work towards #2937
1 parent 997d6f7 commit 852e954

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ END_UNRELEASED_TEMPLATE
6969
* (bootstrap) For {obj}`--bootstrap_impl=system_python`, the sys.path order has
7070
changed from `[app paths, stdlib, runtime site-packages]` to `[stdlib, app
7171
paths, runtime site-packages]`.
72+
* (pip) Publishing deps are no longer pulled via `experimental_index_url`.
73+
([#2937](https://github.com/bazel-contrib/rules_python/issues/2937)).
7274

7375
{#v0-0-0-fixed}
7476
### Fixed

MODULE.bazel

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -172,12 +172,6 @@ pip = use_extension("//python/extensions:pip.bzl", "pip")
172172
]
173173

174174
pip.parse(
175-
# NOTE @aignas 2024-10-26: We have an integration test that depends on us
176-
# being able to build sdists for this hub, so explicitly set this to False.
177-
#
178-
# how do we test sdists? Maybe just worth adding a single sdist somewhere?
179-
download_only = False,
180-
experimental_index_url = "https://pypi.org/simple",
181175
hub_name = "rules_python_publish_deps",
182176
python_version = "3.11",
183177
requirements_by_platform = {

0 commit comments

Comments
 (0)