orchestrator: NFS-cache "cache path is not set" WARN logged on every build/launch instead of once
メンテナーはふだん 2 日以内に返信
評価
調査の方向性
issue で挙げられている2つの呼び出し箇所から始めてください。packages/orchestrator/pkg/template/build/builder.go:304 付近の useNFSCache チェックと、packages/orchestrator/pkg/sandbox/template/cache.go:1218 付近のチェックです。提案されているヘルパーは、storage.WrapInNFSCache の隣の packages/shared/pkg/storage に置いてください。完了の条件は、警告がプロセスごとに一度だけ表示されること、キャッシュディレクトリが設定されるまで NFS キャッシュは無効のままであることを警告文が示すこと、そして一度だけ表示される動作を単体テストが検証していることです。
索引モデルが issue の本文から書いたものです。
説明
Summary
When an NFS-cache feature flag is enabled but no cache path is configured, the orchestrator logs WARN "NFSCache feature flag is enabled but cache path is not set" on the hot path — once per template build, per sandbox launch, and per snapshot resume — and NFS caching is silently disabled. On a dev-default deployment this floods the logs (hundreds of identical lines observed) while telling the operator nothing new after the first line.
Why it happens by default
Three flags default to env.IsDevelopment() (i.e. on in dev):
use-nfs-for-building-templates(UseNFSCacheForBuildingTemplatesFlag)use-nfs-for-snapshots(SnapshotFeatureFlag)use-nfs-for-templates(TemplateFeatureFlag)
If the shared chunk cache dir is not set (common in a plain dev bring-up), each of the two call sites warns on every operation:
packages/orchestrator/pkg/template/build/builder.go:304(useNFSCache, per build)packages/orchestrator/pkg/sandbox/template/cache.go:1218(useNFSCache, per launch/resume)
Both emit the identical message, and both return "cache disabled". So the warning is pure repetition — the path comes from immutable config and won't change within a process.
Proposal
Emit the warning once per process instead of on every operation, and make the message state the consequence (NFS caching disabled until the cache dir is configured). A shared WarnNFSCachePathUnsetOnce(ctx) in packages/shared/pkg/storage (already imported by both call sites, since both call storage.WrapInNFSCache) guarded by sync.Once keeps it to a single line and removes the duplicated string. Behavior (cache disabled) is unchanged.
Happy to send the PR (small, with a unit test).
- 主要言語
- Go
- スター
- 1.8k
- フォーク
- 503
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
e2b-dev/runtime のほかの issue
-
client-proxy: WARN "invalid host" spam from unroutable bare-IP Host requests (external probes)対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 2 日以内に返信
-
api: autoPause default is declared in the spec and in a Go constant with no test keeping them in sync対応中かも @AdaAibaby が 4 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 2 日以内に返信
-
[Bug]: flock() on a mounted volume hangs forever (mount is missing `nolock`)対応中かも @AdaAibaby が 56 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 2 日以内に返信
-
sandbox cache: StartRemoving state transition not broadcast, all allocations see stale Running state再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
メンテナーはふだん 2 日以内に返信
e2b-dev/runtime の issue をすべて見る
似ている issue
-
bug good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
[mesheryctl] design delete fails when passing file or URL as positional argument対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンcomponent/mesheryctl kind/bug language/go
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
meshery/meshery#22772 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
backend security size:S
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
limitlessprojects/Go-Hybrid#3342 ·
メンテナーはふだん 1 日以内に返信
-
status/ready type/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
buildpacks/pack#2733 ·
メンテナーはふだん 1 日以内に返信