AlinsRan commented on PR #2897: URL: https://github.com/apache/apisix-ingress-controller/pull/2897#issuecomment-6076254974
This can't be merged yet, for two reasons: **1. Priorities above 1e14 break the sync of the whole GatewayProxy.** The precise hostname length sits at bit 44, so any hostname of 6+ characters pushes the priority past 1e14. APISIX's cjson then encodes it in scientific notation, and reading it back fails: ``` json: cannot unmarshal number 1.9432156745318e+14 into Go struct field Route.routes.priority of type int64 ``` All four e2e jobs fail because of this. **2. Every regex route now ranks above every prefix route.** For example `/.*` beats `/api/v1/specific`, which breaks existing users who have a regex catch-all route. Moving all routes to `/*` also stops the radixtree from narrowing candidates by path. The root cause is that a regex route gets `uris: ["/*"]` while a prefix route gets a concrete path, so they sit on different radixtree nodes and priority is never compared. A narrower fix would change only regex routes: use the literal prefix of the regex as `uris` (`^/myservice/.*/ws_html` → `/myservice/*`), so it lands on the same node as the overlapping prefix route and priority decides the order. Exact and prefix translation stay as they are. -- 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]
