From b38355fe5a98982aaf73ac77642e7e50ae113ef7 Mon Sep 17 00:00:00 2001 From: Ignas Anikevicius <240938+aignas@users.noreply.github.com> Date: Fri, 14 Aug 2026 18:39:30 +0900 Subject: [PATCH 1/2] fix(pypi): do not return rctx.metadata for pip_archive There was a small regression in #3948 that may affect experimental repository cache users. Related to #3791 --- news/4042.fixed.md | 2 ++ python/private/pypi/whl_library.bzl | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 news/4042.fixed.md diff --git a/news/4042.fixed.md b/news/4042.fixed.md new file mode 100644 index 0000000000..35feb31837 --- /dev/null +++ b/news/4042.fixed.md @@ -0,0 +1,2 @@ +Previous refactor that shipped with 2.3 introduced regression for the experimental repository cache +users. This restores the previous behavior ([#3791](https://github.com/bazel-contrib/rules_python/pull/3791)). diff --git a/python/private/pypi/whl_library.bzl b/python/private/pypi/whl_library.bzl index 47b05468ef..281dd863e6 100644 --- a/python/private/pypi/whl_library.bzl +++ b/python/private/pypi/whl_library.bzl @@ -532,7 +532,9 @@ def _pip_archive_impl(rctx): if not rctx.delete("whl_file.json"): fail("failed to delete the whl_file.json file") - return _whl_extract(rctx, whl_path = whl_path, logger = logger, sdist_filename = sdist_filename) + # NOTE @aignas 2026-08-14: We never return rctx.metadata for pip archives because the result may + # not be reproducible across all machines given the input args to the repository rule. + _whl_extract(rctx, whl_path = whl_path, logger = logger, sdist_filename = sdist_filename) def _remove_files(rctx, *basenames): paths = list(rctx.path(".").readdir()) From 33e3bae4fbc2310417aaeb9cc568e981bb4d5ab2 Mon Sep 17 00:00:00 2001 From: Ignas Anikevicius <240938+aignas@users.noreply.github.com> Date: Fri, 14 Aug 2026 18:46:44 +0900 Subject: [PATCH 2/2] Rename 4042.fixed.md to 4043.fixed.md --- news/{4042.fixed.md => 4043.fixed.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename news/{4042.fixed.md => 4043.fixed.md} (100%) diff --git a/news/4042.fixed.md b/news/4043.fixed.md similarity index 100% rename from news/4042.fixed.md rename to news/4043.fixed.md