Skip to content

Commit

Permalink
fix: [PipelineLoop] integer divide by zero
Browse files Browse the repository at this point in the history
- Use default `step` value: `1` in case of `0` provided in `PipelineLoop`.

Issue: kubeflow#882
  • Loading branch information
rafalbigaj committed Mar 18, 2022
1 parent d5e2e43 commit 9186197
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,7 @@ func computeIterations(run *v1alpha1.Run, tls *pipelineloopv1alpha1.PipelineLoop
if from == -1 || to == -1 {
return 0, iterationElements, fmt.Errorf("The from or to parameters was not found in runs")
}
if step == -1 {
if step <= 0 {
step = 1
}
// numberOfIterations is the number of (to - from) / step + 1
Expand Down

0 comments on commit 9186197

Please sign in to comment.