Skip to content

Commit

Permalink
Parallel ignores concurrency and dependencies, we don't need to valid…
Browse files Browse the repository at this point in the history
…ate (#5191)

Co-authored-by: Greg Soltis <Greg Soltis>
  • Loading branch information
Greg Soltis authored and mehulkar committed Jun 5, 2023
1 parent 9060b38 commit 5c78ecd
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions cli/internal/run/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -474,9 +474,13 @@ func buildTaskGraphEngine(
return nil, fmt.Errorf("Invalid task dependency graph:\n%v", err)
}

// Check that no tasks would be blocked by a persistent task
if err := engine.ValidatePersistentDependencies(g, rs.Opts.runOpts.Concurrency); err != nil {
return nil, fmt.Errorf("Invalid persistent task configuration:\n%v", err)
// Check that no tasks would be blocked by a persistent task. Note that the
// parallel flag ignores both concurrency and dependencies, so in that scenario
// we don't need to validate.
if !rs.Opts.runOpts.Parallel {
if err := engine.ValidatePersistentDependencies(g, rs.Opts.runOpts.Concurrency); err != nil {
return nil, fmt.Errorf("Invalid persistent task configuration:\n%v", err)
}
}

return engine, nil
Expand Down

0 comments on commit 5c78ecd

Please sign in to comment.