Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pypi]: whl_library repository cache is not invalidated when the dependencies change. #2468

Open
aignas opened this issue Dec 4, 2024 · 0 comments · May be fixed by #2526
Open

[pypi]: whl_library repository cache is not invalidated when the dependencies change. #2468

aignas opened this issue Dec 4, 2024 · 0 comments · May be fixed by #2526

Comments

@aignas
Copy link
Collaborator

aignas commented Dec 4, 2024

Between 0.31.0 and 0.40.0 there was a bump in the internal wheel_installer deps and the repository cache currently is not invalidated.

The repository files in the cache vs the new value after expunge is called:

packages/MarkupSafe-2.1.1.dist-info/WHEEL	2000-01-01 09:00:00.000000000 +0900
+++ /tmp/diff/input-1/layers-47/app.d/wp_wcm_city/ns/demo/clock/src/server.runfiles/pip_markupsafe/site-packages/MarkupSafe-2.1.1.dist-info/WHEEL	2000-01-01 09:00:00.000000000 +0900
@@ -1,5 +1,5 @@
 Wheel-Version: 1.0
-Generator: bdist_wheel (0.43.0)
+Generator: bdist_wheel (0.41.2)
 Root-Is-Purelib: true
 Tag: py3-none-any

The most likely culprit is the way we include the dependencies which could have regressed or never worked.

The code in question is in

"_python_path_entries": attr.label_list(

Right now we are only including the BUILD.bazel for the pythonpathconstruction, but it would be better if we included theRECORD` or some other file that changes from version to version. We could also ensure that the version is included somewhere in the BUILD.bazel file.

@aignas aignas self-assigned this Dec 24, 2024
aignas added a commit to aignas/rules_python that referenced this issue Dec 24, 2024
This is reusing a bit of code used in `evaluate_markers` and makes use
of the RECORD files in the `whl` files that we use to extract whls in
`whl_library`. This should be merged before bazelbuild#2514 to avoid any cache
invalidation issues downstream.

Fixes bazelbuild#2468
@aignas aignas linked a pull request Dec 24, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant