kubevirt / kubevirt.github.io

KubeVirt website repo, documentation at https://kubevirt.io/user-guide/
https://kubevirt.io
MIT License
29 stars 109 forks source link

Replacing complicated latest version commands with simple curl #919

Closed cwilkers closed 7 months ago

cwilkers commented 9 months ago

What this PR does / why we need it:

Replace complicated multi-command pipeline to get latest stable version string with an easy curl in our quickstart documentation.

Does this PR fix any issue? _(optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged)_:

Fixes #891

Special notes for your reviewer:

cwilkers commented 7 months ago

Hi @fabiand @dhiller @dankenigsberg @0xFelix @aburdenthehand ,

I just added you as reviewers because I think this is a deceptively important Intro to KubeVirt kind of issue.

Our tooling seems to support a very concise and easy way to determine the latest version of KubeVirt that solves a number of problems, some of which have been raised in recent issues.

I'm hoping to answer one big questions by inviting so many busy (but highly involved) people as reviewer:

  1. Is this a sustainable way to get the stable version? i.e. are we taking advantage of a side-effect that may go away in the future due to changes in the CI processes?

Advantages:

  1. I have seen recent blog posts using this command instead of the convoluted one in our intros, and thought, "Why aren't we presenting this in our labs?"
  2. Older ways involved multi-pipe bash commands in a $() setup that would make a greybeard Un*x admin shed a tear of pride, but may make newer users flee in horror
  3. The new method here avoids alpha and -rcX releases so our demo and 101 content will work on latest stable versions only. #891
  4. Our minikube plugin is currently broken (in a way that sadly this does not fix) but simplifying the curl statement will certainly help. See https://github.com/kubernetes/minikube/issues/15918 for why minikube is broken.

Thank you all for your time!

dankenigsberg commented 7 months ago

Few notes.

0xFelix commented 7 months ago

I agree, we should make this commandline a bit friendlier. :)

And since we are currently using the GitHub API, may I throw in the following?

curl -s https://api.github.com/repos/kubevirt/kubevirt/releases/latest | jq -r '.tag_name'

If we don't want to rely on Prow this looks to be the easiest solution to me.

brianmcarey commented 7 months ago
* I don't know what generates https://storage.googleapis.com/kubevirt-prow/release/kubevirt/kubevirt/stable.txt and if it can be trusted to stay up-to-date forever. @brianmcarey may know.

That stable.txt file is updated as part of the release process so I think it is ok to rely on this. The release will not be created successfully if this file is not updated.

https://github.com/kubevirt/kubevirt/blob/d41b6ddb20837e4445a899be0dc492bde25beb26/automation/release.sh#L91

aburdenthehand commented 7 months ago

/lgtm @0xFelix That is a nice and concise command you've got there :) I like it. One nit (from my writer days) is that jq isn't included by default and could be an additional install for some folks.

From Brian's comment this source seems sufficiently reliable, and the simplicity is attractive.

dhiller commented 7 months ago

What @brianmcarey said.

Also we are advertising this URL in the installation section of our user-guide: https://kubevirt.io/user-guide/operations/installation/#installing-kubevirt-on-kubernetes

So it will not go away and should be as reliable as google cloud storage is.... Besides that, if GCS is not working, prow will not be working.

0xFelix commented 7 months ago

I'd vote to keep the GCS curl. Looks to be the most compatible, easy to understand and robust solution.

/lgtm

cwilkers commented 7 months ago

I think there's a consensus here, I'll go ahead and ... /approve

kubevirt-bot commented 7 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cwilkers

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/kubevirt/kubevirt.github.io/blob/main/OWNERS)~~ [cwilkers] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment