Skip to content

Nextflow launch v2#4

Closed
ewels wants to merge 9 commits intonextflow-authfrom
nextflow-launch-v2
Closed

Nextflow launch v2#4
ewels wants to merge 9 commits intonextflow-authfrom
nextflow-launch-v2

Conversation

@ewels
Copy link
Owner

@ewels ewels commented Oct 7, 2025

First stab at re-writing the new nextflow launch command. Builds off the new auth commands in nextflow-io#6380

Stacked PR, opened it here for initial review so that the diff doesn't get too big. Will reopen it against the main Nextflow repo once nextflow-io#6380 is merged.

This PR includes:

  • New nextflow launch command
    • Simple: only works with remote assets, so needs remote paths etc
    • Handles config parsing to pass on parameters and config profiles
  • New spinner animation that plays whilst waiting for remote calls
    • Used when launching pipelines, shows pipeline status
    • Also used in auth code when waiting for auth0 completion

Overview video showing nextflow launch in action:

CleanShot.2025-10-07.at.12.53.13.mp4

ewels added 9 commits October 7, 2025 01:11
Signed-off-by: Phil Ewels <phil.ewels@seqera.io>
Signed-off-by: Phil Ewels <phil.ewels@seqera.io>
Signed-off-by: Phil Ewels <phil.ewels@seqera.io>
Signed-off-by: Phil Ewels <phil.ewels@seqera.io>
Signed-off-by: Phil Ewels <phil.ewels@seqera.io>
…unch

Signed-off-by: Phil Ewels <phil.ewels@seqera.io>
Signed-off-by: Phil Ewels <phil.ewels@seqera.io>
Signed-off-by: Phil Ewels <phil.ewels@seqera.io>
Signed-off-by: Phil Ewels <phil.ewels@seqera.io>
Comment on lines +56 to +79
@Parameter(names = ['-name'], description = 'Assign a mnemonic name to the pipeline run')
String runName

@Parameter(names = ['-w', '-work-dir'], description = 'Directory where intermediate result files are stored')
String workDir

@Parameter(names = ['-r', '-revision'], description = 'Revision of the project to run (either a git branch, tag or commit SHA number)')
String revision

@Parameter(names = ['-profile'], description = 'Choose a configuration profile')
String profile

@Parameter(names = ['-c', '-config'], description = 'Add the specified file to configuration set')
List<String> configFiles

@Parameter(names = ['-params-file'], description = 'Load script parameters from a JSON/YAML file')
String paramsFile

@Parameter(names = ['-entry'], description = 'Entry workflow name to be executed')
String entryName

@Parameter(names = ['-resume'], description = 'Execute the script using the cached results')
String resume

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The kuberun command is extending the CmdRun command to get the same parameters as CmdRun, I am wondering if we could do the same for launch or is there a CmdRun parameter that can't we used in platform.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have checked and the API is a restricted set, so it is not viable

* @author Phil Ewels <phil.ewels@seqera.io>
*/
@CompileStatic
class SpinnerUtil {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this class jus used in tower or could it be used for other CLI? Maybe move to nextflow.cli package as ColorUtils

@jorgee
Copy link

jorgee commented Oct 13, 2025

Doing some test with default values. I got this message. No primary compute environment found. Not sure if we could prompt for selecting one.
Anyway, I think it could be related to a strange behaviour with auth. When, I was selecting a workspace in the config, it was asking me for a compute environment and everything was fine. However, when selecting the default workspace, it was not asking for selecting a compute environment.

@ewels
Copy link
Owner Author

ewels commented Oct 13, 2025

Anyway, I think it could be related to a strange behaviour with auth. When, I was selecting a workspace in the config, it was asking me for a compute environment and everything was fine. However, when selecting the default workspace, it was not asking for selecting a compute environment.

You were right - I just found the same bug and fixed it in nextflow-io@1f57a78

Once I pull in the upstream changes here it should hopefully be resolved.

@ewels
Copy link
Owner Author

ewels commented Oct 16, 2025

I'm not sure what happened, but some kind of git manipulation on the auth dev work has resulted in there being a 100% lines-of-code merge conflict when I try to rebase or merge on the upstream code 🤦🏻‍♂️

I'm thinking of just copying the code from this branch over into a new branch on top of Nextflow @ master, but then it'll be difficult to know which changes in auth are improvements from this PR and which are upstream improvements.

Otherwise, could maybe try to find the most recent version of the non-rebased auth branch where merging is still possible. Or maybe best is to simply look at the diff on this PR and manually re-implement the changes on a fresh branch against master.

I think the latter is probably the one with the best chance of success. I can try to find time to have a stab at this, but I'm very stretched at the moment. @jorgee if you have time tomorrow and fancy trying to sort out this mess then any help would be very welcome 🙌🏻

@jorgee
Copy link

jorgee commented Oct 17, 2025

Created a draft PR in Nextflow project. nextflow-io#6491

ewels added a commit to nextflow-io/nextflow that referenced this pull request Oct 17, 2025
Ported from ewels#4 by @jorgee

Co-authored-by: jorgee <jorge.ejarque@seqera.io>
Signed-off-by: Phil Ewels <phil.ewels@seqera.io>
@ewels ewels closed this Oct 20, 2025
@ewels ewels deleted the nextflow-launch-v2 branch October 20, 2025 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants