Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix broken versions.yml file in last/train. #7393

Merged
merged 1 commit into from
Jan 30, 2025

Conversation

charles-plessy
Copy link
Contributor

@charles-plessy charles-plessy commented Jan 30, 2025

Here is the long story:

Escape sequences for newline and tab in a shell tr command were not escaped in the script section of the module, causing them to be expanded in .command.sh.

This did not prevent tr from doing its job, but this caused the lines in the script to be indented, like this:

    cat <<-END_VERSIONS > versions.yml
    "NFCORE_PAIRGENOMEALIGN:PAIRGENOMEALIGN:PAIRALIGN_M2M:ALIGNMENT_TRAIN":
        last: $(lastdb --version | sed 's/lastdb //')
    END_VERSIONS

The indentation broke the herescript, but did not cause the module to fail.

Therefore, the versions.yml file contained one extra line with
END_VERSIONS in it. This crashes the pipelines that collect the
version numbers, but this was not noticed because last/train is always
used with other last/ submodules, and I was not using last/train's
versions file until today, because I was assuming that the information
would always be redundant.

PR checklist

Closes #XXX

  • This comment contains a description of changes (with reason).
  • If you've fixed a bug or added code that should be tested, add tests!
  • If you've added a new tool - have you followed the module conventions in the contribution docs
  • If necessary, include test data in your PR.
  • Remove all TODO statements.
  • Emit the versions.yml file.
  • Follow the naming conventions.
  • Follow the parameters requirements.
  • Follow the input/output options guidelines.
  • Add a resource label
  • Use BioConda and BioContainers if possible to fulfil software requirements.
  • Ensure that the test works with either Docker / Singularity. Conda CI tests can be quite flaky:
    • For modules:
      • nf-core modules test <MODULE> --profile docker
      • nf-core modules test <MODULE> --profile singularity
      • nf-core modules test <MODULE> --profile conda
    • For subworkflows:
      • nf-core subworkflows test <SUBWORKFLOW> --profile docker
      • nf-core subworkflows test <SUBWORKFLOW> --profile singularity
      • nf-core subworkflows test <SUBWORKFLOW> --profile conda

Here is the long story:

Escape sequences for newline and tab in a shell `tr` command were not
escaped in the script section of the module, causing them to be expanded
in `.command.sh`.

This did not prevent `tr` from doing its job, but this caused the lines
in the script to be indented, like this:

```
    cat <<-END_VERSIONS > versions.yml
    "NFCORE_PAIRGENOMEALIGN:PAIRGENOMEALIGN:PAIRALIGN_M2M:ALIGNMENT_TRAIN":
        last: $(lastdb --version | sed 's/lastdb //')
    END_VERSIONS
```

The indentation broke the herescript, but did not cause the module to
fail.

Therefore, the `versions.yml` file contained one extra line with
`    END_VERSIONS` in it.  This crashes the pipelines that collect the
version numbers, but this was not noticed because `last/train` is always
used with other `last/` submodules, and I was not using `last/train`'s
versions file until today, because I was assuming that the information
would always be redundant.
@charles-plessy charles-plessy added this pull request to the merge queue Jan 30, 2025
Merged via the queue into master with commit 29a9928 Jan 30, 2025
18 checks passed
@charles-plessy charles-plessy deleted the fix_last_train_version_yml branch January 30, 2025 09:59
charles-plessy added a commit to oist/LuscombeU_nfcore_pairgenomealign_fork that referenced this pull request Jan 30, 2025
Also pull the fix for the versions channel of last/train
(see <nf-core/modules#7393>)
@marvinkobit
Copy link

"Unescaped Escape Sequences: A Silent Pipeline Failure" 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants