nextflow icon indicating copy to clipboard operation
nextflow copied to clipboard

Nextflow doesn't match the container from the withName section at the nextflow.config file (NFX_VERSION >= 22.03.0-edge).

Open CarlosLopezElorduy opened this issue 2 years ago • 1 comments

Bug report

When using containers specified in the nextflow.config file (withName section), Nextflow doesn't match them properly in versions >= 22.03.0-edge.

Expected behavior and actual behavior

  • EXPECTED: the container from the withName section should be matched properly in any version of Nextflow
  • ACTUAL: the container is only matched properly up until version 22.03.0-edge.

Steps to reproduce the problem

Minimum setup to reproduce it:

$ mkdir nfconfig
$ cd nfconfig
$ cat > nextflow.config <<EOF
process {
  withName:Foo {
    container = 'ubuntu'
  }
}
 
profiles {
  bar {
    process {
      withName:Foo {
        cpus = 14
        memory = 60.GB
      }
    }
  }
}
EOF

Program output

The container is matched at the nextflow.config file when using any NXF_VERSION < 22.03.0-edge (e.g. NXF_VERSION = 22.02.1-edge).

$ NXF_VER=22.02.1-edge nextflow config -profile bar
process {
   withName:Foo {
      container = 'ubuntu'
      cpus = 14
      memory = '60 GB'
   }
}

The container is NOT matched when using NXF_VERSION >= 22.03.0-edge.

$ NXF_VER=22.03.0-edge nextflow config -profile bar
process {
   withName:Foo {
      cpus = 14
      memory = '60 GB'
   }
}

Environment

  • Nextflow version (WORKING): NXF_VERSION < 22.03.0-edge
  • Nextflow version (NOT WORKING): NXF_VERSION >= 22.03.0-edge
  • Java version: openjdk 11.0.13 2021-10-19
  • Operating system: Linux
  • Bash version: 4.2.46(2)-release

Additional context

Maybe related with the fix to this issue https://github.com/nextflow-io/nextflow/issues/2701 found in the release notes for version 22.03.0-edge ?

CarlosLopezElorduy avatar Jul 25 '22 10:07 CarlosLopezElorduy

yes, it's a known bug

as a temporary workaround, you can try to declare the profile section firstly:

profiles {
  bar {
    process {
      withName:Foo {
        cpus = 14
        memory = 60.GB
      }
    }
  }
}

process {
  withName:Foo {
    container = 'ubuntu'
  }
}

NXF_VER=22.03.0-edge nextflow config -profile bar
process {                            
   withName:Foo {
      cpus = 14
      memory = '60 GB'
      container = 'ubuntu'
   }
}

jorgeaguileraseqera avatar Jul 26 '22 01:07 jorgeaguileraseqera

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.

stale[bot] avatar Dec 31 '22 21:12 stale[bot]