nic-6443 opened a new pull request, #13284: URL: https://github.com/apache/apisix/pull/13284
In `stream_preread_phase`, `api_ctx.route_id` was never assigned after route matching, so `ctx.var.route_id` always returned nil in stream context. The HTTP `access_phase` sets it, but stream was missing it. This caused match conditions using `route_id` in plugins like `traffic-split` to always evaluate as nil and never match. The fix adds `api_ctx.route_id` (and `route_name`) assignment right before plugins run — matching the pattern already established in the HTTP path. Also adds a test case that creates a stream route with a traffic-split rule matching on `route_id`, and verifies traffic is correctly directed to the plugin-configured upstream. -- 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]
