Skip to content

Commit

Permalink
chore(deps): bump lua-kong-nginx-module that introduced the new `ge…
Browse files Browse the repository at this point in the history
…t_log_level` API (#12872)

Plus some compatibility changes to make sure existing Admin API behaves the same after the bump.

KAG-4258
  • Loading branch information
chronolaw authored Apr 17, 2024
1 parent 1714e26 commit 41628c3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .requirements
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ OPENSSL=3.2.1
PCRE=10.43
LIBEXPAT=2.5.0

LUA_KONG_NGINX_MODULE=4e0133a955cb46c1dda18614bf91b4cb69874c63 # 0.9.1
LUA_KONG_NGINX_MODULE=691ba795ced07364d491e8abbdf0c8c8d3778c14 # 0.10.0
LUA_RESTY_LMDB=7d2581cbe30cde18a8482d820c227ca0845c0ded # 1.4.2
LUA_RESTY_EVENTS=8448a92cec36ac04ea522e78f6496ba03c9b1fd8 # 0.2.0
LUA_RESTY_WEBSOCKET=60eafc3d7153bceb16e6327074e0afc3d94b1316 # 0.4.0
Expand Down
2 changes: 1 addition & 1 deletion changelog/unreleased/kong/bump-lua-kong-nginx-module.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
message: "Bumped lua-kong-nginx-module from 0.8.0 to 0.9.1"
message: "Bumped lua-kong-nginx-module from 0.8.0 to 0.10.0"
type: dependency
scope: Core
4 changes: 2 additions & 2 deletions kong/api/routes/debug.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ local function handle_put_log_level(self, broadcast)
return kong.response.exit(400, { message = "timeout must be greater than or equal to 0" })
end

local cur_log_level = get_log_level(LOG_LEVELS[kong.configuration.log_level])
local cur_log_level = get_log_level()

if cur_log_level == log_level then
local message = "log level is already " .. self.params.log_level
Expand Down Expand Up @@ -95,7 +95,7 @@ end
local routes = {
["/debug/node/log-level"] = {
GET = function(self)
local cur_level = get_log_level(LOG_LEVELS[kong.configuration.log_level])
local cur_level = get_log_level()

if type(LOG_LEVELS[cur_level]) ~= "string" then
local message = "unknown log level: " .. tostring(cur_level)
Expand Down
3 changes: 1 addition & 2 deletions kong/runloop/log_level.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ end
local function init_handler()
local shm_log_level = ngx.shared.kong:get(constants.DYN_LOG_LEVEL_KEY)

local cur_log_level = kong_log.get_log_level(
constants.LOG_LEVELS[kong.configuration.log_level])
local cur_log_level = kong_log.get_log_level()
local timeout = (tonumber(
ngx.shared.kong:get(constants.DYN_LOG_LEVEL_TIMEOUT_AT_KEY)) or 0)
- ngx.time()
Expand Down

1 comment on commit 41628c3

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bazel Build

Docker image available kong/kong:41628c31d5795e1c5156bc0aea97593c64c4da1e
Artifacts available https://github.com/Kong/kong/actions/runs/8720163612

Please sign in to comment.