You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(Please follow this template replacing the text between parentheses with the requested information)
Expected behavior and actual behavior
I want to set errorStrategy and maxRetries in the nextflow config, and then for some processes to change the maxRetries with the aim that the errorStrategy should adjust accordingly
Steps to reproduce the problem
main.nf:
process A {
maxRetries 4
input:
script:
"""
exit 1
"""
}
process B {
input:
script:
"""
exit 1
"""
}
workflow {
A()
B()
}
nextflow.config:
profiles {
local {
process {
executor = 'local'
errorStrategy = {
sleep(5 * Math.pow(2, task.attempt) as long)
task.attempt <= process.maxRetries ? 'retry' : 'ignore'
}
maxRetries = 1
}
}
other {
process {
maxRetries = 4
errorStrategy = {
sleep(60 * Math.pow(2, task.attempt) as long)
task.attempt <= process.maxRetries ? 'retry' : 'terminate'
}
}
}
}
Program output
The process maxRetries is ignored by the errorStrategy.
ubuntu@mcolpus-main:~/pipelines/nextflow_test_max_retries$ nextflow main.nf -profile local
N E X T F L O W ~ version 24.10.0
Launching `main.nf` [stupefied_ramanujan] DSL2 - revision: d107b1c91a
executor > local (4)
[8e/c5cee3] A [100%] 2 of 2, failed: 2, retries: 1 ✔
[14/7baa91] B [100%] 2 of 2, failed: 2, retries: 1 ✔
[16/71c57f] NOTE: Process `B` terminated with an error exit status (1) -- Execution is retried (1)
[2d/4487c6] NOTE: Process `A` terminated with an error exit status (1) -- Execution is retried (1)
[8e/c5cee3] NOTE: Process `A` terminated with an error exit status (1) -- Error is ignored
[14/7baa91] NOTE: Process `B` terminated with an error exit status (1) -- Error is ignored
If the process error strategy is lower than the configs default then it will fail and not be ignored.
I also tried used task.maxRetries instead, but that crashed. nextflow.log
Environment
Nextflow version: 24.10.0
Java version: 17.0.12 2024-07-16
Operating system: linux
Bash version: 5.1.16(1)-release
The text was updated successfully, but these errors were encountered:
In my opinion, we could set the maxRetries to 1 in all the cases without evaluating the the errorStrategy to avoid the loop. In the current nextflow code, the getMaxRetries is only called when the task fails and strategy is RETRY.
Bug report
(Please follow this template replacing the text between parentheses with the requested information)
Expected behavior and actual behavior
I want to set errorStrategy and maxRetries in the nextflow config, and then for some processes to change the maxRetries with the aim that the errorStrategy should adjust accordingly
Steps to reproduce the problem
main.nf:
nextflow.config:
Program output
The process maxRetries is ignored by the errorStrategy.
If the process error strategy is lower than the configs default then it will fail and not be ignored.
I also tried used
task.maxRetries
instead, but that crashed.nextflow.log
Environment
The text was updated successfully, but these errors were encountered: