herwinz opened a new pull request, #13327: URL: https://github.com/apache/apisix/pull/13327
### Description This PR fixes [#13325](https://github.com/apache/apisix/issues/13325): `xRPC`-based `stream_routes` fail schema check in HTTP workers when `enable_admin: false`, even though stream proxy is enabled. Since #12996, HTTP workers initialize stream router when `apisix.stream_proxy` is configured (for control API access). However, `apisix/stream/xrpc.lua` still skipped xRPC protocol schema registration in HTTP workers unless Admin API was enabled. That caused `unknown protocol [<name>]` during stream route checks in HTTP workers. ### What changed 1. Update `apisix/stream/xrpc.lua` - keep lazy loading behavior in HTTP workers - but allow schema registration when either: - Admin API is enabled, or - `apisix.stream_proxy` is configured 2. Add regression coverage in `t/config-center-yaml/stream-route.t` - add a data-plane YAML test (`enable_admin: false`) with `stream_proxy` enabled - configure an xRPC stream route (`pingpong`) - verify stream request/response works without schema-check failure in HTTP workers ### Why this fix This mirrors the routing condition introduced in `apisix/router.lua` for stream router initialization in HTTP workers, so the HTTP-side checker has the required xRPC schemas. ### Verification - Added regression test block: `TEST 5` in `t/config-center-yaml/stream-route.t` - Local execution note: full `prove` run could not be completed in this environment because `Test::Nginx::Socket::Lua::Stream` is not installed. -- 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]
