+
Skip to content

Conversation

prototaxites
Copy link
Contributor

@prototaxites prototaxites commented Sep 18, 2025

When runnning Conda nf-tests while running CI in my pipeline, I was running into an issue where defaults was being explicitly included as a channel in the conda configuration, leading to warnings and errors in some Conda processes:

    > WARN: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    >     There is a problem with your Conda configuration!
    >     You will need to set-up the conda-forge and bioconda channels correctly.
    >     Please refer to https://bioconda.github.io/
    >     The observed channel order is
    >     [defaults]
    >     but the following channel order is required:
    >     [conda-forge, bioconda]
    > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"

The CI setup showed that the condrc files looked like the following, with no channels set up for the runner user after defaults removal:

  ==> /usr/share/miniconda/.condarc <==
  channels:
    - defaults
 
  ==> /home/runner/.condarc <==
  auto_update_conda: True
  auto_activate: True
  notify_outdated_conda: False
  changeps1: False
  pkgs_dirs:
    - /home/runner/conda_pkgs_dir
  channels: []
  always_yes: True
  solver: libmamba

This PR explicitly sets channels in the conda setup so that we don't get this problem of falling back onto the system condarc file.

There's also an option in the setup-miniconda action to explicitly install miniforge, which shouldn't ever have defaults configured in the first place. Might be an alternative to this approach?

https://github.com/conda-incubator/setup-miniconda?tab=readme-ov-file#example-10-miniforge

See https://nfcore.slack.com/archives/C04QR0T3G3H/p1758020637890609 for discussion

PR checklist

  • This comment contains a description of changes (with reason)
  • CHANGELOG.md is updated
  • If you've fixed a bug or added code that should be tested, add tests!
  • Documentation in docs is updated

@prototaxites prototaxites merged commit 31b79df into nf-core:dev Sep 18, 2025
116 checks passed
@prototaxites prototaxites deleted the conda_ci_fix branch September 18, 2025 10:48
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

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载