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

🐛 Ensure KUBECONFIG is unset when testing GetConfigWithContext #909

Merged
merged 1 commit into from
Apr 18, 2020

Conversation

mcristina422
Copy link
Contributor

Where ~/kube/foo.yaml is a valid yaml, when $KUBECONFIG is set the tests fail.

KUBECONFIG=~/kube/foo.yaml TRACE=1 ./hack/check-everything.sh

Expected <snip> to be nil

Summarizing 1 Failure:

[Fail] Config GetConfigWithContext when kubeconfig files don't exist [It] should fail 
/Users/mcristi1/go/src/github.com/kubernetes-sigs/controller-runtime/pkg/client/config/config_test.go:85


This ensures the env var is unset prior to testing the failure case of GetConfigWithContext("")

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 17, 2020
@k8s-ci-robot
Copy link
Contributor

Hi @mcristina422. Thanks for your PR.

I'm waiting for a kubernetes-sigs 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 size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Apr 17, 2020
@mcristina422
Copy link
Contributor Author

/assign @DirectXMan12

@DirectXMan12
Copy link
Contributor

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 17, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: DirectXMan12, mcristina422

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 Apr 17, 2020
@alexeldeib
Copy link
Contributor

alexeldeib commented Apr 17, 2020

Well that's not a good failure...

• Failure [0.013 seconds]
controller.Controller
/home/prow/go/src/sigs.k8s.io/controller-runtime/pkg/controller/controller_test.go:33
  New
  /home/prow/go/src/sigs.k8s.io/controller-runtime/pkg/controller/controller_test.go:47
    should not leak goroutines when stop [It]
    /home/prow/go/src/sigs.k8s.io/controller-runtime/pkg/controller/controller_test.go:96
    Expected
      
        <int>: 4
    to be <=
        <int>: 3

/ok-to-test
/retest

@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 Apr 17, 2020
@alexeldeib
Copy link
Contributor

you can ignore pull-controller-runtime-apidiff-master, I need to fix that in prow. It shouldn't work off a dirty commit.

@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented Apr 17, 2020

@mcristina422: The following test failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
pull-controller-runtime-apidiff-master 8ed61af link /test pull-controller-runtime-apidiff-master

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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.

@alexeldeib
Copy link
Contributor

did we regress this somehow, k8s 1.18? I'm confused

cc @vincepri @knabben @alenkacz from the original PR

@alexeldeib
Copy link
Contributor

alexeldeib commented Apr 18, 2020

/test pull-controller-runtime-test-master

I can't repro this locally even with large test run counts, but it's pretty frequent on prow...wonder if there's resource contention exposing a race or something.

@k8s-ci-robot k8s-ci-robot merged commit 8d8953d into kubernetes-sigs:master Apr 18, 2020
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. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants