Skip to content

Commit 74d9e86

Browse files
authored
Handle child node timeout in branch nodes (#6678)
1 parent 1ace0c3 commit 74d9e86

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

flytepropeller/pkg/controller/nodes/branch/handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ func (b *branchHandler) recurseDownstream(ctx context.Context, nCtx interfaces.N
172172
return handler.DoTransition(handler.TransitionTypeEphemeral, phase), nil
173173
}
174174

175-
if downstreamStatus.HasFailed() {
175+
if downstreamStatus.HasFailed() || downstreamStatus.HasTimedOut() {
176176
return handler.DoTransition(handler.TransitionTypeEphemeral, handler.PhaseInfoFailureErr(downstreamStatus.Err, nil)), nil
177177
}
178178

flytepropeller/pkg/controller/nodes/branch/handler_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,8 @@ func TestBranchHandler_RecurseDownstream(t *testing.T) {
181181
bn, false, handler.EPhaseRunning, v1alpha1.NodePhaseRunning, true, ""},
182182
{"childFailure", interfaces.NodeStatusFailed(expectedError), nil,
183183
bn, false, handler.EPhaseFailed, v1alpha1.NodePhaseFailed, true, ""},
184+
{"childTimedOut", interfaces.NodeStatusTimedOut, nil,
185+
bn, false, handler.EPhaseFailed, v1alpha1.NodePhaseTimedOut, true, ""},
184186
{"childComplete", interfaces.NodeStatusComplete, nil,
185187
bn, false, handler.EPhaseSuccess, v1alpha1.NodePhaseSucceeded, true, ""},
186188
{"childCompleteNoOutputs", interfaces.NodeStatusComplete, nil,

0 commit comments

Comments
 (0)