Skip to content

Commit 6c55d1e

Browse files
Merge pull request #484 from wking/taskless-node-panic
Bug 1903382: pkg/payload/task_graph: Require firstIncompleteNode to have tasks
2 parents 1d30d9c + 6b1470b commit 6c55d1e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/payload/task_graph.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ func RunGraph(ctx context.Context, graph *TaskGraph, maxParallelism int, fn func
536536
incompleteCount := 0
537537
for i, result := range results {
538538
if result == nil {
539-
if firstIncompleteNode == nil {
539+
if firstIncompleteNode == nil && len(graph.Nodes[i].Tasks) > 0 {
540540
firstIncompleteNode = graph.Nodes[i]
541541
}
542542
incompleteCount++

0 commit comments

Comments
 (0)