From eaac04d0a3b72a3182500642478d607b79de0885 Mon Sep 17 00:00:00 2001 From: Dan Rammer Date: Wed, 28 Feb 2024 08:40:14 -0600 Subject: [PATCH] not setting IsParent on ArrayNode unless new eventing scheme (#4967) Signed-off-by: Daniel Rammer --- flyteadmin/pkg/repositories/transformers/node_execution.go | 2 +- flytepropeller/pkg/controller/nodes/transformers.go | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/flyteadmin/pkg/repositories/transformers/node_execution.go b/flyteadmin/pkg/repositories/transformers/node_execution.go index 59ea230f7e..817f53290a 100644 --- a/flyteadmin/pkg/repositories/transformers/node_execution.go +++ b/flyteadmin/pkg/repositories/transformers/node_execution.go @@ -284,7 +284,7 @@ func UpdateNodeExecutionModel( // In the case of dynamic nodes reporting DYNAMIC_RUNNING, the IsParent and IsDynamic bits will be set for this event. // Update the node execution metadata accordingly. - if request.Event.IsParent || request.Event.IsDynamic { + if request.Event.IsParent || request.Event.IsDynamic || request.Event.IsArray { var nodeExecutionMetadata admin.NodeExecutionMetaData if len(nodeExecutionModel.NodeExecutionMetadata) > 0 { if err := proto.Unmarshal(nodeExecutionModel.NodeExecutionMetadata, &nodeExecutionMetadata); err != nil { diff --git a/flytepropeller/pkg/controller/nodes/transformers.go b/flytepropeller/pkg/controller/nodes/transformers.go index eb96a38d9c..b034c5b90f 100644 --- a/flytepropeller/pkg/controller/nodes/transformers.go +++ b/flytepropeller/pkg/controller/nodes/transformers.go @@ -178,8 +178,10 @@ func ToNodeExecutionEvent(nodeExecID *core.NodeExecutionIdentifier, if node.GetKind() == v1alpha1.NodeKindWorkflow && node.GetWorkflowNode() != nil && node.GetWorkflowNode().GetSubWorkflowRef() != nil { nev.IsParent = true } else if node.GetKind() == v1alpha1.NodeKindArray { - nev.IsParent = true nev.IsArray = true + if config.GetConfig().ArrayNodeEventVersion == 1 { + nev.IsParent = true + } } else if dynamicNodePhase != v1alpha1.DynamicNodePhaseNone { nev.IsDynamic = true if nev.GetTaskNodeMetadata() != nil && nev.GetTaskNodeMetadata().DynamicWorkflow != nil {