Fix cached task after abort#6903
Conversation
… when task previously aborted or retired Signed-off-by: jorgee <jorge.ejarque@seqera.io>
✅ Deploy Preview for nextflow-docs-staging canceled.
|
Signed-off-by: jorgee <jorge.ejarque@seqera.io>
Signed-off-by: jorgee <jorge.ejarque@seqera.io>
|
Any update on this one? :'D |
|
This PR is ready, just this minor comment not related to the issue. |
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
There was a problem hiding this comment.
@jorgee does this test need to be updated since I removed the extra logic? it is failing for me locally
There was a problem hiding this comment.
Yes, now the third execution also retries and execution will take more time. Updating it.
There was a problem hiding this comment.
It seems there was an inconsistency with failed counts and failed counts. Removing the code, the number of attempts was not increased but failedCounts yes, and it is also used for retries.
I have renamed the abortedCount to previousFailOrAbortedCount. It stores the aborted and failed cached execution. This is just used for increasing the tries
There was a problem hiding this comment.
Okay, I think I understand all the changes. The only problem now is that this e2e test continues to fail locally
There was a problem hiding this comment.
Is it possible to get the log of your e2e test? I would like to know why is it failing in your case.
Signed-off-by: jorgee <jorge.ejarque@seqera.io>
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
pditommaso
left a comment
There was a problem hiding this comment.
Please add unit tests to capture this behaviour
Signed-off-by: jorgee <jorge.ejarque@seqera.io>
There was a validation tests checking the full fuctionality. I have added unit tests in the last commit. |
|
CORRECTION: Closing in favor of #7194 |
Close #6884
Alternative for #6882
This pull request enhances task retry logic in Nextflow by improving how task failures and aborts are tracked and incorporated into cache key calculation. The changes ensure that both failure and abort counts are considered, making task resumption and retry behavior more robust and predictable.
Task retry and cache logic improvements:
failCountand a newabortedCountto ensure that retries after aborts or failures use a distinct hash.failCountorabortedCount) on theTaskRunobject are incremented, ensuring accurate retry attempts and cache key updates.Task state tracking enhancements:
abortedCountfield to theTaskRunclass to track the number of times a task execution has been aborted.isAborted()andisFailed()helper methods to theTraceRecordclass for clearer and more maintainable status checks.TODO: