diff --git a/kong/runloop/wasm.lua b/kong/runloop/wasm.lua index 0e2beafa2022..d2efc2d59d0c 100644 --- a/kong/runloop/wasm.lua +++ b/kong/runloop/wasm.lua @@ -381,7 +381,7 @@ end ---@param chain kong.db.schema.entities.filter_chain -local function get_or_insert_chain_ref(chains, chain) +local function get_or_insert_chain(chains, chain) local route_id = chain.route and chain.route.id local service_id = chain.service and chain.service.id @@ -462,7 +462,7 @@ local function rebuild_state(db, version, old_state) end end - get_or_insert_chain_ref(chains, chain) + get_or_insert_chain(chains, chain) end end @@ -474,7 +474,7 @@ local function rebuild_state(db, version, old_state) end if _M.filters_by_name[plugin.name] and plugin.enabled then - local chain = get_or_insert_chain_ref(chains, { + local chain = get_or_insert_chain(chains, { id = uuid.uuid(), enabled = true, route = plugin.route, @@ -482,7 +482,6 @@ local function rebuild_state(db, version, old_state) filters = {}, }) - -- FIXME insert by plugin priority insert(chain.filters, { name = plugin.name, enabled = true, diff --git a/kong/runloop/wasm/plugins.lua b/kong/runloop/wasm/plugins.lua index 570823a2c05f..13d19c2215cc 100644 --- a/kong/runloop/wasm/plugins.lua +++ b/kong/runloop/wasm/plugins.lua @@ -26,9 +26,10 @@ function plugins.load_plugin(name) return false, "no such Wasm plugin" end + -- XXX: in the future these values may be sourced from filter metadata local handler = { - PRIORITY = 0, -- FIXME - VERSION = "0.1.0", -- FIXME + PRIORITY = 0, + VERSION = "0.1.0", } return true, handler