-
Notifications
You must be signed in to change notification settings - Fork 212
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
[proposal] Improve version and distribution management of the CLI #2589
Comments
Thanks for the detailed information here. Let's start by acknowledging a couple of hypothesis:
Most packaging and distribution mechanisms only offer the ability to install one version of the same major at a time:
A couple of of packaging and distribution mechanisms offer this ability With all that context in mind, one of the challenges for us (Microsoft) is that we don't want to stretch ourselves too fin with "distributions", so we have to be careful with what we commit to as a first party team. Back to asdf, there are probably two models which could work here: community maintained "package" or a Microsoft maintained package. I'll need to bring this back to my team. The fact that asdf doesn't support windows would be a major contention point for us in terms of prioritization. Additionally, I'd like to make sure we have a clear understanding of the different ecosystems before we make any commitments. Are there any other packaging and distribution mechanisms that I might have forgotten about at this point? |
Thanks for the answer @baywet !
I'm not 100% sold on this point as it greatly depends on the maturity of the specific language and it greatly impacts the stability of the produced output when you are, i.e. shipping it as a library. This goes hand in hand with:
I strongly agree with this.
This is an option I am still considering, especially given the fact that
this will look very much like this approach.
True, but container images are usually a pretty hard requirement, especially in CI/CD pipelines, and because of the overhead.
Just a few notable mentions for completeness: Let me also add a note on JReleaser which makes it easy to release for various distribution mechanisms. The tool is great and used in various projects (even outside java land) and the author is usually eager to help upstream projects adopt it. On the subject in general, I don't have a super strong opinion and I'm happy to second whatever guidance comes from you on this aspect to be able to ditch those scripts I'm using around 🙂 . Regarding |
Thanks for the additional information.
That's an interesting take on the problem. We took a different stance on this one "if the version is not the same, it most likely means the user wants to update their client". And kiota just upgrades the client (dependencies still need to be updated). Updating (or installing) another version in place is a tricky endeavor because we'd effectively need to "understand" how kiota was installed at the first place to avoid messing up the environment. It also supposes our CLI structure will stay the same across versions which is a bigger commitment than we can make at this time.
Is there any specific reason why you're still on 0.11.1 which is a rather "old" version at this point?
We want the community around kiota to thrive and try to support it the best we can, whether that means integrating "new features" in the main code base or supporting projects federated around it. Blocking any initiative is not at all our intent aside from malicious/unethical activities or things that'd drastically change the vision of the project itself. As a side note, on the first party distributions mechanisms, we're also trying to keep the distribution for kiota, hidi and the microsoft graph CLI aligned as they are fundamentally "CLIs" and this decreases our engineering efforts. |
Thanks for the additional context!
I just want to rise the flag that this approach is highly subject to causing accidental breaking changes, and makes reproducible builds a bit more tricky for the users.
I don't think this is a tricky endeavor as there are a few "well-known" approach to it (i.e. using a
As of today we only need the
just an old gist 🙂 , in most cases I'm on Re.
Do you have a short list of additional requirements for those applications? As I'm not really familiar with them ... |
Right but we don't control all those. dotnet tool installs under
Additional requirements in what sense? They are all built with dotnet. And distributed as: GitHub release assets, dotnet tools, docker images like kiota today. Kiota is the only one with a vs code extension, and we don't foresee shipping the other two as an extension anytime soon. |
Don't wanna be pedantic here but the "global" installation of
Do they need any OS dependency? Additional files to be around on the FS, env vars etc. etc. |
Sure we could decide that, that then means that if people uninstall kiota through their distribution mechanism, they might be left with a backlog of versions at that place because "we won't know it got uninstalled". We could augment some of those uninstalls with post cleanup scripts, but not all of those distribution mechanisms support it. Probably a tradeoff we can live with though. The requirements are pretty much the same as kiota itself, they are built the same way. There is a configuration file that might need a source generator like you did for kiota. The CLI also has a token cache, but that's already under the home directory. |
👋 from JReleaser. Happy to help with any questions you may have regarding the tool should you decide to consider it. |
@darrelmiller will come and comment with the outcome of our discussion. In the meantime I thought I'd let you know we logged that #2598 |
Polite ping on this @darrelmiller 🙏 |
Quick update, I moved the |
Thanks for the continuous work on this. It might be worth also putting a quick PR together to add an entry to the changelog for the upcoming release. |
@baywet thanks a lot for your continuous help and support.
Or, do you have another issue(maybe internal) for tracking progress on this? |
Thanks for your patience on the matter. For linux, asdf is a great way forward, and we're going to pause packaging efforts for the time being (snap/deb/rpm) to see what requests we get from the community. For MacOS, same rationale applies so we're not going to invest in brew right now. This is why we don't have any outstanding issue, we'd like the community to voice their demands. I hope that makes sense, let us know if we missed something. |
The ASDF integration is, by far, sub-optimal.
I think that having a standard and supported distribution mechanism(per platform) would greatly improve the getting started experience and increase the number of users of Kiota. |
And I'm guessing that most of your context is linux based? |
Linux and Macs around ... yes |
from your perspective, do you have a lot of usage of homebrew on linux? |
No, ppl are using yum, dnf and apt on Linux from my personal experience |
Microsoft hosts this package feed that supports multiple formats (deb/rpm), package managers and distributions. And I've found the onboarding documentation (you won't be able to access that). The security requirements are similar to other publishing workflows. We'd need to ramp up on how to make deb/rpm packages, decide which distributions we want to support etc... It's still a significant undertaking on that side. But it should be simpler than trying to publish to each distribution's official feed (archive.ubuntu.com, etc...) Couple of questions for you:
|
Answering from the camping, so I might be less accurate...
Rarely in my experience, and is a little awkward having to add a new feed.
I have never seen a non-dotnet developer installing tools through the dotnet cli/framework. |
Hey all 👋 !
I think we touched on this point earlier, the root problem here is that we would like to have a configurable version of the
kiota
CLI depending on the project we are working on and not rely only on a global installation.I have noticed that most of the issues reported by colleagues have been caused by the incorrect version of
kiota
installed/used 😢As a first step to improve the situation I want to propose leveraging asdf already used by other big projects like Crystal.
Here I prototyped a basic and initial version of an
asdf plugin
for Kiota: https://github.com/andreaTP/asdf-kiota (tested only on linux and mac).In a nutshell, the workflow would be something like this:
asdf-kiota
plugin:asdf plugin add kiota https://github.com/andreaTP/asdf-kiota.git
asdf install kiota latest
asdf global kiota latest
.tool-versions
with a content similar to e.g.asdf 1.1.2
(or usingasdf local ...
)asdf shell kiota 1.1.2
Now the questions 🙂 :
zip
structure?Let me know your thoughts!
The text was updated successfully, but these errors were encountered: