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

[BUG] subworkflow timeout propagation #4766

Merged
merged 5 commits into from
Jan 24, 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
19 changes: 19 additions & 0 deletions flytepropeller/pkg/controller/nodes/subworkflow/subworkflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,25 @@
return handler.DoTransition(handler.TransitionTypeEphemeral, handler.PhaseInfoRunning(nil)), nil
}

if state.HasTimedOut() {
hamersaw marked this conversation as resolved.
Show resolved Hide resolved
workflowNodeState := handler.WorkflowNodeState{
Phase: v1alpha1.WorkflowNodePhaseFailing,
Error: &core.ExecutionError{
Kind: core.ExecutionError_USER,
Code: "Timeout",
Message: "Timeout in node",
},
}

err = nCtx.NodeStateWriter().PutWorkflowNodeState(workflowNodeState)
if err != nil {
logger.Warnf(ctx, "failed to store failing subworkflow state with err: [%v]", err)
return handler.UnknownTransition, err
}

Check warning on line 105 in flytepropeller/pkg/controller/nodes/subworkflow/subworkflow.go

View check run for this annotation

Codecov / codecov/patch

flytepropeller/pkg/controller/nodes/subworkflow/subworkflow.go#L91-L105

Added lines #L91 - L105 were not covered by tests

return handler.DoTransition(handler.TransitionTypeEphemeral, handler.PhaseInfoRunning(nil)), nil

Check warning on line 107 in flytepropeller/pkg/controller/nodes/subworkflow/subworkflow.go

View check run for this annotation

Codecov / codecov/patch

flytepropeller/pkg/controller/nodes/subworkflow/subworkflow.go#L107

Added line #L107 was not covered by tests
}

if state.IsComplete() {
// If the WF interface has outputs, validate that the outputs file was written.
var oInfo *handler.OutputInfo
Expand Down
2 changes: 2 additions & 0 deletions flytepropeller/pkg/controller/nodes/transformers.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@
return core.NodeExecution_FAILED
case handler.EPhaseRecovered:
return core.NodeExecution_RECOVERED
case handler.EPhaseTimedout:
return core.NodeExecution_TIMED_OUT

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

View check run for this annotation

Codecov / codecov/patch

flytepropeller/pkg/controller/nodes/transformers.go#L72-L73

Added lines #L72 - L73 were not covered by tests
default:
return core.NodeExecution_UNDEFINED
}
Expand Down
Loading