NBISweden / pipelines-nextflow

A set of workflows written in Nextflow for Genome Annotation.
GNU General Public License v3.0
42 stars 18 forks source link

CI testing: `.command.trace` file unable to be written from dockerised busco process #44

Closed mahesh-panchal closed 4 years ago

mahesh-panchal commented 4 years ago

https://github.com/NBISweden/pipelines-nextflow/runs/803540128?check_suite_focus=true

Specifically AnnotationPreprocessing pipeline, cannot write .command.trace file to the folder, /home/runner/work/pipelines-nextflow/pipelines-nextflow/work/25/26370cbc11c092fb40b0be38c8a9dd.

The .command.trace is attempted to be written by the nxf_trace() from the .command.run script. This implies that the directory has the correct write permissions as the .command.run script has already been written there.

The only difference I can think of at the moment, is that .command.run is written by the nextflow process runner (outside the docker environment), while the .command.trace is written from within the docker environment (which I'm reasonably sure has the same user and group as the nextflow process runner).

mahesh-panchal commented 4 years ago

Specifically for that image, the default user is biodocker. https://hub.docker.com/layers/ezlabgva/busco/v4.0.6_cv1/images/sha256-2c98633fa4aafd55be1ef91ebed08d033b1e0254c8571293ef535633fdf2950b?context=explore

On MacOS the user seems to be changed back to current user from the docker user.

Adding runOptions='-u "$( id -u ):$( id -g )"' to the docker scope fixes the user.

Fixed by 6034a78f97a04d72554ba3473d396d5fe12c7001