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

Add exit message for too new Kubernetes version #13354

Merged
merged 4 commits into from
Feb 3, 2022

Conversation

nishipy
Copy link
Contributor

@nishipy nishipy commented Jan 15, 2022

Fix #11627 in the simplest way.

If specified Kubernetes version is more than the newest supported one, the output will be like:

# minikube  start --kubernetes-version=1.23.3
😄  minikube v1.24.0 on Redhat 8.5
❗  Specified Kubernetes version 1.23.3 is more than the newest supported version: v1.23.2-rc.0
❗  You can force an unsupported Kubernetes version via the --force flag if it exists

❌  Exiting due to K8S_OLD_UNSUPPORTED: Kubernetes 1.23.3 is not supported by this release of minikube

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

Welcome @nishipy!

It looks like this is your first PR to kubernetes/minikube 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/minikube has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot
Copy link
Contributor

Hi @nishipy. 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 needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 15, 2022
@minikube-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@nishipy
Copy link
Contributor Author

nishipy commented Jan 17, 2022

/assign @sharifelgamal

@klaases
Copy link
Contributor

klaases commented Jan 25, 2022

Hi @sharifelgamal, do you think this PR is /ok-to-test?

@sharifelgamal
Copy link
Collaborator

Hey @nishipy, thanks for this PR. Could you add an integration test to make sure this codepath stays covered?

cmd/minikube/cmd/start.go Outdated Show resolved Hide resolved
Co-authored-by: Sharif Elgamal <selgamal@google.com>
@nishipy
Copy link
Contributor Author

nishipy commented Jan 26, 2022

Hey @nishipy, thanks for this PR. Could you add an integration test to make sure this codepath stays covered?

Hi @sharifelgamal, thanks for your comment.
Do you mean we will add the test code to test/integration/?
If my understanding is correct, I think it will be similar to test/integration/no_kubernetes_test.go.

any version newer than newestKubernetesVersion.
This fixes the flow as follows:
if not --force:
- Warn but do NOT exit for newer minor version and patch version
- Warn and Exit for newer major version

if --force: Warn but try anyways
@klaases
Copy link
Contributor

klaases commented Feb 2, 2022

Hi @nishipy, were you able to make the requested changes?

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 3, 2022
Copy link
Member

@medyagh medyagh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me , if @sharifelgamal is good with it too, lets merge it

@sharifelgamal
Copy link
Collaborator

/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 Feb 3, 2022
@minikube-pr-bot
Copy link

kvm2 driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 13354) |
+----------------+----------+---------------------+
| minikube start | 55.2s    | 54.0s               |
| enable ingress | 32.0s    | 31.4s               |
+----------------+----------+---------------------+

Times for minikube start: 55.6s 54.0s 53.3s 57.5s 55.4s
Times for minikube (PR 13354) start: 53.8s 54.5s 53.8s 54.6s 53.3s

Times for minikube ingress: 30.6s 31.7s 32.2s 32.2s 33.2s
Times for minikube (PR 13354) ingress: 34.2s 29.7s 30.7s 31.8s 30.7s

docker driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 13354) |
+----------------+----------+---------------------+
| minikube start | 30.8s    | 27.2s               |
| enable ingress | 25.3s    | 24.5s               |
+----------------+----------+---------------------+

Times for minikube (PR 13354) start: 26.1s 26.3s 27.1s 28.2s 28.3s
Times for minikube start: 44.3s 26.8s 27.7s 26.4s 28.8s

Times for minikube ingress: 22.5s 29.4s 22.5s 28.5s 23.5s
Times for minikube (PR 13354) ingress: 24.0s 24.5s 26.9s 23.5s 23.5s

docker driver with containerd runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 13354) |
+----------------+----------+---------------------+
| minikube start | 46.4s    | 46.5s               |
| enable ingress | 32.0s    | 37.1s               |
+----------------+----------+---------------------+

Times for minikube start: 47.3s 44.2s 49.0s 47.1s 44.4s
Times for minikube (PR 13354) start: 45.7s 44.5s 49.4s 43.4s 49.5s

Times for minikube ingress: 23.0s 38.1s 42.6s 21.6s 34.6s
Times for minikube (PR 13354) ingress: 23.7s 35.1s 62.1s 34.0s 30.6s

@minikube-pr-bot
Copy link

These are the flake rates of all failed tests.

Environment Failed Tests Flake Rate (%)
Docker_Windows TestStartStop/group/newest-cni/serial/EnableAddonAfterStop (gopogh) 2.86 (chart)
Docker_Windows TestStartStop/group/newest-cni/serial/Stop (gopogh) 2.86 (chart)
KVM_Linux TestKubernetesUpgrade (gopogh) 3.70 (chart)
Docker_Windows TestStartStop/group/newest-cni/serial/FirstStart (gopogh) 4.29 (chart)
KVM_Linux TestRunningBinaryUpgrade (gopogh) 4.63 (chart)
KVM_Linux TestStoppedBinaryUpgrade/MinikubeLogs (gopogh) 5.56 (chart)
KVM_Linux TestStoppedBinaryUpgrade/Upgrade (gopogh) 5.56 (chart)
KVM_Linux TestNetworkPlugins/group/cilium/Start (gopogh) 6.48 (chart)
KVM_Linux TestNetworkPlugins/group/enable-default-cni/Start (gopogh) 10.19 (chart)
Docker_Cloud_Shell TestStartStop/group/cloud-shell/serial/AddonExistsAfterStop (gopogh) 17.78 (chart)
Docker_Cloud_Shell TestStartStop/group/cloud-shell/serial/EnableAddonAfterStop (gopogh) 17.78 (chart)
Docker_Cloud_Shell TestStartStop/group/cloud-shell/serial/Stop (gopogh) 17.78 (chart)
Docker_Cloud_Shell TestStartStop/group/cloud-shell/serial/UserAppExistsAfterStop (gopogh) 17.78 (chart)
Docker_Cloud_Shell TestStartStop/group/cloud-shell/serial/SecondStart (gopogh) 18.68 (chart)
Docker_macOS TestNoKubernetes/serial/Start (gopogh) 21.21 (chart)
Docker_Linux TestNetworkPlugins/group/cilium/Start (gopogh) 23.00 (chart)
Docker_Windows TestKubernetesUpgrade (gopogh) 23.29 (chart)
Docker_Windows TestRunningBinaryUpgrade (gopogh) 23.29 (chart)
Docker_Linux TestAddons/parallel/Registry (gopogh) 27.00 (chart)
Docker_Linux TestFunctional/parallel/PersistentVolumeClaim (gopogh) 27.00 (chart)
Docker_Linux TestMultiNode/serial/DeployApp2Nodes (gopogh) 27.00 (chart)
Docker_Linux TestMultiNode/serial/PingHostFrom2Pods (gopogh) 27.00 (chart)
Docker_Linux TestFunctional/parallel/DashboardCmd (gopogh) 28.00 (chart)
Docker_Windows TestPause/serial/Pause (gopogh) 28.57 (chart)
Docker_Linux TestNetworkPlugins/group/auto/DNS (gopogh) 33.00 (chart)
Docker_Linux_containerd TestStartStop/group/no-preload/serial/DeployApp (gopogh) 40.00 (chart)
Docker_Linux_containerd TestStartStop/group/no-preload/serial/FirstStart (gopogh) 40.00 (chart)
Docker_Linux_containerd TestStartStop/group/no-preload/serial/UserAppExistsAfterStop (gopogh) 40.00 (chart)
Docker_Linux_containerd TestStartStop/group/no-preload/serial/SecondStart (gopogh) 41.18 (chart)
Docker_Windows TestStartStop/group/newest-cni/serial/Pause (gopogh) 41.43 (chart)
More tests... Continued...

Too many tests failed - See test logs for more details.

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

@sharifelgamal sharifelgamal merged commit 5e54044 into kubernetes:master Feb 3, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: medyagh, nishipy, sharifelgamal

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 [medyagh,sharifelgamal]

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

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/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

improve exit message when trying to pull Non-Existing Kubernetes Version
7 participants