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

Breaking change on aqua #3338

Closed
Its-Alex opened this issue Dec 3, 2024 · 13 comments
Closed

Breaking change on aqua #3338

Its-Alex opened this issue Dec 3, 2024 · 13 comments
Labels

Comments

@Its-Alex
Copy link
Contributor

Its-Alex commented Dec 3, 2024

Describe the bug

Since aqua repositories has been added, aqua has been used as default source but some package (as kubectx in my case) does not works with aqua version.

To Reproduce

  1. Execute mise install kubectx@0.9.5 aqua:ahmetb/kubectx
  2. Use kubectx with multiple kubeconfig:
$ kubectx
error: kubeconfig error: failed to load: cannot determine kubeconfig path: multiple files in KUBECONFIG are currently not supported
  1. Install asdf version mise install kubectx@0.9.5 asdf:https://gitlab.com/wt0f/asdf-kubectx
  2. Use kubectx with multiple kubeconfig:
```sh
$ kubectx
xx
...

Expected behavior

Don't you think asdf should be the default source to prevent breaking change?

@Its-Alex Its-Alex added the bug label Dec 3, 2024
@jdx
Copy link
Owner

jdx commented Dec 3, 2024

it works for me. Just use the asdf plugin. If you were using the asdf plugin before mise will continue to use that so it's not a breaking change.

@syhol
Copy link
Contributor

syhol commented Dec 3, 2024

I previously had kubectx installed so it defaults to the asdf plugin backend for me, however I can also recreate the issue when running with mise exec

Code/sandbox/20241203
❯ mise exec asdf:https://gitlab.com/wt0f/asdf-kubectx -- kubectx

Code/sandbox/20241203
❯ mise exec aqua:ahmetb/kubectx -- kubectx
error: kubeconfig error: failed to load: cannot determine kubeconfig path: multiple files in KUBECONFIG are currently not supported

I followed the thread and figgured out why this is happening.

The asdf version downloads the "Source code.tar.gz" and uses the bash script version, while the aqua version downloads the proper go compiled binaries for the correct architecture "kubectx_v0.9.5_darwin_arm64.tar.gz"

Reading their docs:

Stable versions of kubectx and kubens are small bash scripts that you can find in this repository.

Starting with v0.9.0, kubectx and kubens are now rewritten in Go. They should work the same way (and we'll keep the bash-based implementations around) but the new features will be added to the new Go programs. Please help us test this new Go implementation by downloading the binaries from the Releases page →

And searching for the error the in repo shows a result in the go code.

There is an issue in the repo with 46 (now 47 with me) upvotes ahmetb/kubectx#211

@jdx
Copy link
Owner

jdx commented Dec 3, 2024

So it seems we're just now using a newer version of the tool that doesn't have this feature

@syhol
Copy link
Contributor

syhol commented Dec 3, 2024

tldr; Yes.

Before version 0.9.0 https://github.com/ahmetb/kubectx only contained a bash implementation

From version 0.9.0 onwards https://github.com/ahmetb/kubectx contains 2 implementations that are released together and supposed to be compatible:

  • The original bash implementation
    • No longer actively developed
    • Is used by asdf:https://gitlab.com/wt0f/asdf-kubectx for all versions 0.1 - 0.9.5 and onwards
  • The go rewrite implementation
    • Is actively developed
    • Is still missing some features from the bash implementation (like multiple files in KUBECONFIG)
    • Is used by aqua:ahmetb/kubectx for 0.9.0 - 0.9.5 and onwards
      • aqua:ahmetb/kubectx doesn't support <0.9.0

@jdx jdx closed this as not planned Won't fix, can't repro, duplicate, stale Dec 3, 2024
@Its-Alex
Copy link
Contributor Author

Its-Alex commented Dec 4, 2024

@jdx My point here is that mise use aqua as default source and not asdf, not to report error on kubectx that was just an example that can happen. Since asdf is older, that could break some configuration for users. A possible solutions could be to always use asdf as default source provider (and maybe create an option to do otherwise if wanted), that will prevent some errors like this one to happened

I think it's really sad to create breaking change that can't be prevented for the end users for a tool that should always help to get exactly the same CLI.

@Its-Alex
Copy link
Contributor Author

Its-Alex commented Dec 4, 2024

@jdx

it works for me. Just use the asdf plugin. If you were using the asdf plugin before mise will continue to use that so it's not a breaking change.

Some new peoples following our documentation to get all dependencies are getting aqua versions with the bug, at first mise support was only for asdf so no source has to be added in .mise.toml. So, yes, this create a bug for the end users

@jdx
Copy link
Owner

jdx commented Dec 4, 2024

it's not a breaking change—we're using a new version of a tool which I would argue has a bug in it. I'm definitely going to continue migrating things away from asdf. Once #3339 you will be able to lock the backend into the lockfile. Until then, just specify the full names, e.g.: asdf:https://gitlab.com/wt0f/asdf-kubectx for your tools if you don't want the backend to change. You can also disable aqua with MISE_DISABLE_BACKENDS=asdf.

@Its-Alex
Copy link
Contributor Author

Its-Alex commented Dec 4, 2024

@jdx I think I'm missing some context, asdf will be deprecated at one point?

@jdx
Copy link
Owner

jdx commented Dec 4, 2024

that's unlikely, no, but I doubt very many new tools will be added that use it

@Its-Alex
Copy link
Contributor Author

Its-Alex commented Dec 4, 2024

@jdx In that case, why not keep it as the default source?

@jdx
Copy link
Owner

jdx commented Dec 4, 2024

I've explained this in the docs in several places

@Its-Alex
Copy link
Contributor Author

Its-Alex commented Dec 4, 2024

@jdx Sorry, I didn't find it, can you give me a link?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants