Skip to content

bug: traffic-split plugin does not verify the UpstreamID is valid #9996

Description

@Nobilta

Current Behavior

when i use traffic-split on a route,if i use a not exist upstream id,it will not verify this upstream id is valid.
{ "uri": "/index.html", "plugins": { "traffic-split": { "rules": [ { "weighted_upstreams": [ { "upstream_id": "abcdefg",//this upstreamid is not exist,but this request will success "weight": 1 }, { "weight": 1 } ] } ] } }, "upstream_id": "abcdefg",//this upstreamid is not exist,but this request will failed }

Expected Behavior

No response

Error Logs

No response

Steps to Reproduce

set traffic-split plugin on route,and set a not exist upstreamid

Environment

  • APISIX version (run apisix version):3.3
  • Operating system (run uname -a):
  • OpenResty / Nginx version (run openresty -V or nginx -V):
  • etcd version, if relevant (run curl http://127.0.0.1:9090/v1/server_info):
  • APISIX Dashboard version, if relevant:
  • Plugin runner version, for issues related to plugin runners:
  • LuaRocks version, for installation issues (run luarocks --version):

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

Status
✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions