webinstall / webi-installers

Primary and community-submitted packages for webinstall.dev
https://webinstall.dev
Mozilla Public License 2.0
1.88k stars 202 forks source link

[working] possible release cache issue with K9s installer #875

Open kapatz opened 1 month ago

kapatz commented 1 month ago

hello, when I try to install k9s there is this error:

curl -sS https://webi.sh/k9s | sh

Welcome to Webi! - modern tools, instant installs. <<< We expect your experience to be absolutely perfect!

Success? Star it!   https://github.com/webinstall/webi-installers
Problem? Report it: https://github.com/webinstall/webi-installers/issues
                    (your system is GNU/Linux/x86_64 with libc & curl+wget)

Bootstrapping Webi Found ~/.local/bin/webi Running ~/.local/bin/webi k9s@stable

Installing k9s ... Found ~/.local/bin

Error: no 'k9s@stable' release for 'linux' (gnu) on 'x86_64' as one of 'tar,exe,zip,xz,git,dmg'

    Latest Version: v0.32.5
    CPUs:
    OSes:
    libcs:
    Package Formats:
    (check that the package name and version are correct)

  Double check at https://webi.sh/api/releases/k9s@stable.tab
      ?os=linux&arch=x86_64&libc=gnu&formats=tar,exe,zip,xz,git,dmg&pretty=true
KevinGimbel commented 1 month ago

There's been a similar report in k9s https://github.com/derailed/k9s/issues/2832

I can reproduce on Fedora and cannot install neither k9s@stable nor k9s@0.32.5 which is the latest release.

ajwells128 commented 1 month ago

The issue appears to be a mismatch in architecture. In the URL specified by the output, replacing the x86_64 with amd64 (which, in my rudimentary understanding, are synonyms), the query returns plenty of options: https://webi.sh/api/releases/k9s@stable.tab?os=linux&arch=amd64&libc=gnu&formats=tar,exe,zip,xz,git,dmg&pretty=true

coolaj86 commented 1 month ago

I'll look into this as soon as I can today.

Sometimes with a new release the architecture identifier is changed (ex: x86-64 to x86_64), or the arch releases are staggered.

I've accounted for as many of those as I can in automatic fashion, but sometimes there's a glitch in the (literal) matrix.

coolaj86 commented 1 month ago

Is anyone still having this issue? I can't reproduce on uname -srm Linux 5.15.131-2-pve x86_64.

I think that the problem here was a temporary cache issue, possibly due to undesired behavior in k9s own release mechanism.

I'm not sure what a permanent fix for this would be. I think a really good solution would be provide a list of versions for which there is a match to the arch in question.

I had considered previously changing the semantics of latest to "latest for architecture", but there are specificity issues with that, especially on ARM where there are lots of variants, but generally wide compatibility (i.e. armv6 usually runs armv7 because most armv6 are actually armv7 missing just a few, mostly-optional components).

Perhaps it could be "latest of the last 3 releases for architecture".

ajwells128 commented 1 month ago

@coolaj86 mine is now working, seems like it might have been the cache. Thanks for looking into it!

coolaj86 commented 1 month ago

I'll leave this open for a bit to see what others say and if there's a clear path to understanding the root cause and a permanent fix.