From 6c8f03f28024670a29713c202c439df3688bca0a Mon Sep 17 00:00:00 2001 From: Derek Wang Date: Tue, 15 Nov 2022 10:54:05 -0500 Subject: [PATCH] fix(controller): vertex nil check for edge listing. Fixes #352 (#353) --- pkg/apis/numaflow/v1alpha1/pipeline_types.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/apis/numaflow/v1alpha1/pipeline_types.go b/pkg/apis/numaflow/v1alpha1/pipeline_types.go index 94fd7a7bc1..6c43359fee 100644 --- a/pkg/apis/numaflow/v1alpha1/pipeline_types.go +++ b/pkg/apis/numaflow/v1alpha1/pipeline_types.go @@ -89,6 +89,9 @@ func (p Pipeline) ListAllEdges() []Edge { for _, e := range p.Spec.Edges { edgeCopy := e.DeepCopy() toVertex := p.GetVertex(e.To) + if toVertex == nil { + continue + } if toVertex.UDF == nil || toVertex.UDF.GroupBy == nil { // Clean up parallelism if downstream vertex is not a reduce UDF. // This has been validated by the controller, harmless to do it here.