ronething commented on code in PR #2582:
URL: 
https://github.com/apache/apisix-ingress-controller/pull/2582#discussion_r2384939375


##########
internal/adc/translator/apisixroute.go:
##########
@@ -434,9 +455,18 @@ func (t *Translator) translateStreamRule(tctx 
*provider.TranslateContext, ar *ap
        svc.StreamRoutes = append(svc.StreamRoutes, sr)
 
        auNN := types.NamespacedName{Namespace: ar.GetNamespace(), Name: 
part.Backend.ServiceName}
+
        upstream := adc.NewDefaultUpstream()
        if au, ok := tctx.Upstreams[auNN]; ok {
-               upstream, _ = t.translateApisixUpstream(tctx, au)
+               service := tctx.Services[auNN]
+               if service == nil {
+                       return nil, errors.Errorf("service not found, 
ApisixRoute: %s, Service: %s", utils.NamespacedName(ar), auNN)
+               }

Review Comment:
   Should it directly return an error here? It's different with the previous 
logic.



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