snakemake / snakemake-github-action

A Github action for running a Snakemake workflow
MIT License
51 stars 12 forks source link

configure strict priorities by executing conda config --set channel_priority strict #23

Closed seb-mueller closed 2 years ago

seb-mueller commented 2 years ago

Recently, running snakemake-github-action CI started giving me:

Your conda installation is not configured to use strict channel priorities. This is however crucial for having robust and correct >environments (for details, see https://conda-forge.org/docs/user/tipsandtricks.html). Please

The solutions was to change stagin to:

stagein: "conda config --set channel_priority strict"

Full context in .github/workflows/main.yaml:

jobs:
  Test_workflow:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
      with:
        submodules: recursive
    - name: myworkflow
      uses: snakemake/snakemake-github-action@v1.24.0
      with:
        directory: .test
        snakefile: workflow/Snakefile
        stagein: "conda config --set channel_priority strict"
        args: "--use-conda --cores 1 -rp --show-failed-logs all"

I thought to share it in case someone else comes accross the same

gregdenay commented 2 years ago

Shouldn't this behavior be made default now that Snakemake (v7.8.0 onwards) requires strict priority ?

seb-mueller commented 2 years ago

Quite possibly, I'm not too sure about to inner works of and if snakemake-github-action@v1.24.0 updates snakemake automatically (maybe it needs a version bump at some point), but in case it doesn't this might do the trick anyway.