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

chore(wasm): remove bundled datakit filter #14012

Merged
merged 2 commits into from
Dec 12, 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
12 changes: 1 addition & 11 deletions build/openresty/wasmx/filters/variables.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,7 @@
A list of wasm filters.
"""

WASM_FILTERS = [
{
"name": "datakit-filter",
"repo": "Kong/datakit",
"tag": "0.3.1",
"files": {
"datakit.meta.json": "acd16448615ea23315e68d4516edd79135bae13469f7bf9129f7b1139cd2b873",
"datakit.wasm": "c086e6fb36a6ed8c9ff3284805485c7280380469b6a556ccf7e5bc06edce27e7",
},
},
]
WASM_FILTERS = []

WASM_FILTERS_TARGETS = [
"@%s-%s//file" % (filter["name"], file)
Expand Down
2 changes: 0 additions & 2 deletions changelog/3.9.0/kong/bump-datakit.yml

This file was deleted.

2 changes: 2 additions & 0 deletions changelog/3.9.0/kong/remove-datakit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
message: "**Wasm**: Removed the experimental datakit Wasm filter"
kikito marked this conversation as resolved.
Show resolved Hide resolved
type: dependency
2 changes: 1 addition & 1 deletion kong/conf_loader/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ local function load(path, custom_conf, opts)
bundled_filter_path = alt_path

else
log.warn("Bundled proxy-wasm filters path (%s) does not exist " ..
log.debug("Bundled proxy-wasm filters path (%s) does not exist " ..
"or is not a directory. Bundled filters may not be " ..
"available", bundled_filter_path)
end
Expand Down
12 changes: 4 additions & 8 deletions spec/01-unit/03-conf_loader_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ describe("Configuration loader", function()
assert.is_not_nil(conf)
assert.is_not_nil(conf.admin_gui_origin)
assert.same({ "http://localhost:8002" }, conf.admin_gui_origin)

conf, _, errors = conf_loader(nil, {
admin_gui_url = "http://localhost:8002/manager, https://localhost:8445/manager",
})
Expand Down Expand Up @@ -2062,12 +2062,7 @@ describe("Configuration loader", function()
}))

assert(conf.wasm_bundled_filters_path)
bundled_filters = {
{
name = "datakit",
path = conf.wasm_bundled_filters_path .. "/datakit.wasm",
},
}
bundled_filters = {}
end

all_filters = {}
Expand Down Expand Up @@ -2164,7 +2159,8 @@ describe("Configuration loader", function()
assert.same(bundled_filters, conf.wasm_modules_parsed)
end)

it("prefers user filters to bundled filters when a conflict exists", function()
-- XXX: we don't have any bundled filters to use for this test
pending("prefers user filters to bundled filters when a conflict exists", function()
local user_filter = temp_dir .. "/datakit.wasm"
assert(helpers.file.write(user_filter, "I'm a happy little wasm filter"))
finally(function()
Expand Down
2 changes: 1 addition & 1 deletion spec/02-integration/20-wasm/07-reports_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ for _, strategy in helpers.each_strategy() do
local _, reports_data = assert(reports_server:join())
reports_data = cjson.encode(reports_data)

assert.match("wasm_cnt=3", reports_data)
assert.match("wasm_cnt=2", reports_data)
end)

it("logs number of requests triggering a Wasm filter", function()
Expand Down
Loading