Skip to content

Commit

Permalink
fix(core): node_id in configuration is deprecated in this PR, which
Browse files Browse the repository at this point in the history
means it is not recommended to be specified manually.
A warning message is printed in the error log if the `node_id` is recognized in the
configuration.

FTI-6221
  • Loading branch information
liverpool8056 committed Sep 18, 2024
1 parent 71e7cb6 commit 33f043e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions changelog/unreleased/kong/deprecate_node_id.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
message: "`node_id` in configuration has been deprecated."
scope: Core
type: deprecation
3 changes: 3 additions & 0 deletions kong/pdk/node.lua
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,9 @@ local function new(self)
-- 1. user provided node id
local configuration_node_id = self and self.configuration and self.configuration.node_id
if configuration_node_id then
ngx.log(ngx.WARN, "The `node_id`, which has been deprecated since 3.9, is not recommended to be specified manually!!!\n",
"Please make sure it is unique across the cluster.\n",
"Please note that it will be removed from configuration since 4.x.")
node_id = configuration_node_id
end
-- 2. node id (if any) on file-system
Expand Down

0 comments on commit 33f043e

Please sign in to comment.