Invalid BackendRef should not block route creation/update
erikfuller opened this issue · comments
Erik Fuller commented
According to the spec, invalid backendRefs should return a 500 rather than block route creation or updates. Lattice does not currently support fixed responses outside of 404, so we will return that for now.
Current behaviour (as originally highlighted by @zijun726911 offline) and steps to reproduce:
kubectl apply -f examples/my-hotel-gateway.yaml
kubectl apply -f examples/inventory-route.yaml
By creating a route with no backing service, we will see errors like:
failed at BuildModel: {“logger”:“controller.route”,“caller”:“controllers/route_controller.go:282”,“msg”:“buildAndDeployModel, Failed build model for salmo-5-ok4zh8ytnj due to failed to build rules due to buildTargetGroupSpec err error finding backend service e2e-test/bugmu-2-tfbytur05o due to Service \“bugmu-2-tfbytur05o\” not found”}
This will never succeed until the service is created.
Erik Fuller commented
Fix for this in the attached PR. Follow up is #494