Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(wasm): re-enable Lua DNS resolver for proxy-wasm #13424

Merged
merged 1 commit into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
message: |
Re-enabled the Lua DNS resolver from proxy-wasm by default.
type: bugfix
scope: Configuration
3 changes: 1 addition & 2 deletions kong/conf_loader/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -640,8 +640,7 @@ local function load(path, custom_conf, opts)
-- set it as such in kong_defaults, because it can only be used if wasm is
-- _also_ enabled. We inject it here if the user has not opted to set it
-- themselves.
-- TODO: as a temporary compatibility fix, we are forcing it to 'off'.
add_wasm_directive("nginx_http_proxy_wasm_lua_resolver", "off")
add_wasm_directive("nginx_http_proxy_wasm_lua_resolver", "on")

-- configure wasmtime module cache
if conf.role == "traditional" or conf.role == "data_plane" then
Expand Down
10 changes: 1 addition & 9 deletions spec/01-unit/04-prefix_handler_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -968,7 +968,7 @@ describe("NGINX conf compiler", function()
end)
it("injects default configurations if wasm=on", function()
assert.matches(
".+proxy_wasm_lua_resolver off;.+",
".+proxy_wasm_lua_resolver on;.+",
kong_ngx_cfg({ wasm = true, }, debug)
)
end)
Expand All @@ -986,14 +986,6 @@ describe("NGINX conf compiler", function()
}, debug)
)
end)
it("permits overriding proxy_wasm_lua_resolver to on", function()
assert.matches(
".+proxy_wasm_lua_resolver on;.+",
kong_ngx_cfg({ wasm = true,
nginx_http_proxy_wasm_lua_resolver = "on",
}, debug)
)
end)
it("injects runtime-specific directives (wasmtime)", function()
assert.matches(
"wasm {.+wasmtime {.+flag flag1 on;.+flag flag2 1m;.+}.+",
Expand Down
2 changes: 1 addition & 1 deletion spec/02-integration/20-wasm/04-proxy-wasm_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@ describe("proxy-wasm filters (#wasm) (#" .. strategy .. ")", function()
assert.logfile().has.no.line("[crit]", true, 0)
end)

pending("resolves DNS hostnames to send an http dispatch, return its response body", function()
it("resolves DNS hostnames to send an http dispatch, return its response body", function()
local client = helpers.proxy_client()
finally(function() client:close() end)

Expand Down
Loading