nf-core / nf-core/tools

Updating subworkflows doesn't fetch module changes unless you add force flag

Open
#2,498 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
322
Forks
255
Avg merge
2d 3h
Merged PRs (30d)
5

Description

Description of the bug

When updating a subworkflow, by default it only fetches changes to the subworkflow itself. If the subworkflow hasn't changed, it will not check for changes to the supporting modules.

The work around is to use the -f flag. But I think this flag does other things, and anyway it's not intuitive and took me a long time to figure out (by reading the nf-core tools code). I would suggest making recursive updates the default, even if the subworkflow hasn't changed.

Command used and terminal output
(nf-core-dev) nextflow easifish $ nf-core subworkflows -g git@github.com:JaneliaSciComp/nextflow-modules.git update spark_stop

                                          ,--./,-.
          ___     __   __   __   ___     /,-._.--~\
    |\ | |__  __ /  ` /  \ |__) |__         }  {
    | \| |       \__, \__/ |  \ |___     \`-._,-`-,
                                          `._,._,'

    nf-core/tools version 2.11.dev0 - https://nf-co.re


? Do you want to view diffs of the proposed changes? No previews, just update everything
INFO     'subworkflows/janelia/spark_stop' is already up to date
INFO     Updates complete ✨
(nf-core-dev) nextflow easifish $
(nf-core-dev) nextflow easifish $ nf-core subworkflows -g git@github.com:JaneliaSciComp/nextflow-modules.git update spark_stop -f

                                          ,--./,-.
          ___     __   __   __   ___     /,-._.--~\
    |\ | |__  __ /  ` /  \ |__) |__         }  {
    | \| |       \__, \__/ |  \ |___     \`-._,-`-,
                                          `._,._,'

    nf-core/tools version 2.11.dev0 - https://nf-co.re


? Do you want to view diffs of the proposed changes? No previews, just update everything
INFO     Updating 'janelia/spark_stop'
WARNING  All modules and subworkflows linked to the updated subworkflow will be automatically updated.
         It is advised to keep all your modules and subworkflows up to date.
         It is not guaranteed that a subworkflow will continue working as expected if all modules/subworkflows used in it are
         not up to date.

? Would you like to continue updating all modules and subworkflows? Yes
INFO     Updating 'janelia/spark/terminate'
INFO     Updates complete ✨
System information

nextflow version 23.04.0.5857
nf-core, version 2.11.dev0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the nf-core subworkflows update command and inspect how the -f flag controls recursive updates. Reproduce the two commands shown for spark_stop, then verify that updating without -f also checks linked modules and subworkflows while preserving the existing update confirmation behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.