From c6013fcdc951ffd7537e7cbed59403801056cb37 Mon Sep 17 00:00:00 2001 From: chronolaw Date: Wed, 29 Nov 2023 11:26:24 +0800 Subject: [PATCH] LMDB_VALIDATION_TAG --- kong/conf_loader/constants.lua | 9 +++++++++ kong/conf_loader/init.lua | 8 +------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/kong/conf_loader/constants.lua b/kong/conf_loader/constants.lua index a42031043ca..4cd4d251999 100644 --- a/kong/conf_loader/constants.lua +++ b/kong/conf_loader/constants.lua @@ -1,3 +1,4 @@ +local kong_meta = require "kong.meta" local constants = require "kong.constants" @@ -609,6 +610,12 @@ local _NOP_TOSTRING_MT = { } +-- using kong version, "major.minor" +local LMDB_VALIDATION_TAG = string.format("%d.%d", + kong_meta._VERSION_TABLE.major, + kong_meta._VERSION_TABLE.minor) + + return { HEADERS = HEADERS, BUNDLED_VAULTS = BUNDLED_VAULTS, @@ -628,5 +635,7 @@ return { TYP_CHECKS = TYP_CHECKS, _NOP_TOSTRING_MT = _NOP_TOSTRING_MT, + + LMDB_VALIDATION_TAG = LMDB_VALIDATION_TAG, } diff --git a/kong/conf_loader/init.lua b/kong/conf_loader/init.lua index d43d17cc0c5..5e7631a22eb 100644 --- a/kong/conf_loader/init.lua +++ b/kong/conf_loader/init.lua @@ -1,7 +1,6 @@ local require = require -local kong_meta = require "kong.meta" local kong_default_conf = require "kong.templates.kong_defaults" local process_secrets = require "kong.cmd.utils.process_secrets" local nginx_signals = require "kong.cmd.utils.nginx_signals" @@ -88,6 +87,7 @@ local TYP_CHECKS = conf_constants.TYP_CHECKS local HEADERS = conf_constants.HEADERS local BUNDLED_VAULTS = conf_constants.BUNDLED_VAULTS local BUNDLED_PLUGINS = conf_constants.BUNDLED_PLUGINS +local LMDB_VALIDATION_TAG = = conf_constants.LMDB_VALIDATION_TAG local _nop_tostring_mt = conf_constants._NOP_TOSTRING_MT @@ -105,12 +105,6 @@ local function is_predefined_dhgroup(group) end --- using kong version, "major.minor" -local LMDB_VALIDATION_TAG = string.format("%d.%d", - kong_meta._VERSION_TABLE.major, - kong_meta._VERSION_TABLE.minor) - - local function parse_value(value, typ) if type(value) == "string" then value = strip(value)