feat(wasm): add support for wasmtime cache
Loading .wasm module binaries involves a compilation step before they can be executed, which can slow Kong's startup time. This enable's Wasmtime's builtin cache, such that subsequent start/stop/restart cycles can be faster with a warm cache.
See also:
KAG-4372
Is it possible to add a test for restarting kong with the cache enabled? Otherwise LGTM
@brentos
765baba47d1f92d83094315a0e349880fdf08eed adds an integration test for start/restart. There's not a lot we can inspect and assert upon without making sketchy assumptions about wasmtime's cache implementation, so this test just checks for anything in error.log that looks like a problem.
@brentos
765baba adds an integration test for start/restart. There's not a lot we can inspect and assert upon without making sketchy assumptions about wasmtime's cache implementation, so this test just checks for anything in
error.logthat looks like a problem.
Yeah mainly i wanted to make sure nothing broke by introducing the cache, that things work with existing cache files on restart. Thanks!
@locao / @kikito I could use help getting a second reviewer for this
Cherry-pick failed for master, because it was unable to cherry-pick the commit(s).
Please cherry-pick the changes locally.
git remote add upstream https://github.com/kong/kong-ee
git fetch upstream master
git worktree add -d .worktree/cherry-pick-12930-to-master-to-upstream upstream/master
cd .worktree/cherry-pick-12930-to-master-to-upstream
git checkout -b cherry-pick-12930-to-master-to-upstream
ancref=$(git merge-base 4052fbbfee77be52bcd5c876719a84bcbc8ba337 296ccb531a142cc5dafc428e24af60646de84372)
git cherry-pick -x $ancref..296ccb531a142cc5dafc428e24af60646de84372
Cherry-pick failed for
master, because it was unable to cherry-pick the commit(s).Please cherry-pick the changes locally.
git remote add upstream https://github.com/kong/kong-ee git fetch upstream master git worktree add -d .worktree/cherry-pick-12930-to-master-to-upstream upstream/master cd .worktree/cherry-pick-12930-to-master-to-upstream git checkout -b cherry-pick-12930-to-master-to-upstream ancref=$(git merge-base 4052fbbfee77be52bcd5c876719a84bcbc8ba337 296ccb531a142cc5dafc428e24af60646de84372) git cherry-pick -x $ancref..296ccb531a142cc5dafc428e24af60646de84372
Manually cherry-picked: https://github.com/Kong/kong-ee/pull/9389