Skip to content

Commit c2613e0

Browse files
authored
chore(wasm): remove bundled datakit filter (#14012)
* chore(wasm): remove bundled datakit filter * change log level
1 parent a9ebbcb commit c2613e0

File tree

6 files changed

+9
-23
lines changed

6 files changed

+9
-23
lines changed

build/openresty/wasmx/filters/variables.bzl

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,7 @@
22
A list of wasm filters.
33
"""
44

5-
WASM_FILTERS = [
6-
{
7-
"name": "datakit-filter",
8-
"repo": "Kong/datakit",
9-
"tag": "0.3.1",
10-
"files": {
11-
"datakit.meta.json": "acd16448615ea23315e68d4516edd79135bae13469f7bf9129f7b1139cd2b873",
12-
"datakit.wasm": "c086e6fb36a6ed8c9ff3284805485c7280380469b6a556ccf7e5bc06edce27e7",
13-
},
14-
},
15-
]
5+
WASM_FILTERS = []
166

177
WASM_FILTERS_TARGETS = [
188
"@%s-%s//file" % (filter["name"], file)

changelog/3.9.0/kong/bump-datakit.yml

Lines changed: 0 additions & 2 deletions
This file was deleted.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
message: "**Wasm**: Removed the experimental datakit Wasm filter"
2+
type: dependency

kong/conf_loader/init.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,7 @@ local function load(path, custom_conf, opts)
675675
bundled_filter_path = alt_path
676676

677677
else
678-
log.warn("Bundled proxy-wasm filters path (%s) does not exist " ..
678+
log.debug("Bundled proxy-wasm filters path (%s) does not exist " ..
679679
"or is not a directory. Bundled filters may not be " ..
680680
"available", bundled_filter_path)
681681
end

spec/01-unit/03-conf_loader_spec.lua

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ describe("Configuration loader", function()
340340
assert.is_not_nil(conf)
341341
assert.is_not_nil(conf.admin_gui_origin)
342342
assert.same({ "http://localhost:8002" }, conf.admin_gui_origin)
343-
343+
344344
conf, _, errors = conf_loader(nil, {
345345
admin_gui_url = "http://localhost:8002/manager, https://localhost:8445/manager",
346346
})
@@ -2062,12 +2062,7 @@ describe("Configuration loader", function()
20622062
}))
20632063

20642064
assert(conf.wasm_bundled_filters_path)
2065-
bundled_filters = {
2066-
{
2067-
name = "datakit",
2068-
path = conf.wasm_bundled_filters_path .. "/datakit.wasm",
2069-
},
2070-
}
2065+
bundled_filters = {}
20712066
end
20722067

20732068
all_filters = {}
@@ -2164,7 +2159,8 @@ describe("Configuration loader", function()
21642159
assert.same(bundled_filters, conf.wasm_modules_parsed)
21652160
end)
21662161

2167-
it("prefers user filters to bundled filters when a conflict exists", function()
2162+
-- XXX: we don't have any bundled filters to use for this test
2163+
pending("prefers user filters to bundled filters when a conflict exists", function()
21682164
local user_filter = temp_dir .. "/datakit.wasm"
21692165
assert(helpers.file.write(user_filter, "I'm a happy little wasm filter"))
21702166
finally(function()

spec/02-integration/20-wasm/07-reports_spec.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ for _, strategy in helpers.each_strategy() do
8282
local _, reports_data = assert(reports_server:join())
8383
reports_data = cjson.encode(reports_data)
8484

85-
assert.match("wasm_cnt=3", reports_data)
85+
assert.match("wasm_cnt=2", reports_data)
8686
end)
8787

8888
it("logs number of requests triggering a Wasm filter", function()

0 commit comments

Comments
 (0)