Skip to content

Commit

Permalink
chore(clustering): cleanup redundant checkers (#13017)
Browse files Browse the repository at this point in the history
some logic in checkers is made redundant by the fact the same fields
exist in removed_fields, so it would never be reached.

This commit removes the redundant logic
  • Loading branch information
samugi authored May 21, 2024
1 parent db196a5 commit a11338a
Showing 1 changed file with 0 additions and 34 deletions.
34 changes: 0 additions & 34 deletions kong/clustering/compat/checkers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,26 +30,6 @@ local compatible_checkers = {
for _, plugin in ipairs(config_table.plugins or {}) do
if plugin.name == 'ai-proxy' then
local config = plugin.config
if config.model and config.model.options then
if config.response_streaming then
config.response_streaming = nil
log_warn_message('configures ' .. plugin.name .. ' plugin with' ..
' response_streaming == nil, because it is not supported' ..
' in this release',
dp_version, log_suffix)
has_update = true
end

if config.model.options.upstream_path then
config.model.options.upstream_path = nil
log_warn_message('configures ' .. plugin.name .. ' plugin with' ..
' upstream_path == nil, because it is not supported' ..
' in this release',
dp_version, log_suffix)
has_update = true
end
end

if config.route_type == "preserve" then
config.route_type = "llm/v1/chat"
log_warn_message('configures ' .. plugin.name .. ' plugin with' ..
Expand All @@ -59,20 +39,6 @@ local compatible_checkers = {
has_update = true
end
end

if plugin.name == 'ai-request-transformer' or plugin.name == 'ai-response-transformer' then
local config = plugin.config
if config.llm.model
and config.llm.model.options
and config.llm.model.options.upstream_path then
config.llm.model.options.upstream_path = nil
log_warn_message('configures ' .. plugin.name .. ' plugin with' ..
' upstream_path == nil, because it is not supported' ..
' in this release',
dp_version, log_suffix)
has_update = true
end
end
end

return has_update
Expand Down

1 comment on commit a11338a

@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:a11338a8f1ac7f869967fc74660380f11b051bb0
Artifacts available https://github.com/Kong/kong/actions/runs/9172074380

Please sign in to comment.