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

Ignore localhost proxy started with scheme. #8885

Merged

Conversation

lingsamuel
Copy link
Contributor

Signed-off-by: Ling Samuel lingsamuelgrace@gmail.com

closes #8881

This PR adds a "default" scheme http:// (only for url.Parse) to the proxy values that don't have the scheme.

Fix a wrong test. Old test never failed because v == test.proxy always be false.

@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.

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

Welcome @lingsamuel!

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 @lingsamuel. 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 Jul 30, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: lingsamuel
To complete the pull request process, please assign afbjorklund
You can assign the PR to them by writing /assign @afbjorklund in a comment when ready.

The full list of commands accepted by this bot can be found 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

@minikube-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@TravisBuddy
Copy link

Travis tests have failed

Hey @lingsamuel,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.

1st Build

View build log

make test
which go-bindata || GO111MODULE=off GOBIN="/home/travis/gopath/bin" go get github.com/jteeuwen/go-bindata/...
PATH="/home/travis/gopath/bin:/home/travis/.gimme/versions/go1.14.6.linux.amd64/bin:/home/travis/bin:/home/travis/bin:/home/travis/.local/bin:/usr/local/lib/jvm/openjdk11/bin:/opt/pyenv/shims:/home/travis/.phpenv/shims:/home/travis/perl5/perlbrew/bin:/home/travis/.nvm/versions/node/v8.12.0/bin:/home/travis/.rvm/gems/ruby-2.5.3/bin:/home/travis/.rvm/gems/ruby-2.5.3@global/bin:/home/travis/.rvm/rubies/ruby-2.5.3/bin:/home/travis/gopath/bin:/home/travis/.gimme/versions/go1.11.1.linux.amd64/bin:/usr/local/maven-3.6.3/bin:/usr/local/cmake-3.12.4/bin:/usr/local/clang-7.0.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/home/travis/.rvm/bin:/home/travis/.phpenv/bin:/opt/pyenv/bin:/home/travis/.yarn/bin:/home/travis/gopath/bin" go-bindata -nomemcopy -o pkg/minikube/assets/assets.go -pkg assets deploy/addons/...
gofmt -s -w pkg/minikube/assets/assets.go
which go-bindata || GO111MODULE=off GOBIN="/home/travis/gopath/bin" go get github.com/jteeuwen/go-bindata/...
/home/travis/gopath/bin/go-bindata
PATH="/home/travis/gopath/bin:/home/travis/.gimme/versions/go1.14.6.linux.amd64/bin:/home/travis/bin:/home/travis/bin:/home/travis/.local/bin:/usr/local/lib/jvm/openjdk11/bin:/opt/pyenv/shims:/home/travis/.phpenv/shims:/home/travis/perl5/perlbrew/bin:/home/travis/.nvm/versions/node/v8.12.0/bin:/home/travis/.rvm/gems/ruby-2.5.3/bin:/home/travis/.rvm/gems/ruby-2.5.3@global/bin:/home/travis/.rvm/rubies/ruby-2.5.3/bin:/home/travis/gopath/bin:/home/travis/.gimme/versions/go1.11.1.linux.amd64/bin:/usr/local/maven-3.6.3/bin:/usr/local/cmake-3.12.4/bin:/usr/local/clang-7.0.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/home/travis/.rvm/bin:/home/travis/.phpenv/bin:/opt/pyenv/bin:/home/travis/.yarn/bin:/home/travis/gopath/bin" go-bindata -nomemcopy -o pkg/minikube/translate/translations.go -pkg translate translations/...
gofmt -s -w pkg/minikube/translate/translations.go
MINIKUBE_LDFLAGS="-X k8s.io/minikube/pkg/version.version=v1.12.1 -X k8s.io/minikube/pkg/version.isoVersion=v1.12.0 -X k8s.io/minikube/pkg/version.isoPath=minikube/iso -X k8s.io/minikube/pkg/version.gitCommitID="cb8ca718de853b20831a8ba8791d2738952e1240"" ./test.sh
= make lint =============================================================
golangci/golangci-lint info checking GitHub for tag 'v1.29.0'
golangci/golangci-lint info found version: 1.29.0 for v1.29.0/linux/amd64
golangci/golangci-lint info installed out/linters/golangci-lint
pkg/minikube/proxy/proxy.go:164: File is not `goimports`-ed (goimports)
				isLocalProxy := func (url string) bool {
cmd/minikube/cmd/start_test.go:183: File is not `goimports`-ed (goimports)
			description:  "http_proxy=http://1.2.127.0:3128",
			proxy:        "http://1.2.127.0:3128",
Makefile:390: recipe for target 'lint-ci' failed
make[1]: *** [lint-ci] Error 1
= go mod ================================================================
ok
= boilerplate ===========================================================
ok
Makefile:274: recipe for target 'test' failed
make: *** [test] Error 4
TravisBuddy Request Identifier: 1fe3fd00-d23b-11ea-9c70-53a116b43db5

@lingsamuel lingsamuel force-pushed the ignore-localhost-proxy-with-scheme branch from a8ec04d to fa35288 Compare July 30, 2020 08:15
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 30, 2020
Signed-off-by: Ling Samuel <lingsamuelgrace@gmail.com>
@lingsamuel lingsamuel force-pushed the ignore-localhost-proxy-with-scheme branch from fa35288 to bb57ae0 Compare July 30, 2020 08:17
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 30, 2020
@TravisBuddy
Copy link

Travis tests have failed

Hey @lingsamuel,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.

1st Build

View build log

make test
which go-bindata || GO111MODULE=off GOBIN="/home/travis/gopath/bin" go get github.com/jteeuwen/go-bindata/...
PATH="/home/travis/gopath/bin:/home/travis/.gimme/versions/go1.14.6.linux.amd64/bin:/home/travis/bin:/home/travis/bin:/home/travis/.local/bin:/usr/local/lib/jvm/openjdk11/bin:/opt/pyenv/shims:/home/travis/.phpenv/shims:/home/travis/perl5/perlbrew/bin:/home/travis/.nvm/versions/node/v8.12.0/bin:/home/travis/.rvm/gems/ruby-2.5.3/bin:/home/travis/.rvm/gems/ruby-2.5.3@global/bin:/home/travis/.rvm/rubies/ruby-2.5.3/bin:/home/travis/gopath/bin:/home/travis/.gimme/versions/go1.11.1.linux.amd64/bin:/usr/local/maven-3.6.3/bin:/usr/local/cmake-3.12.4/bin:/usr/local/clang-7.0.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/home/travis/.rvm/bin:/home/travis/.phpenv/bin:/opt/pyenv/bin:/home/travis/.yarn/bin:/home/travis/gopath/bin" go-bindata -nomemcopy -o pkg/minikube/assets/assets.go -pkg assets deploy/addons/...
gofmt -s -w pkg/minikube/assets/assets.go
which go-bindata || GO111MODULE=off GOBIN="/home/travis/gopath/bin" go get github.com/jteeuwen/go-bindata/...
/home/travis/gopath/bin/go-bindata
PATH="/home/travis/gopath/bin:/home/travis/.gimme/versions/go1.14.6.linux.amd64/bin:/home/travis/bin:/home/travis/bin:/home/travis/.local/bin:/usr/local/lib/jvm/openjdk11/bin:/opt/pyenv/shims:/home/travis/.phpenv/shims:/home/travis/perl5/perlbrew/bin:/home/travis/.nvm/versions/node/v8.12.0/bin:/home/travis/.rvm/gems/ruby-2.5.3/bin:/home/travis/.rvm/gems/ruby-2.5.3@global/bin:/home/travis/.rvm/rubies/ruby-2.5.3/bin:/home/travis/gopath/bin:/home/travis/.gimme/versions/go1.11.1.linux.amd64/bin:/usr/local/maven-3.6.3/bin:/usr/local/cmake-3.12.4/bin:/usr/local/clang-7.0.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/home/travis/.rvm/bin:/home/travis/.phpenv/bin:/opt/pyenv/bin:/home/travis/.yarn/bin:/home/travis/gopath/bin" go-bindata -nomemcopy -o pkg/minikube/translate/translations.go -pkg translate translations/...
gofmt -s -w pkg/minikube/translate/translations.go
MINIKUBE_LDFLAGS="-X k8s.io/minikube/pkg/version.version=v1.12.1 -X k8s.io/minikube/pkg/version.isoVersion=v1.12.0 -X k8s.io/minikube/pkg/version.isoPath=minikube/iso -X k8s.io/minikube/pkg/version.gitCommitID="4be3ae3e3e9d9161ba67d40448202b6568e3cb05"" ./test.sh
= make lint =============================================================
golangci/golangci-lint info checking GitHub for tag 'v1.29.0'
golangci/golangci-lint info found version: 1.29.0 for v1.29.0/linux/amd64
golangci/golangci-lint info installed out/linters/golangci-lint
WARN [runner] Can't run linter goanalysis_metalinter: S1025: failed prerequisites: [(buildir@k8s.io/minikube, inspect@k8s.io/minikube, isgenerated@k8s.io/minikube): analysis skipped: errors in package: [/home/travis/gopath/src/github.com/kubernetes/minikube/proxy_.go:74:21: undeclared name: kubernetesVersion /home/travis/gopath/src/github.com/kubernetes/minikube/proxy_.go:75:15: undeclared name: getKubernetesVersion /home/travis/gopath/src/github.com/kubernetes/minikube/proxy_.go:87:19: undeclared name: humanReadableDiskSize /home/travis/gopath/src/github.com/kubernetes/minikube/proxy_.go:87:42: undeclared name: defaultDiskSize /home/travis/gopath/src/github.com/kubernetes/minikube/proxy_.go:132:21: undeclared name: imageRepository /home/travis/gopath/src/github.com/kubernetes/minikube/proxy_.go:133:21: undeclared name: imageMirrorCountry /home/travis/gopath/src/github.com/kubernetes/minikube/proxy_.go:134:22: undeclared name: generateClusterConfig /home/travis/gopath/src/github.com/kubernetes/minikube/proxy_.go:146:19: undeclared name: humanReadableDiskSize /home/travis/gopath/src/github.com/kubernetes/minikube/proxy_.go:146:42: undeclared name: defaultDiskSize /home/travis/gopath/src/github.com/kubernetes/minikube/proxy_.go:203:22: undeclared name: generateClusterConfig /home/travis/gopath/src/github.com/kubernetes/minikube/proxy_.go:274:11: undeclared name: suggestMemoryAllocation]] 
WARN [runner] Can't run linter unused: buildir: analysis skipped: errors in package: [/home/travis/gopath/src/github.com/kubernetes/minikube/proxy_.go:74:21: undeclared name: kubernetesVersion /home/travis/gopath/src/github.com/kubernetes/minikube/proxy_.go:75:15: undeclared name: getKubernetesVersion /home/travis/gopath/src/github.com/kubernetes/minikube/proxy_.go:87:19: undeclared name: humanReadableDiskSize /home/travis/gopath/src/github.com/kubernetes/minikube/proxy_.go:87:42: undeclared name: defaultDiskSize /home/travis/gopath/src/github.com/kubernetes/minikube/proxy_.go:132:21: undeclared name: imageRepository /home/travis/gopath/src/github.com/kubernetes/minikube/proxy_.go:133:21: undeclared name: imageMirrorCountry /home/travis/gopath/src/github.com/kubernetes/minikube/proxy_.go:134:22: undeclared name: generateClusterConfig /home/travis/gopath/src/github.com/kubernetes/minikube/proxy_.go:146:19: undeclared name: humanReadableDiskSize /home/travis/gopath/src/github.com/kubernetes/minikube/proxy_.go:146:42: undeclared name: defaultDiskSize /home/travis/gopath/src/github.com/kubernetes/minikube/proxy_.go:203:22: undeclared name: generateClusterConfig /home/travis/gopath/src/github.com/kubernetes/minikube/proxy_.go:274:11: undeclared name: suggestMemoryAllocation] 
ERRO Running error: buildir: analysis skipped: errors in package: [/home/travis/gopath/src/github.com/kubernetes/minikube/proxy_.go:74:21: undeclared name: kubernetesVersion /home/travis/gopath/src/github.com/kubernetes/minikube/proxy_.go:75:15: undeclared name: getKubernetesVersion /home/travis/gopath/src/github.com/kubernetes/minikube/proxy_.go:87:19: undeclared name: humanReadableDiskSize /home/travis/gopath/src/github.com/kubernetes/minikube/proxy_.go:87:42: undeclared name: defaultDiskSize /home/travis/gopath/src/github.com/kubernetes/minikube/proxy_.go:132:21: undeclared name: imageRepository /home/travis/gopath/src/github.com/kubernetes/minikube/proxy_.go:133:21: undeclared name: imageMirrorCountry /home/travis/gopath/src/github.com/kubernetes/minikube/proxy_.go:134:22: undeclared name: generateClusterConfig /home/travis/gopath/src/github.com/kubernetes/minikube/proxy_.go:146:19: undeclared name: humanReadableDiskSize /home/travis/gopath/src/github.com/kubernetes/minikube/proxy_.go:146:42: undeclared name: defaultDiskSize /home/travis/gopath/src/github.com/kubernetes/minikube/proxy_.go:203:22: undeclared name: generateClusterConfig /home/travis/gopath/src/github.com/kubernetes/minikube/proxy_.go:274:11: undeclared name: suggestMemoryAllocation] 
Makefile:390: recipe for target 'lint-ci' failed
make[1]: *** [lint-ci] Error 3
= go mod ================================================================
ok
= boilerplate ===========================================================
ok
Makefile:274: recipe for target 'test' failed
make: *** [test] Error 4
TravisBuddy Request Identifier: a61bcfe0-d23d-11ea-9c70-53a116b43db5

@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 Jul 30, 2020
@medyagh
Copy link
Member

medyagh commented Aug 1, 2020

/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 1, 2020
@minikube-pr-bot
Copy link

kvm2 Driver
docker Driver

@lingsamuel
Copy link
Contributor Author

lingsamuel commented Aug 1, 2020

I don't understand the error message https://storage.googleapis.com/minikube-builds/logs/8885/bb57ae0/VirtualBox_macOS.html#fail_TestNetworkPlugins%2fgroup%2fkindnet%2fDNS

error: invalid resource name "deployment/netcat": [may not contain '/']

nslookup := func() error {
rr, err = Run(t, exec.CommandContext(ctx, "kubectl", "--context", profile, "exec", "deployment/netcat", "--", "nslookup", "kubernetes.default"))
return err

Others are weird too.

@medyagh
Copy link
Member

medyagh commented Aug 10, 2020

thank you @lingsamuel

@medyagh medyagh merged commit 9373842 into kubernetes:master Aug 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

Shouldn't pass scheme prefixed localhost proxy environment variables.
6 participants