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

Sporadic failures using mamba-version: "*" #274

Open
victorlin opened this issue Jan 12, 2023 · 13 comments
Open

Sporadic failures using mamba-version: "*" #274

victorlin opened this issue Jan 12, 2023 · 13 comments

Comments

@victorlin
Copy link

victorlin commented Jan 12, 2023

(originally from nextstrain/augur#1125)

Description

I'm aware that using mamba-version is an experimental feature, and some instability can be expected.

However, I've noticed that it's been failing more often than usual on at least two repos managed by my team @nextstrain.

The error is not very useful:

##[error]The process '/usr/share/miniconda/condabin/conda' failed with exit code 1

I've compared a failing run with a successful re-run of the same workflow. There are some notable differences in the output of conda config --show:

75d74
< allowlist_channels: []
110c109
< default_python: 3.10
---
> default_python: 3.9
123a123
> experimental_solver: classic
125d124
< fetch_threads: 5
137d135
< number_channel_notices: 5
165d162
< solver: classic
181a179
> whitelist_channels: []
197c195
< no change     /usr/share/miniconda/lib/python3.10/site-packages/xontrib/conda.xsh
---
> no change     /usr/share/miniconda/lib/python3.9/site-packages/xontrib/conda.xsh

I do not understand why there are differences in Python versions and other conda config between two runs of the same workflow.

Known Workarounds

1. Use Mambaforge

  1. Remove mamba-version.
  2. Add miniforge-variant: Mambaforge (and optionally miniforge-version).

Example: nextstrain/cli@4a76497

2. Use the new libmamba solver

Note that this workaround can introduce a separate issue when used on windows-2022: conda/conda#12161.

  1. Remove mamba-version.

  2. Run this after the setup-miniconda step:

    - run: |
        conda install -n base conda-libmamba-solver
        conda config --set solver libmamba
  3. Replace mamba install with conda install.

Example: nextstrain/augur@344ed51

@joamatab
Copy link

AroneyS added a commit to AroneyS/binchicken that referenced this issue Jan 13, 2023
@joshuailevy
Copy link

Also observing this. https://github.com/andersen-lab/Freyja/actions/runs/3907050506. Thanks @victorlin for posting the workaround.

@jongyoul
Copy link

maresb added a commit to pymc-devs/pytensor that referenced this issue Jan 13, 2023
This is in hopes of resolving sporadic errors.
Ref: <conda-incubator/setup-miniconda#274>
pontushojer added a commit to AfshinLab/BLR that referenced this issue Jan 13, 2023
ricardoV94 pushed a commit to pymc-devs/pytensor that referenced this issue Jan 13, 2023
* Adjust setup-miniconda parameters

This is in hopes of resolving sporadic errors.
Ref: <conda-incubator/setup-miniconda#274>

* Adjust setup-miniconda for benchmarks

* Remove matrix entry in benchmarks
@victorlin
Copy link
Author

@traversaro thanks, I've updated the list of workarounds in the issue description and put that one first since it is the more popular one.

@victorlin
Copy link
Author

victorlin commented Jan 13, 2023

If you are not interested in using defaults, a possible strategy is to use mambaforge instead of miniconda

Note that defaults is included in the generated .condarc regardless of miniforge-variant. To truly get away from it, you'll have to use nodefaults, --override-channels, or conda config --remove channels defaults. See #207 for more info.

@kthyng
Copy link

kthyng commented Jan 13, 2023

I have been having the following error with ubuntu-latest:

PackagesNotFoundError: The following packages are missing from the target environment:
    - defaults/linux-64::conda==22.11.1=py310h06a4308_4[md5=07e2e8a698cf1e7f580b9efcae72184e]

with this in my test.yaml

      - uses: conda-incubator/setup-miniconda@v2
        with:
          mamba-version: "*" # activate this to build with mamba.
          channels: conda-forge, defaults # These need to be specified to use mamba
          channel-priority: true
          environment-file: ci/environment-py${{ matrix.python-version }}.yml

          activate-environment: test_env_cmocean
          use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!

(example PR with errors earlier: matplotlib/cmocean#88)

and workaround 1 above worked for me!

pwwang added a commit to pwwang/biopipen that referenced this issue Jan 14, 2023
pwwang added a commit to pwwang/biopipen that referenced this issue Jan 14, 2023
* 🎨 [scripts.utils.vcf] Use format keys for samples

* ✨ [vcf.VcfFix] Dedent envs.helpers automatically and allow it to be list of strings

* 🧑‍💻 [tcr.CloneResidency] Add count table and allow grouping samples in the report

* 🧑‍💻 [cnvkit.CNVkitCall] Allow not passing threshold

* 🧑‍💻 [cnvkit.CNVkitCall] Allow setting cutoff to fetch significant genes for enrichment analysis

* 🧑‍💻 [scrna.SeuratPreparing/SeuratClustering] Do QC in SeuratPreparing only and prepare clustering in SeuratClustering

* ✨ [cnvkit_pipeline] Allow customization of colnames in metafile

* 💚 Fix CI (conda-incubator/setup-miniconda#274)

* 🔖 0.6.2
@rosepearson
Copy link

This is affecting me too on https://github.com/rosepearson/GeoFabrics/actions/runs/3925803401/jobs/6710960393. I'll look at work around 1 thanks,

rosepearson added a commit to rosepearson/GeoFabrics that referenced this issue Jan 15, 2023
Documented work around in conda-incubator/setup-miniconda#274 in response to transient errors
rosepearson added a commit to rosepearson/GeoFabrics that referenced this issue Jan 16, 2023
* Update pyproject.toml - Update version
* Update GH actions test to try fix broken install by use Mambaforge 
    * Documented work around in conda-incubator/setup-miniconda#274 in response to transient errors
* Update PR template
* Updated tests after OSM edits
kthyng added a commit to kthyng/ocean-model-skill-assessor that referenced this issue Jan 16, 2023
ianmkenney added a commit to ianmkenney/cookiecutter-mdakit that referenced this issue Jan 16, 2023
- Per the workaround in "conda-incubator/setup-miniconda#274 (comment)"
- Set to use mamba over conda
lczech added a commit to moiexpositoalonsolab/grenepipe that referenced this issue Jan 28, 2023
lczech added a commit to moiexpositoalonsolab/grenepipe that referenced this issue Jan 28, 2023
lczech added a commit to moiexpositoalonsolab/grenepipe that referenced this issue Jan 28, 2023
lczech added a commit to moiexpositoalonsolab/grenepipe that referenced this issue Jan 28, 2023
@padix-key
Copy link

I created a minimum working example for this issue using different OS and Python versions: https://github.com/padix-key/gha-mamba

In this setup this issue only affects Ubuntu builds: https://github.com/padix-key/gha-mamba/actions/runs/4044454081

@goanpeca
Copy link
Member

Hi @padix-key thanks for the example!

olemke added a commit to atmtools/pyarts-conda that referenced this issue Feb 1, 2023
olemke added a commit to atmtools/pyarts-conda that referenced this issue Feb 1, 2023
djgagne added a commit to ai2es/ptype-physical that referenced this issue Feb 6, 2023
observingClouds added a commit to observingClouds/xbitinfo that referenced this issue Feb 14, 2023
observingClouds added a commit to observingClouds/xbitinfo that referenced this issue Feb 14, 2023
pdiakumis added a commit to umccr/dracarys that referenced this issue Feb 15, 2023
wcarthur added a commit to GeoscienceAustralia/hazimp that referenced this issue Jul 25, 2023
wcarthur added a commit to GeoscienceAustralia/hazimp that referenced this issue Jul 25, 2023
* AH-1801 Change key dtypes to match
* AH-1801 update workflow file - Trying fixes from conda-incubator/setup-miniconda#274
* AH-1801 fix pylint errors
wcarthur added a commit to GeoscienceAustralia/hazimp that referenced this issue Jul 26, 2023
* AH-1801 Change key dtypes to match
* AH-1801 update workflow file - Trying fixes from conda-incubator/setup-miniconda#274
* AH-1801 fix pylint errors
bsaavedrabo pushed a commit to ai2es/ptype-physical that referenced this issue Aug 4, 2023
Zeitsperre added a commit to Ouranosinc/raven that referenced this issue Aug 17, 2023
Changes:

* Used a workaround to fix a CI action

## Related Issue / Discussion

conda-incubator/setup-miniconda#274
AstrobioMike added a commit to AstrobioMike/GToTree that referenced this issue Oct 14, 2023
- having errors with mamba in macos test, trying workaround as noted here: conda-incubator/setup-miniconda#274 (comment)
AstrobioMike added a commit to AstrobioMike/GToTree that referenced this issue Oct 14, 2023
- having errors with mamba in macos test, trying workaround as noted here: conda-incubator/setup-miniconda#274 (comment)
lczech added a commit to moiexpositoalonsolab/grenepipe that referenced this issue Mar 27, 2024
@padix-key
Copy link

In an updated version of https://github.com/padix-key/gha-mamba (updated setup-miniconda and platform version), this issue did not appear anymore. Can this issue be closed?

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

No branches or pull requests