-
Notifications
You must be signed in to change notification settings - Fork 651
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
Improve logging of task progress #4588
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Ben Sherman <[email protected]>
✅ Deploy Preview for nextflow-docs-staging canceled.
|
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.
Super nice 👏🏻
Signed-off-by: Ben Sherman <[email protected]>
Signed-off-by: Ben Sherman <[email protected]>
Now that Phil's PR is merged, this PR is ready for review. |
@pditommaso can you review this one |
Not sure what's the difference |
Closed means the process has created all of the tasks it's going to create (except possibly for retries). At this point we know how many tasks the process must execute and so we can show a percentage. Before this point, it makes no sense to show a percentage. Whereas terminated means all tasks completed and the process was terminated. See my example at the top for how I show this:
|
Spun off from #4573 (comment) and below
This PR contains two improvements to the progress logging:
Don't show the percentage until the process is "closed", i.e. all tasks have been received. This prevents Nextflow from overestimating the progress before it knows the total task count of a process. Instead a question mark is shown.
This requires a new lifecycle event
onProcessClosed()
, which is also needed to implement array jobs, task grouping, and automatic cleanup, all for the same reason -- to know how many tasks a process will executeDon't include the failed task count in the percentage or the complete/total counts. This prevents the percentage from increasing when a task fails even though no progress was made, and it allows the process to reach 100% if the tasks are successfully retried/ignored.
As an example, consider a process that executes 4 tasks with 1 task that fails on the first attempt.
Before all tasks are received (i.e. process is still "open"):
A task fails and is retried, and succeeds on the second attempt:
If instead the failed task is ignored, it simply reduces the number of total tasks, allowing the process to reach 100% while still noting the number of ignored tasks: