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

Confusing log message "runtime updated" when nothing was changed #265

Open
corneliusroemer opened this issue Mar 15, 2023 · 3 comments
Open
Labels
bug Something isn't working

Comments

@corneliusroemer
Copy link
Member

Current Behavior

The logs for nextstrain update conda report "Runtime updated!" in green, despite no update having happened.

Expected behavior

"Runtime updated!" only shows when an update has happened.

How to reproduce

Steps to reproduce the current behavior:

  1. nextstrain update conda
  2. Run nextstrain update conda again
  3. Observe logs
❯ nextstrain --version      
nextstrain.cli 6.2.0

Running nextstrain under rosetta2 on M1 mac.

image

nextstrain update conda 
Checking for newer versions of Nextstrain CLI…

nextstrain-cli is up to date!

Updating conda runtime…
Updating Conda packages…

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

conda-forge/osx-64                                          Using cache
conda-forge/noarch                                          Using cache
bioconda/osx-64                                             Using cache
bioconda/noarch                                             Using cache
nextstrain/osx-64                                             No change
nextstrain/noarch                                             No change
Transaction

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

  All requested packages already installed


Transaction starting
Transaction finished

Runtime updated!
@tsibley
Copy link
Member

tsibley commented Mar 15, 2023

On one hand, I get this. On the other, it was updated in the sense that the update command successfully executed what was needed for an update, it just happens there was nothing to do.

When an update is requested but there's nothing to do, what would you expect/suggest the messaging to be here?

We can have update check (in most cases) if the runtime version changed or not and report something else when it hasn't.

@tsibley tsibley moved this from New to Backlog in Nextstrain planning (archived) Mar 15, 2023
@corneliusroemer
Copy link
Member Author

Maybe something like:

Currently installed version: X
Latest version: X
You are already up to date, nothing to be done

vs.

Currently installed version: X
Latest version: Y
Installing latest version
Successfully updated from X -> Y

@corneliusroemer
Copy link
Member Author

Some background to how I got the idea for this issue: I had noticed that conda didn't updated as reported in #264, but this was actually not so obvious since the cli output didn't actually state the version of the package I had before and after update.

A bit more explicit output as to which version I had before and after would have made it easier to be sure that #264 was indeed buggy behaviour.

We might also want to get rid of the micromamba banner and maybe also the channel downloads. The banner is just noise and the channel downloads just add multiple progress bars.

You can disable the banner with --no-banner or conda env config vars set MAMBA_NO_BANNER=1, see mamba-org/mamba#984

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
No open projects
Status: Backlog
Development

No branches or pull requests

2 participants