fix: Wasm cache directory on macOS host#5466
Conversation
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
Codecov ReportAttention: Patch coverage is
❌ Your patch status has failed because the patch coverage (0.00%) is below the target coverage (60.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #5466 +/- ##
==========================================
- Coverage 65.25% 65.22% -0.03%
==========================================
Files 213 213
Lines 33923 33928 +5
==========================================
- Hits 22135 22131 -4
- Misses 10455 10463 +8
- Partials 1333 1334 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
6f22b5d to
d884a32
Compare
|
@zhaohuabing @arkodg
https://github.com/envoyproxy/ai-gateway/actions/runs/13817304087/job/38653772222 |
|
@zhaohuabing has more context on the design, can you help with this, relates to |
|
or is it possible to disable the file cache at all when the dir is not available (it should be easy if the abstraction is right at the moment? ) |
The design considerations are outlined in this PR description: #3564 (comment) . Some of them definitely have room for improvement.
Just disabling the cache will break the Wasm feature, it can not function without the cache. In the initial design, we don't want to put Wasm in memory because it can lead to unexpected OOM of EG. Our choices are:
I prefer the first option, as we need to make this feature work in VM deployment where this directory may not exist. |
|
Yeah let's make it configurable. Passing it as an argument of envoy-gateway CLI makes sense to you ? |
Should we put this in the |
|
yeah |
|
If /tmo/eg works here then we won't need to add an option in the first place ? |
|
Just to clarify that it's not only about Mac but also non root Linux env as well (see the CI failure I pasted above, it's on Ubuntu GHA) |
|
Ah in that case we can switch on host/k8s provider |
|
On host mode defaulting to ~/.eg/wasm (or /tmp/eg) and On k8s, /var/eg/wasm as before; how's that sound |
|
(deleted the confusing comment) |
|
Should be ~/.eg/wasm as the cached Wasm files are not temp files. |
What type of PR is this?
fix: permission error on startWasmCache
What this PR does / why we need it:
Previously, the cache directory for Wasm binaries is hardcoded to /var/lib/eg/wasm but it's not writable without root permission on macOS. This fixes it by making it default to ~/.eg/wasm.