py_runtime does not consume root_symlinks from the interpreter attr (hermetic toolchain)
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- python
- 領域
- build-system
調査の方向性
python/private/py_runtime_rule.bzl の54-58行目から始めます。ここでは、インタープリターの runfiles がどのように扱われているかを issue が報告しています。root_symlinks を含め、インタープリターとファイルがどのように runfiles に寄与するかを追跡し、Python アクションの実行時に hermetic な py_runtime がそれらのリンクを公開することを確認してください。issue ではテストも reproducer も指定されていません。
索引モデルが issue の本文から書いたものです。
説明
🐞 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")
- 主要言語
- Starlark
- スター
- 690
- フォーク
- 722
- 平均マージ
- 1日 55分
- マージ済み PR(30日)
- 38
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
bazel-contrib/rules_python のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
bazel-contrib/rules_python#4179 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
bazel-contrib/rules_python#4164 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
bazel-contrib/rules_python#3821 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
bazel-contrib/rules_python#4181 ·
-
Release 2.4.0 オープンtype: release
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
bazel-contrib/rules_python#4175 · コメント 3 件 ·
bazel-contrib/rules_python の issue をすべて見る
似ている issue
-
core dependencies
難易度 1/5 1時間未満 初心者へのやさしさ 80/100
-
bug github_actions
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
registrystack/registry-stack#1393 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
Name consistency オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
eellak/triplestore#65 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100