Skip to content

Commit

Permalink
Revert "fix: add simple concurrency limit (nektos#823)"
Browse files Browse the repository at this point in the history
This reverts commit 4d552e6.
  • Loading branch information
ZauberNerd authored and github-actions committed Feb 12, 2022
1 parent 6fe135f commit 04dac8a
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions pkg/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,16 +123,7 @@ func (runner *runnerImpl) NewPlanExecutor(plan *model.Plan) common.Executor {
for r, run := range stage.Runs {
job := run.Job()
matrixes := job.GetMatrixes()
maxParallel := 4
if job.Strategy != nil {
maxParallel = job.Strategy.MaxParallel
}

if len(matrixes) < maxParallel {
maxParallel = len(matrixes)
}

b := 0
for i, matrix := range matrixes {
rc := runner.newRunContext(run, matrix)
rc.JobName = rc.Name
Expand All @@ -159,14 +150,9 @@ func (runner *runnerImpl) NewPlanExecutor(plan *model.Plan) common.Executor {
return nil
})(common.WithJobErrorContainer(WithJobLogger(ctx, jobName, rc.Config.Secrets, rc.Config.InsecureSecrets)))
})
b++
if b == maxParallel {
pipeline = append(pipeline, common.NewParallelExecutor(stageExecutor...))
stageExecutor = make([]common.Executor, 0)
b = 0
}
}
}
pipeline = append(pipeline, common.NewParallelExecutor(stageExecutor...))
}

return common.NewPipelineExecutor(pipeline...).Then(handleFailure(plan))
Expand Down

0 comments on commit 04dac8a

Please sign in to comment.