-
Notifications
You must be signed in to change notification settings - Fork 683
Fix task progress percentage with failed tasks #5868
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
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 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
We need to make sure this is not going to impact Platform progress (also considering current redesign) |
It looks like getTotalCount() and getCompleteCount() are not sent to platform, in fact they are explicitly excluded: nextflow/plugins/nf-tower/src/main/io/seqera/tower/plugin/TowerJsonGenerator.groovy Lines 61 to 72 in bb11d2e
Which makes sense because platform needs the raw numbers anyway |
Reviewing the PR I have seen something similar is happening in the ReportObserver. I was testing if there was some side effect when running To be coherent with platform report it should be reporting the failed. It is not a side effect of the PR, it is also happening in previous versions. Can we fix it in this PR or should I open a new issue? |
Let's fix it in this PR |
Signed-off-by: jorgee <[email protected]>
@bentsherman, I have pushed the fix for the report stats |
modules/nextflow/src/main/groovy/nextflow/trace/WorkflowStats.groovy
Outdated
Show resolved
Hide resolved
Signed-off-by: Ben Sherman <[email protected]>
Signed-off-by: Ben Sherman <[email protected]>
Signed-off-by: Ben Sherman <[email protected]>
To fix the progress bar, I replaced the failed count with an "effective" failed count, which is just the failed minus the ignored/retried. So the percentages for succeeded + cached + ignored + "effective" failed should be correct |
Spun off from #4588 to provide a more focused change
Currently, when a task fails, it is included in the "complete" and "total" task count per process. As a result, the percentage actually increases when tasks fail, even though no progress has been made. It also distorts the total number of "real tasks" vs "task attempts" in the final log.
This PR removes the "failed" count from the complete/total task counts, and adds the "ignored" count in its place. The rationale is that every failed task will either be retried or ignored, or the run will terminate and it won't matter. Of these failures, only the ignored tasks should count towards progress. Retries that succeed will be marked as succeeded and count towards progress, otherwise they shouldn't.
To see the difference, run this pipeline with and without these changes:
This pipeline executes three tasks that fail, are retried, fail again, and ignored, with some delays to help you see the progress.
Without this PR, the process will appear to make progress as tasks fail and are retried. The final task count will be 6, even though there were only 3 "real tasks" to complete.
With this PR, the progress will remain at 0 until the tasks are ignored towards the end. The final task count will be 3, with the retried and ignored count on the side.
@jorgee if you agree with these changes, please approve so that I can merge. Let me know if you have any questions