nextflow-io / nextflow

A DSL for data-driven computational pipelines
http://nextflow.io
Apache License 2.0
2.67k stars 624 forks source link

Resume with run name is not working #3362

Open YuxinShi0423 opened 1 year ago

YuxinShi0423 commented 1 year ago

Bug report

When using -resume with run name as listed in .history file, it always use the latest session id instead.

Expected behavior and actual behavior

Expecting the run name to be used when looking for the session to be resumed.

Steps to reproduce the problem

(See the history file attached below)

Program output

Example history file:

2022-11-07 15:32:26 1.6s    angry_bernard   OK  08899006023df2b5a0dd3742dedc0c0643f31118    cafefcae-2c4f-414c-b1c8-016c9a016480    nextflow run nextflow-io/tests/hello.nf
2022-11-07 15:32:34 1.5s    elated_brenner  OK  08899006023df2b5a0dd3742dedc0c0643f31118    0e13f630-30f3-43e2-9306-fe8c88dfd791    nextflow run nextflow-io/tests/env.nf
2022-11-07 15:32:50 1.7s    grave_miescher  OK  08899006023df2b5a0dd3742dedc0c0643f31118    0e13f630-30f3-43e2-9306-fe8c88dfd791    nextflow run nextflow-io/tests/hello.nf -resume angry_bernard
2022-11-07 15:33:22 1.3s    clever_volhard  OK  08899006023df2b5a0dd3742dedc0c0643f31118    7a47b5a2-4a87-408d-9845-c6464a991009    nextflow run nextflow-io/tests/env.nf
2022-11-07 15:33:39 1.8s    evil_varahamihira   OK  08899006023df2b5a0dd3742dedc0c0643f31118    7a47b5a2-4a87-408d-9845-c6464a991009    nextflow run nextflow-io/tests/env.nf -resume elated_brenner
2022-11-07 15:34:29 1.4s    tender_hugle    OK  08899006023df2b5a0dd3742dedc0c0643f31118    7a47b5a2-4a87-408d-9845-c6464a991009    nextflow run nextflow-io/tests/hello.nf -resume grave_miescher

Environment

Additional context

Might be related to https://github.com/nextflow-io/nextflow/blob/ff6afcbdc127700f89090205fede28322135ef56/modules/nextflow/src/main/groovy/nextflow/cli/Launcher.groovy#L215-L222 when parsing the resume arguments.

pditommaso commented 1 year ago

Resume is expected to be true, last or the UUID of the prev execution e.g. 0e13f630-30f3-43e2-9306-fe8c88dfd791.

The run name is not expected to be used for the resume.

YuxinShi0423 commented 1 year ago

Thanks! But then I think this article needs to be updated: https://www.nextflow.io/blog/2019/demystifying-nextflow-resume.html

You can use the resume command with either the session ID or the run name to recover a specific execution. For example:

$ nextflow run rnaseq-nf -resume mighty_boyd

ewels commented 1 year ago

Just came up against this issue as well. I've been using run names with -resume myself for the entire time I've used Nextflow, and have told many hundreds of people to do the same 😆

Just had a quick play and run names seem to work fine up until at least version 22.10.1. But they don't work with 22.10.6.

Tagging @mribeirodantas, @bentsherman and @robsyme who were also involved in a thread about this on Slack just now. @robsyme even said he'd look into it 😉

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

ewels commented 1 year ago

Still would like this please.