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

--kubernetes-version add support for checking github k8s versions and exit nicely on error #16865

Merged
merged 14 commits into from
Aug 17, 2023

Conversation

JudahNour
Copy link
Contributor

@JudahNour JudahNour commented Jul 11, 2023

fixes #16607

Before:

$ mk start --kubernetes-version=v1.28.0-alpha.5
๐Ÿ˜„  minikube v1.30.1 on Debian rodete (amd64)
โ—  Specified Kubernetes version 1.28.0-alpha.5 is newer than the newest supported version: v1.27.3. Use `minikube config defaults kubernetes-version` for details.
โœจ  Automatically selected the docker driver
๐Ÿ“Œ  Using Docker driver with root privileges
๐Ÿ‘  Starting control plane node minikube in cluster minikube
๐Ÿšœ  Pulling base image ...
๐Ÿ”ฅ  Creating docker container (CPUs=2, Memory=8000MB) ...
โ—  The image 'registry.k8s.io/kube-scheduler:v1.28.0-alpha.5' was not found; unable to add it to cache.
โ—  The image 'registry.k8s.io/kube-apiserver:v1.28.0-alpha.5' was not found; unable to add it to cache.
โ—  The image 'registry.k8s.io/kube-controller-manager:v1.28.0-alpha.5' was not found; unable to add it to cache.
โ—  The image 'registry.k8s.io/kube-proxy:v1.28.0-alpha.5' was not found; unable to add it to cache.
๐Ÿณ  Preparing Kubernetes v1.28.0-alpha.5 on Docker 24.0.2 ...
โŒ  Unable to load cached images: loading cached images: stat /usr/local/google/home/judahn/.minikube/cache/images/amd64/registry.k8s.io/kube-apiserver_v1.28.0-alpha.5: no such file or directory

โŒ  Exiting due to K8S_INSTALL_FAILED: Failed to update cluster: updating control plane: downloading binaries: downloading kubectl: download failed: https://dl.k8s.io/release/v1.28.0-alpha.5/bin/linux/amd64/kubectl?checksum=file:https://dl.k8s.io/release/v1.28.0-alpha.5/bin/linux/amd64/kubectl.sha256: getter: &{Ctx:context.Background Src:https://dl.k8s.io/release/v1.28.0-alpha.5/bin/linux/amd64/kubectl?checksum=file:https://dl.k8s.io/release/v1.28.0-alpha.5/bin/linux/amd64/kubectl.sha256 Dst:/usr/local/google/home/judahn/.minikube/cache/linux/amd64/v1.28.0-alpha.5/kubectl.download Pwd: Mode:2 Umask:---------- Detectors:[0x3f01040 0x3f01040 0x3f01040 0x3f01040 0x3f01040 0x3f01040 0x3f01040] Decompressors:map[bz2:0xc000238490 gz:0xc000238498 tar:0xc000238440 tar.bz2:0xc000238450 tar.gz:0xc000238460 tar.xz:0xc000238470 tar.zst:0xc000238480 tbz2:0xc000238450 tgz:0xc000238460 txz:0xc000238470 tzst:0xc000238480 xz:0xc0002384a0 zip:0xc0002384b0 zst:0xc0002384a8] Getters:map[file:0xc001552bd0 http:0xc00070b590 https:0xc00070b5e0] Dir:false ProgressListener:0x3ec1760 Insecure:false DisableSymlinks:false Options:[0x1c0d8e0]}: invalid checksum: Error downloading checksum file: bad response code: 404

โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚                                                                                           โ”‚
โ”‚    ๐Ÿ˜ฟ  If the above advice does not help, please let us know:                             โ”‚
โ”‚    ๐Ÿ‘‰  https://github.com/kubernetes/minikube/issues/new/choose                           โ”‚
โ”‚                                                                                           โ”‚
โ”‚    Please run `minikube logs --file=logs.txt` and attach logs.txt to the GitHub issue.    โ”‚
โ”‚                                                                                           โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

After:

$ mk start --kubernetes-version=v1.28.0-alpha.5
๐Ÿ˜„  minikube v1.30.1 on Debian rodete (amd64)
โ—  Specified Kubernetes version 1.28.0-alpha.5 is newer than the newest supported version: v1.27.3. Use `minikube config defaults kubernetes-version` for details.
โ—  Specified Kubernetes version 1.28.0-alpha.5 not found in Kubernetes version list. Searching the internet...
โ—  Kubernetes version not found in Github version list. You can force a Kubernetes version via the --force flag

โŒ  Exiting due to K8S_NEW_UNSUPPORTED: Kubernetes 1.28.0-alpha.5 is not supported by this release of minikube

Before:

$ mk start --kubernetes-version=v1.28.0-alpha.4
๐Ÿ˜„  minikube v1.30.1 on Debian rodete (amd64)
โ—  Specified Kubernetes version 1.28.0-alpha.4 is newer than the newest supported version: v1.27.3. Use `minikube config defaults kubernetes-version` for details.
โœจ  Automatically selected the docker driver
๐Ÿ“Œ  Using Docker driver with root privileges
๐Ÿ‘  Starting control plane node minikube in cluster minikube
๐Ÿšœ  Pulling base image ...
๐Ÿ”ฅ  Creating docker container (CPUs=2, Memory=8000MB) ...
๐Ÿณ  Preparing Kubernetes v1.28.0-alpha.4 on Docker 24.0.2 ...
    โ–ช Generating certificates and keys ...
    โ–ช Booting up control plane ...
    โ–ช Configuring RBAC rules ...
๐Ÿ”—  Configuring CNI (Container Networking Interface) ...
    โ–ช Using image gcr.io/k8s-minikube/storage-provisioner:v5
๐Ÿ”Ž  Verifying Kubernetes components...
๐ŸŒŸ  Enabled addons: storage-provisioner, default-storageclass
๐Ÿ„  Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default

After:

$ mk start --kubernetes-version=v1.28.0-alpha.4
๐Ÿ˜„  minikube v1.30.1 on Debian rodete (amd64)
โ—  Specified Kubernetes version 1.28.0-alpha.4 is newer than the newest supported version: v1.27.3. Use `minikube config defaults kubernetes-version` for details.
โ—  Specified Kubernetes version 1.28.0-alpha.4 not found in Kubernetes version list. Searching the internet...
โœ…  Kubernetes version 1.28.0-alpha.4 found in Github version list
โœจ  Automatically selected the docker driver
๐Ÿ“Œ  Using Docker driver with root privileges
๐Ÿ‘  Starting control plane node minikube in cluster minikube
๐Ÿšœ  Pulling base image ...
๐Ÿ”ฅ  Creating docker container (CPUs=2, Memory=8000MB) ...
๐Ÿณ  Preparing Kubernetes v1.28.0-alpha.4 on Docker 24.0.2 ...
    โ–ช Generating certificates and keys ...
    โ–ช Booting up control plane ...
    โ–ช Configuring RBAC rules ...
๐Ÿ”—  Configuring CNI (Container Networking Interface) ...
    โ–ช Using image gcr.io/k8s-minikube/storage-provisioner:v5
๐Ÿ”Ž  Verifying Kubernetes components...
๐ŸŒŸ  Enabled addons: storage-provisioner, default-storageclass
๐Ÿ„  Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 11, 2023
@k8s-ci-robot
Copy link
Contributor

Hi @JudahNour. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jul 11, 2023
@minikube-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jul 11, 2023
cmd/minikube/cmd/config/kubernetes_version.go Outdated Show resolved Hide resolved
cmd/minikube/cmd/config/kubernetes_version.go Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 12, 2023
cmd/minikube/cmd/config/kubernetes_version.go Outdated Show resolved Hide resolved
cmd/minikube/cmd/start.go Outdated Show resolved Hide resolved
cmd/minikube/cmd/start.go Outdated Show resolved Hide resolved
pkg/minikube/reason/reason.go Outdated Show resolved Hide resolved
@medyagh
Copy link
Member

medyagh commented Jul 12, 2023

$ mk start --kubernetes-version=v1.28.0-alpha.4
๐Ÿ˜„  minikube v1.30.1 on Debian rodete (amd64)
โ—  Specified Kubernetes version 1.28.0-alpha.4 is newer than the newest supported version: v1.27.3. Use `minikube config defaults kubernetes-version` for details.
โ—  Specified Kubernetes version 1.28.0-alpha.4 not found in Kubernetes version list. Searching the internet...

second one should not be Warnining Icon it is searching...

cmd/minikube/cmd/config/kubernetes_version.go Outdated Show resolved Hide resolved
cmd/minikube/cmd/start.go Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 13, 2023
@spowelljr
Copy link
Member

Need to rebase to fix the merge conflict

@k8s-ci-robot k8s-ci-robot removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 13, 2023
@k8s-ci-robot k8s-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Jul 13, 2023
@spowelljr
Copy link
Member

Something went wrong with your rebase, there's a bunch of file changes here now

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jul 14, 2023
@JudahNour
Copy link
Contributor Author

JudahNour commented Jul 14, 2023

Something went wrong with your rebase, there's a bunch of file changes here now

I believe this is fixed but I'm trying to fix an issue that I think rebasing again just caused

Edit: done

@spowelljr
Copy link
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 17, 2023
@minikube-pr-bot

This comment has been minimized.

@minikube-pr-bot

This comment has been minimized.

pkg/minikube/reason/reason.go Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot removed the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 17, 2023
@minikube-pr-bot
Copy link

kvm2 driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 16865) |
+----------------+----------+---------------------+
| minikube start | 50.8s    | 51.6s               |
| enable ingress | 27.5s    | 27.5s               |
+----------------+----------+---------------------+

Times for minikube start: 50.2s 48.9s 51.8s 51.2s 52.1s
Times for minikube (PR 16865) start: 52.9s 50.2s 50.3s 51.9s 53.0s

Times for minikube ingress: 26.7s 28.3s 27.8s 27.2s 27.7s
Times for minikube (PR 16865) ingress: 28.3s 26.3s 27.7s 27.7s 27.7s

docker driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 16865) |
+----------------+----------+---------------------+
| minikube start | 24.0s    | 23.2s               |
| enable ingress | 20.8s    | 21.7s               |
+----------------+----------+---------------------+

Times for minikube ingress: 20.8s 20.9s 20.4s 20.9s 20.8s
Times for minikube (PR 16865) ingress: 20.8s 20.3s 24.3s 20.8s 21.9s

Times for minikube start: 24.7s 25.4s 24.7s 22.8s 22.3s
Times for minikube (PR 16865) start: 24.8s 21.6s 24.3s 21.3s 23.8s

docker driver with containerd runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 16865) |
+----------------+----------+---------------------+
| minikube start | 22.0s    | 20.5s               |
| enable ingress | 28.8s    | 31.2s               |
+----------------+----------+---------------------+

Times for minikube start: 23.4s 19.9s 23.4s 23.4s 19.7s
Times for minikube (PR 16865) start: 22.5s 19.7s 20.0s 20.2s 20.1s

Times for minikube ingress: 31.3s 19.3s 31.4s 31.4s 30.3s
Times for minikube (PR 16865) ingress: 31.3s 31.4s 31.3s 30.3s 31.4s

@spowelljr spowelljr merged commit 5753ca0 into kubernetes:master Aug 17, 2023
16 of 29 checks passed
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JudahNour, spowelljr

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:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 17, 2023
@minikube-pr-bot
Copy link

These are the flake rates of all failed tests.

Environment Failed Tests Flake Rate (%)
Docker_Linux_crio TestFunctional/parallel/ImageCommands/ImageRemove (gopogh) 0.76 (chart)
Hyperkit_macOS TestNetworkPlugins/group/kindnet/Start (gopogh) 1.46 (chart)
Docker_Linux_containerd_arm64 TestFunctional/serial/ExtraConfig (gopogh) 3.50 (chart)
Docker_Linux_containerd_arm64 TestFunctional/serial/ComponentHealth (gopogh) 4.20 (chart)
Hyperkit_macOS TestStoppedBinaryUpgrade/Upgrade (gopogh) 4.38 (chart)
KVM_Linux_crio TestFunctional/serial/LogsFileCmd (gopogh) 26.72 (chart)

To see the flake rates of all tests by environment, click here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

make error look nicer when user enters a too new that doesnt exist
6 participants