jdx / mise-action

MIT License
56 stars 6 forks source link

Cache hash created based on file hash installs old versions #119

Open BeneHa opened 2 months ago

BeneHa commented 2 months ago

Hi, we are using the mise action with mise.toml files that mostly contains only tools with their prefixes, like

terragrunt = "prefix:0"

Now it can happen that a new patch version of one tool is released but no changes to the .mise.toml file are necessary. The action installs the version of the cache based on the file hash but when I want to use the tool I get the error that the latest version, specified implicitly by the prefix notation, is not found

Output:  mise No version is set for shim: terragrunt
Set a global default version with one of the following:
mise use -g terragrunt@0.67.3

Here, 0.67.3 is in the cache, but 0.67.4 was released. I tried upgrading using

  mise up
  mise install

  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    MISE_LOG_LEVEL: info
    MISE_TRUSTED_CONFIG_PATHS: /home/runner/_work/azr-projects-compositions/azr-projects-compositions
    MISE_YES: 1

mise All tools are up to date
mise all runtimes are installed

But that also does not upgrade to the latest version for some reason.

In my understanding it would be necessary to create the hash based on the tool versions actually used, not the file specifying them.

Any input on this is appreciated :) BeneHa

vanyauhalin commented 1 day ago

@BeneHa, hi. Could you please tell how you solved this?

BeneHa commented 23 hours ago

@BeneHa, hi. Could you please tell how you solved this?

We did not really solve it, we just delete the cache whenever this happens...

vanyauhalin commented 22 hours ago

@BeneHa, hi. Could you please tell how you solved this?

We did not really solve it, we just delete the cache whenever this happens...

I work in Gitea and use GitHub as a mirror. Unfortunately, Gitea does not have a button or even an API to clear the cache as GitHub does. So sad. :(