Skip to content

Commit 6302a3d

Browse files
authored
fix(pypi): do not return rctx.metadata for pip_archive (bazel-contrib#4043)
There was a small regression in bazel-contrib#3948 that may affect experimental repository cache users. Related to bazel-contrib#3791
1 parent 23684f6 commit 6302a3d

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

‎news/4043.fixed.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Previous refactor that shipped with 2.3 introduced regression for the experimental repository cache
2+
users. This restores the previous behavior ([#3791](https://github.com/bazel-contrib/rules_python/pull/3791)).

‎python/private/pypi/whl_library.bzl‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,9 @@ def _pip_archive_impl(rctx):
532532
if not rctx.delete("whl_file.json"):
533533
fail("failed to delete the whl_file.json file")
534534

535-
return _whl_extract(rctx, whl_path = whl_path, logger = logger, sdist_filename = sdist_filename)
535+
# NOTE @aignas 2026-08-14: We never return rctx.metadata for pip archives because the result may
536+
# not be reproducible across all machines given the input args to the repository rule.
537+
_whl_extract(rctx, whl_path = whl_path, logger = logger, sdist_filename = sdist_filename)
536538

537539
def _remove_files(rctx, *basenames):
538540
paths = list(rctx.path(".").readdir())

0 commit comments

Comments
 (0)