shreemaan-abhishek commented on code in PR #10008:
URL: https://github.com/apache/apisix/pull/10008#discussion_r1292074512
##########
apisix/plugins/traffic-split.lua:
##########
@@ -233,6 +233,27 @@ function _M.access(conf, ctx)
local match_passed = true
for _, rule in ipairs(conf.rules) do
+ -- check if all upstream_ids are valid
+ if rule.weighted_upstreams then
+ for _, wupstream in ipairs(rule.weighted_upstreams) do
+ local upstream_id = wupstream.upstream_id
+ if upstream_id then
+ local key = "/upstreams/" .. upstream_id
+ local res, err = core.etcd.get(key)
Review Comment:
I agree, the current scenario does not cover standalone mode.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]