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

Fixes validation on image repository URL when it contains port but no scheme #13053

Merged

Conversation

tmcalves
Copy link
Contributor

Refactor the way validations are done to use regular expression
Explicitly use "auto" as the imageRepo instead of an empty string when URL received is invalid
Fixes #13022

@k8s-ci-robot
Copy link
Contributor

Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA.

It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.


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. I understand the commands that are listed here.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Nov 30, 2021

CLA Signed

The committers are authorized under a signed CLA.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Nov 30, 2021
@k8s-ci-robot
Copy link
Contributor

Welcome @tmcalves!

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 @tmcalves. 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/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 30, 2021
@minikube-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@medyagh
Copy link
Member

medyagh commented Nov 30, 2021

thank you @tmcalves for the PR, would u plz sign the CLA

@tmcalves
Copy link
Contributor Author

Should all be signed now

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Nov 30, 2021
@tmcalves
Copy link
Contributor Author

tmcalves commented Feb 7, 2022

anyone able to take a look at this?

@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 Feb 16, 2022
…t schema

Refactor the way validations are done to use regular expression
Explicitly use "auto" as the imageRepo instead of an empty string when URL received is invalid
@tmcalves tmcalves force-pushed the validations_on_image_repository branch from 49368d3 to a9d3fe2 Compare February 16, 2022 21:54
@tmcalves
Copy link
Contributor Author

Rebased to test a more updated version

@minikube-pr-bot
Copy link

kvm2 driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 13053) |
+----------------+----------+---------------------+
| minikube start | 53.5s    | 53.0s               |
| enable ingress | 29.0s    | 28.8s               |
+----------------+----------+---------------------+

Times for minikube start: 54.3s 53.1s 52.9s 51.7s 55.5s
Times for minikube (PR 13053) start: 51.8s 57.6s 51.6s 52.2s 51.9s

Times for minikube ingress: 28.5s 30.1s 29.1s 30.6s 26.6s
Times for minikube (PR 13053) ingress: 29.0s 30.1s 27.1s 28.6s 29.1s

docker driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 13053) |
+----------------+----------+---------------------+
| minikube start | 27.1s    | 26.2s               |
| enable ingress | 22.8s    | 22.6s               |
+----------------+----------+---------------------+

Times for minikube start: 29.9s 26.5s 26.6s 26.3s 25.9s
Times for minikube (PR 13053) start: 25.9s 27.0s 26.0s 25.5s 26.7s

Times for minikube ingress: 23.0s 22.5s 22.9s 22.4s 23.5s
Times for minikube (PR 13053) ingress: 22.9s 21.9s 22.4s 22.9s 22.9s

docker driver with containerd runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 13053) |
+----------------+----------+---------------------+
| minikube start | 41.0s    | 43.3s               |
| enable ingress | 21.5s    | 21.8s               |
+----------------+----------+---------------------+

Times for minikube (PR 13053) start: 41.6s 45.8s 41.4s 46.4s 41.3s
Times for minikube start: 30.6s 45.8s 42.0s 41.8s 44.7s

Times for minikube (PR 13053) ingress: 22.9s 18.9s 24.4s 19.4s 23.4s
Times for minikube ingress: 22.9s 18.9s 23.0s 22.9s 19.9s

@minikube-pr-bot
Copy link

kvm2 driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 13053) |
+----------------+----------+---------------------+
| minikube start | 53.0s    | 52.3s               |
| enable ingress | 28.4s    | 29.1s               |
+----------------+----------+---------------------+

Times for minikube (PR 13053) start: 52.7s 52.4s 52.3s 51.5s 52.4s
Times for minikube start: 57.0s 52.1s 52.0s 51.5s 52.3s

Times for minikube ingress: 28.6s 28.6s 30.5s 28.5s 26.1s
Times for minikube (PR 13053) ingress: 27.0s 29.1s 30.0s 29.0s 30.5s

docker driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 13053) |
+----------------+----------+---------------------+
| minikube start | 27.0s    | 26.2s               |
| enable ingress | 23.2s    | 22.7s               |
+----------------+----------+---------------------+

Times for minikube start: 29.8s 25.8s 27.1s 26.4s 26.0s
Times for minikube (PR 13053) start: 26.2s 26.4s 25.5s 26.1s 26.8s

Times for minikube (PR 13053) ingress: 22.4s 22.9s 23.9s 22.0s 22.4s
Times for minikube ingress: 23.4s 22.9s 21.9s 23.0s 24.9s

docker driver with containerd runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 13053) |
+----------------+----------+---------------------+
| minikube start | 39.9s    | 44.2s               |
| enable ingress | 22.6s    | 25.3s               |
+----------------+----------+---------------------+

Times for minikube start: 30.1s 45.0s 40.5s 42.0s 42.0s
Times for minikube (PR 13053) start: 46.2s 44.8s 40.8s 47.4s 41.5s

Times for minikube ingress: 24.4s 18.9s 23.4s 23.4s 22.9s
Times for minikube (PR 13053) ingress: 28.9s 22.9s 22.9s 18.9s 32.9s

@minikube-pr-bot
Copy link

These are the flake rates of all failed tests.

Environment Failed Tests Flake Rate (%)
KVM_Linux_containerd TestStartStop/group/newest-cni/serial/Pause (gopogh) 0.74 (chart)
KVM_Linux_containerd TestStartStop/group/newest-cni/serial/SecondStart (gopogh) 0.74 (chart)
KVM_Linux_containerd TestStartStop/group/newest-cni/serial/VerifyKubernetesImages (gopogh) 0.74 (chart)
KVM_Linux_containerd TestStartStop/group/newest-cni/serial/EnableAddonWhileActive (gopogh) 1.47 (chart)
KVM_Linux_containerd TestStartStop/group/newest-cni/serial/FirstStart (gopogh) 1.47 (chart)
KVM_Linux_containerd TestStartStop/group/no-preload/serial/AddonExistsAfterStop (gopogh) 1.47 (chart)
KVM_Linux_containerd TestStartStop/group/no-preload/serial/Pause (gopogh) 1.47 (chart)
KVM_Linux_containerd TestStartStop/group/no-preload/serial/SecondStart (gopogh) 1.47 (chart)
KVM_Linux_containerd TestStartStop/group/no-preload/serial/UserAppExistsAfterStop (gopogh) 1.47 (chart)
KVM_Linux_containerd TestStartStop/group/no-preload/serial/VerifyKubernetesImages (gopogh) 1.47 (chart)
KVM_Linux_containerd TestKubernetesUpgrade (gopogh) 2.21 (chart)
KVM_Linux_containerd TestStartStop/group/no-preload/serial/DeployApp (gopogh) 2.21 (chart)
KVM_Linux_containerd TestStartStop/group/no-preload/serial/EnableAddonWhileActive (gopogh) 2.21 (chart)
KVM_Linux_containerd TestStartStop/group/no-preload/serial/FirstStart (gopogh) 2.21 (chart)
KVM_Linux_containerd TestNetworkPlugins/group/kindnet/Start (gopogh) 2.94 (chart)
KVM_Linux TestStartStop/group/default-k8s-different-port/serial/Pause (gopogh) 2.94 (chart)
KVM_Linux_containerd TestNetworkPlugins/group/bridge/Start (gopogh) 3.68 (chart)
KVM_Linux_containerd TestNetworkPlugins/group/calico/Start (gopogh) 4.41 (chart)
Docker_Windows TestStartStop/group/default-k8s-different-port/serial/AddonExistsAfterStop (gopogh) 12.99 (chart)
Docker_Windows TestStartStop/group/default-k8s-different-port/serial/SecondStart (gopogh) 12.99 (chart)
Docker_Windows TestStartStop/group/default-k8s-different-port/serial/UserAppExistsAfterStop (gopogh) 12.99 (chart)
Docker_Windows TestStartStop/group/default-k8s-different-port/serial/VerifyKubernetesImages (gopogh) 12.99 (chart)
Docker_Windows TestPause/serial/Start (gopogh) 13.75 (chart)
Docker_Windows TestStartStop/group/no-preload/serial/Pause (gopogh) 14.29 (chart)
Docker_Windows TestStartStop/group/default-k8s-different-port/serial/Pause (gopogh) 20.78 (chart)
Docker_Windows TestNetworkPlugins/group/enable-default-cni/Start (gopogh) 33.75 (chart)
Docker_Windows TestStartStop/group/old-k8s-version/serial/Pause (gopogh) 42.11 (chart)
Docker_macOS TestNetworkPlugins/group/kubenet/DNS (gopogh) 49.02 (chart)
Docker_Linux_containerd TestNetworkPlugins/group/kindnet/Start (gopogh) 53.06 (chart)
Docker_Windows TestNetworkPlugins/group/bridge/Start (gopogh) 53.75 (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.

@minikube-pr-bot
Copy link

These are the flake rates of all failed tests.

Environment Failed Tests Flake Rate (%)
Docker_macOS TestDownloadOnly/v1.23.4-rc.0/preload-exists (gopogh) 0.00 (chart)
Docker_macOS TestDownloadOnlyKic (gopogh) 0.90 (chart)
Docker_macOS TestDownloadOnly/v1.23.3/preload-exists (gopogh) 0.94 (chart)
KVM_Linux TestNetworkPlugins/group/kindnet/Start (gopogh) 1.59 (chart)
KVM_Linux TestStoppedBinaryUpgrade/MinikubeLogs (gopogh) 5.56 (chart)
KVM_Linux TestStoppedBinaryUpgrade/Upgrade (gopogh) 5.56 (chart)
Docker_macOS TestNoKubernetes/serial/Start (gopogh) 14.68 (chart)
Docker_macOS TestNetworkPlugins/group/kindnet/DNS (gopogh) 28.57 (chart)
Docker_macOS TestNetworkPlugins/group/kubenet/DNS (gopogh) 48.94 (chart)
Docker_Linux_containerd TestNetworkPlugins/group/kindnet/Start (gopogh) 54.35 (chart)
Docker_macOS TestNetworkPlugins/group/calico/Start (gopogh) 58.62 (chart)
Docker_Linux TestNetworkPlugins/group/kindnet/Start (gopogh) 60.87 (chart)
Docker_Linux TestNetworkPlugins/group/custom-weave/Start (gopogh) 61.74 (chart)
Docker_macOS TestNetworkPlugins/group/bridge/DNS (gopogh) 62.69 (chart)
Docker_Linux TestNetworkPlugins/group/calico/Start (gopogh) 65.22 (chart)
Docker_macOS TestNetworkPlugins/group/enable-default-cni/DNS (gopogh) 66.22 (chart)
Docker_Linux_containerd TestNetworkPlugins/group/enable-default-cni/DNS (gopogh) 73.63 (chart)
Docker_Linux_containerd TestNetworkPlugins/group/calico/Start (gopogh) 76.09 (chart)
Docker_Linux_containerd TestNetworkPlugins/group/bridge/DNS (gopogh) 79.38 (chart)
Docker_Linux TestNetworkPlugins/group/bridge/DNS (gopogh) 93.04 (chart)
Docker_Linux TestNetworkPlugins/group/enable-default-cni/DNS (gopogh) 93.04 (chart)
Docker_Linux TestNetworkPlugins/group/kubenet/DNS (gopogh) 93.91 (chart)
Docker_macOS TestDownloadOnly/v1.16.0/preload-exists (gopogh) 98.20 (chart)
Docker_Cloud_Shell TestFunctional/parallel/TunnelCmd/serial/AccessDirect (gopogh) 100.00 (chart)
Docker_Cloud_Shell TestFunctional/parallel/TunnelCmd/serial/WaitService/IngressIP (gopogh) 100.00 (chart)

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

@spowelljr spowelljr merged commit 70a98e3 into kubernetes:master Feb 18, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

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 Feb 18, 2022
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.

minikube start --image-repository with port does not work without scheme
6 participants