nic-6443 opened a new pull request, #13515:
URL: https://github.com/apache/apisix/pull/13515

   ### Description
   
   Since 3.16.0, stream routes that use an xRPC protocol are rejected by the 
HTTP workers' schema check when the Admin API is disabled (e.g. `role: 
data_plane` with the yaml/json config provider), and the error below is logged 
on every config load:
   
   ```
   failed to check item data of [stream_routes] err:unknown protocol [redis]
   ```
   
   This is a regression from #12996: `router.http_init_worker()` now 
initializes the stream router in HTTP workers whenever `apisix.stream_proxy` is 
configured, so the stream route checker (which calls `xrpc.check_schema()`) 
also runs there. But `xrpc.init()` still skips registering protocol schemas in 
the HTTP subsystem when the Admin API is disabled, leaving the protocol 
registry empty in those workers and causing every xRPC stream route to be 
dropped from their view.
   
   The fix extends the guard in `xrpc.init()` to also register protocol schemas 
when `stream_proxy` is configured, mirroring the condition #12996 added in 
`router.lua`.
   
   Same direction as the self-closed #13327 by @herwinz.
   
   #### Which issue(s) this PR fixes:
   
   Fixes #13325
   
   ### Checklist
   
   - [x] I have explained the need for this PR and the problem it solves
   - [x] I have explained the changes or the new features added to this PR
   - [x] I have added tests corresponding to this change
   - [ ] I have updated the documentation to reflect this change
   - [x] I have verified that this change is backward compatible (If not, 
please discuss on the [APISIX mailing 
list](https://github.com/apache/apisix/tree/master#community) first)
   


-- 
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]

Reply via email to