reanahub / reana-workflow-engine-snakemake

REANA Workflow Engine Snakemake
MIT License
0 stars 22 forks source link

build(docker): upgrade base image to ubuntu 24.04 #99

Closed wirespecter closed 3 months ago

wirespecter commented 3 months ago

Closes https://github.com/reanahub/reana/issues/808 Old PR: https://github.com/reanahub/reana-workflow-engine-snakemake/pull/98

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 3.66%. Comparing base (2dd079e) to head (6aae67f).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/reanahub/reana-workflow-engine-snakemake/pull/99/graphs/tree.svg?width=650&height=150&src=pr&token=T60GN05T4Q&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=reanahub)](https://app.codecov.io/gh/reanahub/reana-workflow-engine-snakemake/pull/99?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=reanahub) ```diff @@ Coverage Diff @@ ## master #99 +/- ## ========================================= - Coverage 3.78% 3.66% -0.12% ========================================= Files 6 6 Lines 185 191 +6 ========================================= Hits 7 7 - Misses 178 184 +6 ``` [see 2 files with indirect coverage changes](https://app.codecov.io/gh/reanahub/reana-workflow-engine-snakemake/pull/99/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=reanahub)
mdonadoni commented 3 months ago

It seems like we have some issues after the upgrade.

In particular, this workflow fails:

Snakefile

def get_all_inputs(wildcards):
    import os
    files = os.listdir("inputs")
    full_files = [f"inputs/{file}" for file in files]
    return full_files

rule all:
    input:
        "results/merged.txt"

rule merge:
    input:
        get_all_inputs
    output:
        "results/merged.txt"
    container:
        "docker://docker.io/library/ubuntu:20.04"
    shell:
        "mkdir results && echo done > {output}"

reana.yaml

inputs:
  directories:
    - inputs
  files:
    - Snakefile
workflow:
  type: snakemake
  file: Snakefile

File structure (input files are empty)

$ tree
.
├── inputs
│   ├── a.txt
│   ├── b.txt
│   └── c.txt
├── reana.yaml
└── Snakefile

2 directories, 5 files

Error reported by REANA

2024-07-25 15:32:02,164 | snakemake.logging | MainThread | CRITICAL | File path ' inputs/ a.txt ' ends with whitespace. This is likely unintended. It can also lead to inconsistent results of the file-matching approach used by Snakemake.
2024-07-25 15:32:02,168 | snakemake.logging | MainThread | ERROR | MissingInputException in rule merge in file /var/reana/users/00000000-0000-0000-0000-000000000000/workflows/fbd5cc04-f1be-4078-b1db-4b55809d3b0b/Snakefile, line 11:
Missing input files for rule merge:
    output: results/merged.txt
    affected files:
         inputs/ a.txt 
         inputs/ c.txt 
         inputs/ b.txt 

For some reason, the files have whitespaces in their filename, we can have a look together

Edit: see also https://github.com/snakemake/snakemake/issues/2480