orchestrator: NFS-cache "cache path is not set" WARN logged on every build/launch instead of once
Maintainers usually reply within 2 days
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
Research direction
Start with the two call sites named in the issue: the useNFSCache check around packages/orchestrator/pkg/template/build/builder.go:304 and the one around packages/orchestrator/pkg/sandbox/template/cache.go:1218. The proposed helper belongs in packages/shared/pkg/storage next to storage.WrapInNFSCache. Done means the warning appears once per process, its text says NFS caching stays disabled until the cache dir is set, and a unit test covers the once-only behaviour.
Written by the indexing model from the issue text.
Description
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).
- Dominant language
- Go
- Stars
- 1.8k
- Forks
- 503
- PR merge metrics
- No merged PRs in 30d
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from e2b-dev/runtime
-
client-proxy: WARN "invalid host" spam from unroutable bare-IP Host requests (external probes)Possibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 2 days
-
api: autoPause default is declared in the spec and in a Go constant with no test keeping them in syncPossibly taken @AdaAibaby claimed this 4 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 2 days
-
[Bug]: flock() on a mounted volume hangs forever (mount is missing `nolock`)Possibly taken @AdaAibaby claimed this 56 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 2 days
-
sandbox cache: StartRemoving state transition not broadcast, all allocations see stale Running stateMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
Maintainers usually reply within 2 days
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
apache/arrow-swift#209 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 65/100
influxdata/telegraf#20031 ·
Maintainers usually reply within 1 day
-
pkg/registry/file no longer builds for GOOS=windows: unguarded syscall.Stat_t in qualified_resource_migration.goPossibly taken @AnshulPatil2005 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
OneBusAway/maglev#1914 ·
Maintainers usually reply within 2 days
-
[Bug] The Router doesn't log why it refused a requestPossibly taken A pull request linked to this issue is open or already merged. Openbug needs-acceptance wg/data-plane-networking
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
vllm-project/semantic-router#5680 ·
Maintainers usually reply within 2 days