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

nextstrain update conda fails silently #300

Closed
joverlee521 opened this issue Jul 25, 2023 · 4 comments · Fixed by #301
Closed

nextstrain update conda fails silently #300

joverlee521 opened this issue Jul 25, 2023 · 4 comments · Fixed by #301
Assignees
Labels
bug Something isn't working

Comments

@joverlee521
Copy link
Contributor

Running the standalone version of 7.1.0 I get:

$ nextstrain update conda
Checking for newer versions of Nextstrain CLI…

nextstrain-cli is up to date!

Updating conda runtime…
Updating Conda package nextstrain-base from 20230615T171309Z to 20230717T174555Z…

Updating Conda packages in /Users/jlee2346/.nextstrain/runtimes/conda/env…
  - nextstrain-base ==20230717T174555Z

                                           __
          __  ______ ___  ____ _____ ___  / /_  ____ _
         / / / / __ `__ \/ __ `/ __ `__ \/ __ \/ __ `/
        / /_/ / / / / / / /_/ / / / / / / /_/ / /_/ /
       / .___/_/ /_/ /_/\__,_/_/ /_/ /_/_.___/\__,_/
      /_/

nextstrain/noarch                                  130.0 B @ 414.0 B/s  0.3s
nextstrain/osx-64                                   30.2kB @  72.7kB/s  0.4s
bioconda/osx-64                                      4.2MB @   3.9MB/s  1.2s
bioconda/noarch                                      4.6MB @   3.3MB/s  1.3s
conda-forge/noarch                                  13.4MB @   4.3MB/s  3.7s
conda-forge/osx-64                                  29.8MB @   4.1MB/s  8.6s
Transaction

  Prefix: /Users/jlee2346/.nextstrain/runtimes/conda/env

  All requested packages already installed


Transaction starting
Transaction finished
Cleaning up…

                                           __
          __  ______ ___  ____ _____ ___  / /_  ____ _
         / / / / __ `__ \/ __ `/ __ `__ \/ __ \/ __ `/
        / /_/ / / / / / / /_/ / / / / / / /_/ / /_/ /
       / .___/_/ /_/ /_/\__,_/_/ /_/ /_/_.___/\__,_/
      /_/

Collect information..
Cleaning index cache..
Cleaning lock files..
Cleaning tarballs..
Cleaning packages..

Runtime updated!

Then when i check the version output again, it's still using the old nextstrain-base:

$ nextstrain version --verbose
nextstrain.cli 7.1.0

Python
  /Users/jlee2346/.nextstrain/cli-standalone/nextstrain
  3.10.9 (main, Dec 21 2022, 05:06:54) [Clang 14.0.3 ]

Runners
  docker (default)
    nextstrain/base:latest (18b46ee75a34, 2023-07-19 18:20:45 -0700 PDT)
    augur 22.1.0
    auspice v2.46.1
    fauna 59dfaec
    sacra not present

  conda 
    nextstrain-base 20230615T171309Z (h0dc7051_0_locked, nextstrain/label/main)
    augur 22.0.3
    auspice 2.46.0

  singularity 
    docker://nextstrain/base (not present)

  ambient 
    auspice 2.46.0

  aws-batch 
    unknown
@joverlee521 joverlee521 added the bug Something isn't working label Jul 25, 2023
@joverlee521
Copy link
Contributor Author

This also fails to update when I try to install specific versions with the NEXTSTRAIN_* envvars:

$ NEXTSTRAIN_CONDA_CHANNEL=nextstrain/label/main \
NEXTSTRAIN_CONDA_BASE_PACKAGE="nextstrain-base ==20230628T211222Z" \
  nextstrain update conda
Checking for newer versions of Nextstrain CLI…

nextstrain-cli is up to date!

Updating conda runtime…
Updating nextstrain-base from 20230615T171309Z to ==20230628T211222Z…

Updating Conda packages in /Users/jlee2346/.nextstrain/runtimes/conda/env…
  - nextstrain-base ==20230628T211222Z

                                           __
          __  ______ ___  ____ _____ ___  / /_  ____ _
         / / / / __ `__ \/ __ `/ __ `__ \/ __ \/ __ `/
        / /_/ / / / / / / /_/ / / / / / / /_/ / /_/ /
       / .___/_/ /_/ /_/\__,_/_/ /_/ /_/_.___/\__,_/
      /_/

nextstrain/label/main/noarch                       130.0 B @ 231.0 B/s  0.6s
nextstrain/label/main/osx-64                        30.2kB @  34.1kB/s  0.9s
bioconda/osx-64                                      4.2MB @   1.5MB/s  3.1s
bioconda/noarch                                      4.6MB @   1.1MB/s  4.0s
conda-forge/noarch                                  13.4MB @   1.7MB/s  8.8s
conda-forge/osx-64                                  29.8MB @   2.7MB/s 13.0s
Transaction

  Prefix: /Users/jlee2346/.nextstrain/runtimes/conda/env

  All requested packages already installed


Transaction starting
Transaction finished
Cleaning up…

                                           __
          __  ______ ___  ____ _____ ___  / /_  ____ _
         / / / / __ `__ \/ __ `/ __ `__ \/ __ \/ __ `/
        / /_/ / / / / / / /_/ / / / / / / /_/ / /_/ /
       / .___/_/ /_/ /_/\__,_/_/ /_/ /_/_.___/\__,_/
      /_/

Collect information..
Cleaning index cache..
Cleaning lock files..
Cleaning tarballs..
Cleaning packages..

Runtime updated!

@joverlee521
Copy link
Contributor Author

Running the forced setup with NEXTSTRAIN_* envvars produces an actual error:

$ NEXTSTRAIN_CONDA_CHANNEL=nextstrain/label/main \
NEXTSTRAIN_CONDA_BASE_PACKAGE="nextstrain-base ==20230628T211222Z" \
  nextstrain setup --force conda
Setting up conda…
Removing existing directory /Users/jlee2346/.nextstrain/runtimes/conda/micromamba to start fresh…
Requesting Micromamba from https://api.anaconda.org/download/conda-forge/micromamba/1.0.0/osx-64/micromamba-1.0.0-1.tar.bz2…
Downloading and extracting Micromamba to /Users/jlee2346/.nextstrain/runtimes/conda/micromamba…
Removing existing directory /Users/jlee2346/.nextstrain/runtimes/conda/env to start fresh…
Installing Conda packages into /Users/jlee2346/.nextstrain/runtimes/conda/env…
  - nextstrain-base ==20230628T211222Z

                                           __
          __  ______ ___  ____ _____ ___  / /_  ____ _
         / / / / __ `__ \/ __ `/ __ `__ \/ __ \/ __ `/
        / /_/ / / / / / / /_/ / / / / / / /_/ / /_/ /
       / .___/_/ /_/ /_/\__,_/_/ /_/ /_/_.___/\__,_/
      /_/

nextstrain/label/main/osx-64                        30.2kB @  79.6kB/s  0.4s
nextstrain/label/main/noarch                       135.0 B @ 278.0 B/s  0.5s
bioconda/osx-64                                      4.2MB @   2.1MB/s  2.2s
bioconda/noarch                                      4.6MB @   1.5MB/s  3.1s
conda-forge/noarch                                  13.4MB @   2.4MB/s  6.3s
conda-forge/osx-64                                  29.8MB @   3.0MB/s 11.6s
Encountered problems while solving:
  - package nextstrain-base-20230628T211222Z-h0dc7051_0_locked requires git ==2.41.0 pl5321h5c607e1_0, but none of the providers can be installed

The environment can't be solved, aborting the operation
error    libmamba Could not solve for environment specs
critical libmamba UnsatisfiableError
Error running ('/Users/jlee2346/.nextstrain/runtimes/conda/micromamba/bin/micromamba', '--root-prefix', '/Users/jlee2346/.nextstrain/runtimes/conda/micromamba', '--no-rc', '--no-env', '--yes', 'create', 'nextstrain-base ==20230628T211222Z', '--prefix', '/Users/jlee2346/.nextstrain/runtimes/conda/env', '--override-channels', '--strict-channel-priority', '--channel', 'nextstrain/label/main', '--channel', 'conda-forge', '--channel', 'bioconda', '--no-py-pin', '--allow-uninstall', '--allow-downgrade')
Traceback (most recent call last):
  File "nextstrain.cli.runner.conda", line 347, in micromamba
    subprocess.run(argv, env = env, check = True)
  File "subprocess", line 526, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '('/Users/jlee2346/.nextstrain/runtimes/conda/micromamba/bin/micromamba', '--root-prefix', '/Users/jlee2346/.nextstrain/runtimes/conda/micromamba', '--no-rc', '--no-env', '--yes', 'create', 'nextstrain-base ==20230628T211222Z', '--prefix', '/Users/jlee2346/.nextstrain/runtimes/conda/env', '--override-channels', '--strict-channel-priority', '--channel', 'nextstrain/label/main', '--channel', 'conda-forge', '--channel', 'bioconda', '--no-py-pin', '--allow-uninstall', '--allow-downgrade')' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "nextstrain.cli.runner.conda", line 233, in setup_prefix
    micromamba("create", *packages)
  File "nextstrain.cli.runner.conda", line 349, in micromamba
    raise InternalError(f"Error running {argv!r}") from err
nextstrain.cli.errors.InternalError: Error running ('/Users/jlee2346/.nextstrain/runtimes/conda/micromamba/bin/micromamba', '--root-prefix', '/Users/jlee2346/.nextstrain/runtimes/conda/micromamba', '--no-rc', '--no-env', '--yes', 'create', 'nextstrain-base ==20230628T211222Z', '--prefix', '/Users/jlee2346/.nextstrain/runtimes/conda/env', '--override-channels', '--strict-channel-priority', '--channel', 'nextstrain/label/main', '--channel', 'conda-forge', '--channel', 'bioconda', '--no-py-pin', '--allow-uninstall', '--allow-downgrade')

Set up failed!

@joverlee521
Copy link
Contributor Author

Tracked the underlying issue in nextstrain/conda-base#38, but there should still be better messages from the CLI if the runtime was not actually updated.

@joverlee521
Copy link
Contributor Author

Ah, this could be as simple as updating the version of micromamba we are using for our conda runtime.

I overrode the default version with NEXTSTRAIN_CONDA_MICROMAMBA_VERSION=1.1.0 nextstrain setup conda --force and now it produces the expected error:

$ nextstrain update conda
Checking for newer versions of Nextstrain CLI…

nextstrain-cli is up to date!

Updating conda runtime…
Updating Conda package nextstrain-base from 20230615T171309Z to 20230717T174555Z…

Updating Conda packages in /Users/jlee2346/.nextstrain/runtimes/conda/env…
  - nextstrain-base ==20230717T174555Z

                                           __
          __  ______ ___  ____ _____ ___  / /_  ____ _
         / / / / __ `__ \/ __ `/ __ `__ \/ __ \/ __ `/
        / /_/ / / / / / / /_/ / / / / / / /_/ / /_/ /
       / .___/_/ /_/ /_/\__,_/_/ /_/ /_/_.___/\__,_/
      /_/

conda-forge/osx-64                                          Using cache
conda-forge/noarch                                          Using cache
bioconda/osx-64                                             Using cache
bioconda/noarch                                             Using cache
nextstrain/noarch                                             No change
nextstrain/osx-64                                             No change
error    libmamba Could not solve for environment specs
    Encountered problems while solving:
      - package nextstrain-base-20230717T174555Z-h0dc7051_0_locked requires nodejs ==18.16.1 h46e3395_0, but none of the providers can be installed
    
    The environment can't be solved, aborting the operation
    
critical libmamba Could not solve for environment specs
Error running ('/Users/jlee2346/.nextstrain/runtimes/conda/micromamba/bin/micromamba', '--root-prefix', '/Users/jlee2346/.nextstrain/runtimes/conda/micromamba', '--no-rc', '--no-env', '--yes', 'update', 'nextstrain-base ==20230717T174555Z', '--prefix', '/Users/jlee2346/.nextstrain/runtimes/conda/env', '--override-channels', '--channel', 'nextstrain', '--channel', 'conda-forge', '--channel', 'bioconda', '--no-py-pin')
Traceback (most recent call last):
  File "/Users/jlee2346/Repos/nextstrain/cli/nextstrain/cli/runner/conda.py", line 347, in micromamba
    subprocess.run(argv, env = env, check = True)
  File "/Users/jlee2346/.pyenv/versions/3.6.5/lib/python3.6/subprocess.py", line 418, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '('/Users/jlee2346/.nextstrain/runtimes/conda/micromamba/bin/micromamba', '--root-prefix', '/Users/jlee2346/.nextstrain/runtimes/conda/micromamba', '--no-rc', '--no-env', '--yes', 'update', 'nextstrain-base ==20230717T174555Z', '--prefix', '/Users/jlee2346/.nextstrain/runtimes/conda/env', '--override-channels', '--channel', 'nextstrain', '--channel', 'conda-forge', '--channel', 'bioconda', '--no-py-pin')' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/jlee2346/Repos/nextstrain/cli/nextstrain/cli/runner/conda.py", line 486, in update
    micromamba("update", update_spec)
  File "/Users/jlee2346/Repos/nextstrain/cli/nextstrain/cli/runner/conda.py", line 349, in micromamba
    raise InternalError(f"Error running {argv!r}") from err
nextstrain.cli.errors.InternalError: Error running ('/Users/jlee2346/.nextstrain/runtimes/conda/micromamba/bin/micromamba', '--root-prefix', '/Users/jlee2346/.nextstrain/runtimes/conda/micromamba', '--no-rc', '--no-env', '--yes', 'update', 'nextstrain-base ==20230717T174555Z', '--prefix', '/Users/jlee2346/.nextstrain/runtimes/conda/env', '--override-channels', '--channel', 'nextstrain', '--channel', 'conda-forge', '--channel', 'bioconda', '--no-py-pin')

Updating failed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant