py_runtime does not consume root_symlinks from the interpreter attr (hermetic toolchain)
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- python
- Lĩnh vực
- build-system
Hướng nghiên cứu
Bắt đầu trong python/private/py_runtime_rule.bzl ở các dòng 54-58, nơi issue báo cáo cách runfiles của trình thông dịch được xử lý. Theo dõi cách trình thông dịch và các tệp đóng góp vào runfiles, bao gồm root_symlinks, và xác minh rằng một py_runtime hermetic cung cấp các liên kết đó khi các tác vụ Python thực thi; issue không nêu tên test hay reproducer nào.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
🐞 bug report
Affected Rule
py_runtime is affected.
For example
py_runtime(
name = "hermetic_runtime",
files = ["extracted_toolchain"],
interpreter = "extracted_toolchain",
interpreter_version_info = {
"major": "3",
"minor": "9",
"micro": "21",
},
python_version = "PY3",
visibility = ["//BazArTest/py_toolchain:__pkg__"],
)
Is this a regression?
No. It was discovered when upgrading to bazel 9.0.0, however, because @bazel_tools//tools/bash/runfiles is now an alias that uses root_symlinks.
Description
The py_runtime interpreter from the example makes use of runfiles.bash, but if it is only present in the Runfiles.root_symlinks of interpreter / files, then it does not exist in the runfiles directory when executing python actions.
You can see here:
https://github.com/bazel-contrib/rules_python/blob/393dcfd194615ab4d3393d29145842c186597e0e/python/private/py_runtime_rule.bzl#L54-L58
that it does not consider the root_symlinks in the interpreter runfiles.
🔬 Minimal Reproduction
It is pretty involved, so I'm hoping the description makes the issue readily apparent. I can work on a reproducer if that is not the case.
🌍 Your Environment
Operating System:
AlmaLinux 9.7 (Moss Jungle Cat)
Output of bazel version:
Bazelisk version: v1.26.0
INFO: Invocation ID: decd4a2d-e400-43ca-8558-5e818e7da8d1
Build label: 9.0.0
Build target: @@//src/main/java/com/google/devtools/build/lib/bazel:BazelServer
Build time: Tue Jan 20 18:16:47 2026 (1768933007)
Build timestamp: 1768933007
Build timestamp as int: 1768933007
Rules_python version:
bazel_dep(name = "rules_python", version = "1.7.0")
- Ngôn ngữ chính
- Starlark
- Star
- 690
- Fork
- 722
- Merge trung bình
- 1 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 50
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của bazel-contrib/rules_python
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
bazel-contrib/rules_python#4164 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
bazel-contrib/rules_python#3821 ·
-
Release 2.4.0 Đang mởtype: release
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
bazel-contrib/rules_python#4175 · 3 bình luận ·
-
Release 2.3.4 Đang mởtype: release
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
bazel-contrib/rules_python#4173 · 2 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 70/100
bazel-contrib/rules_python#4171 ·
Tất cả issue của bazel-contrib/rules_python
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
-
CS0162 "Unreachable code detected" warning from a MSBuildTemp .tmp file in every game project Đang mởbug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
-
area:engineering priority:p2 type:bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
jejjohnson/pyrox#234 ·
-
good first issue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
-
good first issue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
ros2/ros2_tracing#266 · 1 bình luận ·