Allow runnable lock targets to reuse the `uv` cache
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 70/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- python
調査の方向性
この issue は lock.bzl ファイルと、--no-cache が設定されている特定の行を指しています。まず lock.bzl ファイル、特に実行可能ターゲットを生成する関数を調べてください。ビルドアクションと実行可能ターゲットで、このフラグがどのように異なる方法で適用されるかを理解します。フラグを変更してターゲットを実行し、キャッシュが期待通りに再利用されることを確認するテストを行います。
索引モデルが issue の本文から書いたものです。
説明
🚀 feature request
Relevant Rules
Description
The runnable targets generated by lock pass --no-cache to uv:
https://github.com/bazel-contrib/rules_python/blob/9cc620ebf92d9afaa1c0535968d82d5a7d7e4522/python/uv/private/lock.bzl#L146
This flag applies to both build actions and runnable targets. As a result, repeated invocations of bazel run //path:requirements.run (in our case via multirun), use temporary caches instead of reusing registry metadata, Git checkouts, and build metadata.
Describe the solution you'd like
Drop the --no-cache flag from .run target but keep it on build actions. This way runnable targets would use the caller's environment and write the lockfile into the workspace, so they could also reuse the cache. Callers could still pass --no-cache or select a cache with UV_CACHE_DIR if they want.
Describe alternatives you've considered
Patching rules_python downstream. I'll open up a PR to show what my patch looks like.
- 主要言語
- Starlark
- スター
- 690
- フォーク
- 722
- 平均マージ
- 1日 55分
- マージ済み PR(30日)
- 38
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
bazel-contrib/rules_python のほかの issue
-
難易度 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 件 ·
-
Release 2.3.4 オープンtype: release
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
bazel-contrib/rules_python#4173 · コメント 2 件 ·
bazel-contrib/rules_python の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
-
area:engineering priority:p2 type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
jejjohnson/pyrox#234 ·
-
good first issue
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
-
good first issue
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
ros2/ros2_tracing#266 · コメント 1 件 ·