Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correcting IsParent metadata in ArrayNode eventing #4967

Merged
merged 1 commit into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion flyteadmin/pkg/repositories/transformers/node_execution.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 3 additions & 1 deletion flytepropeller/pkg/controller/nodes/transformers.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,10 @@
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
}

Check warning on line 184 in flytepropeller/pkg/controller/nodes/transformers.go

View check run for this annotation

Codecov / codecov/patch

flytepropeller/pkg/controller/nodes/transformers.go#L182-L184

Added lines #L182 - L184 were not covered by tests
} else if dynamicNodePhase != v1alpha1.DynamicNodePhaseNone {
nev.IsDynamic = true
if nev.GetTaskNodeMetadata() != nil && nev.GetTaskNodeMetadata().DynamicWorkflow != nil {
Expand Down
Loading