actions icon indicating copy to clipboard operation
actions copied to clipboard

Unable to install latests versions of packages

Open cptartur opened this issue 6 months ago • 3 comments

Previously, we successfully used asdf-vm/actions/install to install latest versions of packages, using the following syntax

- uses: asdf-vm/actions/install@05e0d2ed97b598bfce82fd30daf324ae0c4570e6
  with:
    tool_versions: |
      <tool name> latest

However, on v4 version of the action, which uses new asdf it is impossible to do so. It prevents using asdf-vm/actions/install action to install latest versions of packages.

The same problem exists in the asdf itself (having <tool name> latest in .tool-versions fails on asdf install) but it's less impactful there as the "latest" syntax is still working in the command line.

cptartur avatar Jul 02 '25 11:07 cptartur

Just hit this too, the curl somewhere inside the action, or maybe asdf itself does not seem to check for the exit code?

My example is exactly the same to @cptartur's.

The output is something like:

| [command]/usr/bin/curl -sSL -o /tmp/asdf-v0.18.0-linux-arm64.tar.gz https://github.com/asdf-vm/asdf/releases/download/v0.18.0/asdf-v0.18.0-linux-arm64.tar.gz
| [command]/usr/bin/tar -C /root/.asdf/bin -xzf /tmp/asdf-v0.18.0-linux-arm64.tar.gz
| [command]/root/.asdf/bin/asdf plugin list
| No plugins installed
| Installing action-validator plugin...
| [command]/root/.asdf/bin/asdf plugin add action-validator
| [command]/root/.asdf/bin/asdf install
| Downloading [action-validator] from https://github.com/mpalmer/action-validator/releases/download/vlatest/action-validator_linux_arm64 to /tmp/asdf_CExHs03J/action-validator_latest
|   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
|                                  Dload  Upload   Total   Spent    Left  Speed
100     9  100     9    0     0     33      0 --:--:-- --:--:-- --:--:--    33
| Creating bin directory
| Cleaning previous binaries
| Copying binary
[test/test]   ✅  Success - Main asdf-vm/actions/install@v4 [3.127625916s]

I copied the url from my run and tried it via curl with -O:

curl -O action-validator https://github.com/mpalmer/action-validator/releases/download/vlatest/action-validator_linux_arm64
curl: Remote file name has no length!
curl: (23) Failed writing received data to disk/application

I think github supports latest, but it does not work with vlatest in the URL. I think that might be all.

And aside from that, it also would be nice if the action failed when it cannot download anything?

till avatar Aug 01 '25 10:08 till

Using latest in your CI environment defeats the purpose of having a .tool-versions file that specifies and restricts tools to be specific versions for anyone using the repo. Just like you would not use a Docker image for your production builds that is tagged with latest, i.e.

FROM node:latest

because you cannot guarantee what version of NodeJS your server/container is going to be deployed with, you should enforce strict versioning in your .tool-versions to ensure you have parity across all develop local machines and all CI runs of your repo and tools.

eudaimos avatar Nov 21 '25 00:11 eudaimos

Using latest in your CI environment defeats the purpose of having a .tool-versions file that specifies and restricts tools to be specific versions for anyone using the repo. Just like you would not use a Docker image for your production builds that is tagged with latest, i.e.

FROM node:latest

because you cannot guarantee what version of NodeJS your server/container is going to be deployed with, you should enforce strict versioning in your .tool-versions to ensure you have parity across all develop local machines and all CI runs of your repo and tools.

Asdf is also just convenient way of installing tools. We have workflows in which we specifically want to install latest versions of some tools and this change makes that much more difficult.

cptartur avatar Dec 15 '25 09:12 cptartur