shreemaan-abhishek opened a new pull request, #13672: URL: https://github.com/apache/apisix/pull/13672
### Description Follow-up to #12794, which added dependency-protocol checking and delete protection for stream routes. This PR hardens those checks against a few edge cases: - **Reject self-reference**: a route that sets its own id as `protocol.superior_id` would otherwise pass the protocol-match check on update (it matches itself). Now rejected at write time. - **Fail closed on JSON decode errors**: `core.json.decode` returns `nil, err` on malformed data. Previously a decode failure silently skipped the record, which could hide a live `superior_id` reference (allowing deletion of an in-use route) or bypass the protocol-mismatch check. Now it returns an error instead of continuing. - **Explicit status on etcd failure**: `delete_checker` returned `nil` as the status code on an etcd fetch failure, which surfaces as an unexpected error path. Now returns `503`. ### Tests Added two cases to `t/admin/stream-routes-subordinate.t`: - superior_id references itself → 400 - force-delete of a referenced superior route → succeeds (bypasses the reference check) Existing cases are unchanged. -- 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]
