-
Notifications
You must be signed in to change notification settings - Fork 629
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove errorStrategy check in getMaxRetries to avoid possible deadloc… #5474
base: master
Are you sure you want to change the base?
Remove errorStrategy check in getMaxRetries to avoid possible deadloc… #5474
Conversation
…k when using task.maxRetries to set the errorStrategy Signed-off-by: jorgee <[email protected]>
✅ Deploy Preview for nextflow-docs-staging ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
A test is failing here
|
Yes, It is failing because maxRetries is 0. I need to check why it is returning 0 instead of the default one. I have converted to draft |
Signed-off-by: jorgee <[email protected]>
Signed-off-by: jorgee <[email protected]>
Tests are fixed |
modules/nextflow/src/main/groovy/nextflow/script/ProcessConfig.groovy
Outdated
Show resolved
Hide resolved
….groovy [ci skip] Signed-off-by: Paolo Di Tommaso <[email protected]>
@@ -345,8 +345,7 @@ class TaskConfig extends LazyMap implements Cloneable { | |||
|
|||
int getMaxRetries() { | |||
def result = get('maxRetries') | |||
def defResult = getErrorStrategy() == ErrorStrategy.RETRY ? 1 : 0 | |||
result ? result as int : defResult | |||
result != null ? result as int : 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
result != null ? result as int : 1 | |
result ? result as int : 1 |
Better to keep as it was before
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed because result can be an integer and 0 is considered as false. It was breaking the test when number of retries is set to 0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why, as a user, should I use 0
retries with a retry error strategy?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it has not too much sense but there was this possibility and it was in the test. Or we keep null check or we change the test.
close #5464
Remove errorStrategy check in getMaxRetries method. It avoids possible deadlock when using task.maxRetries in dynamic errorStrategy directives.
Default maxRetries is set to 1