nextflow-io / nextflow

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

Using the the unique operator after collect causes the pipeline to stall at pipeline end #5052

Closed R-Cardenas closed 3 weeks ago

R-Cardenas commented 3 weeks ago

Bug report

When processing a channel with the collect operator followed by unique, the pipeline will run to the end but will hang indefinitely.

Expected behavior and actual behavior

The pipeline should finish successfully and exit.

Steps to reproduce the problem

test = Channel.of( 'a', 'b', 'c' , ['a', 'b'], 'a')

test
  .collect()
 .unique()
 .view()

Program output

 N E X T F L O W   ~  version 24.04.2

Launching `test.nf` [loving_kare] DSL2 - revision: 4160ee5875

['a', 'b', 'c', 'a', 'b', 'a']

nextflow.log

Environment

pditommaso commented 3 weeks ago

Thanks for opening this issue. This problem is going to be solved by https://github.com/nextflow-io/nextflow/pull/5053.

Note however, the use of unique after collect is useless, because the latter returns a sole value by definition and therefore it's not altered by unique