AlinsRan commented on issue #2840:
URL: 
https://github.com/apache/apisix-ingress-controller/issues/2840#issuecomment-5486047814

   **Confirmed. Three notes on scope and root cause.**
   
   **1. Five controllers, not two.** TCPRoute, UDPRoute and TLSRoute have the 
same ordering.
   
   **2. The invisible class is translation failures, not sync failures.** For 
routes, `Provider.Update` only writes the in-memory store; the data-plane push 
is async, and sync errors do come back through `handleADCExecutionErrors → 
handleStatusUpdate` and set `Accepted=False / SyncFailed`. What has no status 
exit at all is the synchronous error from `TranslateXXXRoute` / `buildConfig` — 
that one is only requeued.
   
   Two gaps in that async path, worth fixing alongside: `status.go` has no 
`KindTLSRoute` case, and `MergeCondition` overwrites unconditionally — so any 
reconcile triggered by an EndpointSlice/PluginConfig/Gateway watch writes 
`Accepted=True` back over an async `SyncFailed`. The condition flaps even when 
the async path works.
   
   **3. There is an inverse bug on the same lines.** The gate for programming 
is `isRouteAccepted(gateways)`, which only looks at the Gateway parent 
conditions, never at `acceptStatus`. So when `ProcessGatewayProxy` or 
`processHTTPRoutePolicies` fails, the status says `Accepted=False` and the 
route gets programmed anyway.
   
   **On the fix:** moving the status write after `Provider.Update` alone makes 
it worse — the early `return` means no status gets written at all. It needs the 
`apisixroute_controller.go` shape: fold the error into the condition, write 
status once at the end. Reuse `Accepted=False` + `SyncFailed` rather than a new 
condition type (routes have no `Programmed` in Gateway API). And once 
translation errors are visible, stop requeueing them — they're deterministic.
   
   **On the webhook:** agreed it's missing, but it's mitigation only. A 
PluginConfig edited after admission bypasses it entirely.
   
   **Related:** #2814 made the ApisixRoute/Ingress paths fail closed, but 
`translator/httproute.go` still silently drops a plugin whose config fails to 
unmarshal, leaving the route live. That's a worse failure mode than this issue, 
and closing it depends on this fix landing 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