Aspect_Rules_Py issue
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- python
- 領域
- build-system, ci-cd, tooling
調査の方向性
Start by reviewing the listed options, then inspect src/tests/conftest.py and .bazelrc and trace how score_tools and aspect_rules_py are configured in score_tools and docs-as-code. Run the referenced tests and verify the selected approach removes the Python environment leak, resolves the score_tools version issue, and leaves the affected CI and Bazel workflows passing.
索引モデルが issue の本文から書いたものです。
説明
aspect_rules_py leaks PYTHONEXECUTABLE, which breaks our CI
Decision needed: pick a fix from Options. Recommended: option 1.
Problem
score_toolsrequires aspect_rules_py 1.6.3 or newer.mainuses 1.4.0.- 1.6.3:
bazel run //:ide_supportfails withPermission denied(a copy bug). - 1.6.4 and later (we're on 1.6.6): the venv's Python (
.venv_docs/bin/python) exportsPYTHONEXECUTABLEandPYTHONHOME. - Our tests start Bazel from that Python. Every Python that Bazel starts inherits the variables and crashes with
No module named 'encodings'. - No release fixes the copy bug without the leak. The latest release (1.12.1) still leaks.
.venv_docs/bin/python -m pytest # sets PYTHONEXECUTABLE
└── bazel build / bazel run # inherits it
└── any other Python # looks for its standard library in the wrong place → crash
Cause: upstream rules_py#629 now sets PYTHONEXECUTABLE on every platform. It used to be macOS only.
Options
| # | Fix | Covers | Misses | Tested |
|---|---|---|---|---|
| 1 | Set aspect_rules_py to 1.4.0 in score_tools and docs-as-code |
Everything: removes the cause | Stuck on 1.4.0 until upstream fixes it | Partly: the failing CI test passes; full suite not run |
| 2 | src/tests/conftest.py removes the variables |
All tests in src/tests |
Terminals, basedpyright output | Yes: 38 of 42 pass (the other 4 fail on the score_tools version issue below) |
| 3 | .bazelrc sets the variables to empty |
Every Bazel call in this repo, including terminals | downstream_compatibility tests, basedpyright output |
Yes |
| 4 | Fix it upstream in aspect_rules_py | Everyone, long term | Nothing today: needs a release | No |
Options 2 and 3 can be combined.
Option 2 (src/tests/conftest.py):
import os
def pytest_configure() -> None:
for var in ("PYTHONEXECUTABLE", "PYTHONHOME", "VIRTUAL_ENV"):
os.environ.pop(var, None)
Option 3 (.bazelrc; Python treats an empty value as unset):
common --repo_env=PYTHONEXECUTABLE= --repo_env=PYTHONHOME=
run --run_env=PYTHONEXECUTABLE= --run_env=PYTHONHOME=
Also blocking: the score_tools version
- docs-as-code pulls in
score_toolswithgit_override. Bazel ignores overrides unless the module is the root module, so every project that uses docs-as-code fails with:bad bazel_dep on module 'score_tools' with no version. - The registry only has
score_tools0.0.2, which doesn't containscore_pytest. - Fix: release
score_tools0.0.3 (the same code asmain), then usebazel_dep(name = "score_tools", version = "0.0.3").
Next steps (option 1)
- In
score_tools, set aspect_rules_py to 1.4.0 and run its tests.cr_checkerandrepo_cachehaven't been tested on 1.4.0. - Release
score_tools0.0.3. - In docs-as-code, use
score_tools0.0.3 and aspect_rules_py 1.4.0. Delete.venv_docsonce, because 1.4.0 creates a directory where 1.6.x creates a symlink. - Open an aspect_rules_py issue about the leak (option 4).
Links
- rules_py#629: introduced the leak
- rules_py#644: fixed the copy bug; first released in 1.6.4, together with #629
- Bazel: overrides only apply in the root module
- 主要言語
- Python
- スター
- 11
- フォーク
- 39
- 平均マージ
- 1日 13時間
- マージ済み PR(30日)
- 65
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
eclipse-score/docs-as-code のほかの issue
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
eclipse-score/docs-as-code#1031 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
waiting_for_author
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
eclipse-score/docs-as-code#1029 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
intentionally-limited
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
eclipse-score/docs-as-code#1019 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
eclipse-score/docs-as-code#920 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Add project name to headline ...再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンdocumentation
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
eclipse-score/docs-as-code#613 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
eclipse-score/docs-as-code の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
AIR-Bench Foundation reads the first letter of the word after "answer" as the model's choice対応中かも @beartester34 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
modelscope/evalscope#2330 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
Distribution plot crashes when a numeric feature is constant in the train or test set対応中かも @adembilge が今日担当しました。 オープンbug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 10 日以内に返信