Closed h6ah4i closed 1 day ago
It might be easier to understand if you add the verbose option.
% runn run --fail-fast './*.yaml' --verbose
=== [No Description] (1.yaml)
--- (forcePass) ... ok
=== [No Description] (2.yaml)
--- (forceFail) ... fail
Failure/Error: test failed on "[No Description]".steps.forceFail: condition is not true
Condition:
false
│
=== [No Description] (3.yaml)
--- (forcePass) ... ok
=== Generated by `runn new` (deptrac.yaml)
1) 2.yaml 5a1a25bd510cabac2c55504c9f80759ca4ca935b
Failure/Error: test failed on "[No Description]".steps.forceFail: condition is not true
Condition:
false
│
Error: step not found: 0
Parallel execution in goroutines when multiple runbooks are specified and already started processes will continue to run until completion; when the fail-fast option is enabled, the context is canceled to prevent new processes from starting when an error occurs, but the already started processing is not canceled.
https://github.com/k1LoW/runn/blob/main/operator.go#L1690-L1712
@k1LoW In order to cancel a process that has already started, I wonder if it is feasible to check for context cancellation within each goroutine and abort the process appropriately?
Hmmm. I think that since sometime ago, --fail-fast is not behaving as intended!
In order to cancel a process that has already started, I wonder if it is feasible to check for context cancellation within each goroutine and abort the process appropriately?
Maybe we should consider it to make --fail-fast
the intended behavior.
@h6ah4i Thank you for your report!
Fixed at v0.119.2.
$ ls
1.yml 2.yml 3.yml
$ runn -v
runn version 0.119.2
$ runn run *.yml --fail-fast
.FS
1) tmp/2.yml f5274803c3f42fcbba30536e0cc1143e3e43811d
Failure/Error: test failed on "[No Description]".steps.forceFail: condition is not true
Condition:
false
│
Error: step not found: 0
$
I expected the book
3.yaml
not to run when the--fail-fast
option is specified in the following setup. However, the command output shows that the book3.yaml
is still being evaluated. Am I misunderstanding how this command-line option works?1.yaml
2.yaml
3.yaml