lulululu-debug opened a new pull request, #219:
URL: https://github.com/apache/casbin-gateway/pull/219

   ### What
   
   Agent-bound requests now fail over instead of dying with their single bound 
channel. proxyByAgent tries the bound channel first (honouring the binding), 
then falls over to the other enabled channels serving the same model, in 
priority order — reusing the existing forwardToChannels failover path.
   
   A new agentChannels helper builds that ordered list and drops any duplicate 
of the bound channel so the same upstream is never retried twice.
   
   ### Why
   
   proxyByModel already fails over across channels; the agent path was the only 
entry point still pinned to one upstream, so a single dead channel took the 
whole agent down. This closes that gap.
   
   The fallback lookup is best-effort: ErrNoChannelAvailable is treated as "no 
fallbacks", and any other lookup error is logged but non-fatal — the bound 
channel is still tried on its own, so failover never makes an agent request 
worse than before.
   
   ### Tests
   
   TestAgentChannels covers the ordering (bound first, then fallbacks in 
priority order) and the de-duplication of the bound channel from the fallback 
list.


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to