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

Adds support for multiple kubelets to unit test. #47272

Closed
wants to merge 1 commit into from

Conversation

danehans
Copy link

@danehans danehans commented Jun 9, 2017

What this PR does / why we need it:
Updates unit tests to support multiple Kubelets per test case. For example, an IPv6 Kubelet, a dual-stack Kubelet, etc.. Currently, all Kubelet unit tests are based off an IPv4 Kubelet. Supporting multiple types of Kubelets in unit tests is required to reduce breakage while adding IPv6 features to Kubernetes.

Which issue this PR fixes
Partially fixes issue #46712. A future PR will be submitted that builds off this PR, adding an IPv6 Kubelet to the test cases.

Special notes for your reviewer:
In support of the larger effort to add IPv6 to Kubernetes identified in issue #1433

Release note:

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jun 9, 2017
@danehans
Copy link
Author

danehans commented Jun 9, 2017

/area ipv6

@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: danehans
We suggest the following additional approver: yujuhong

Assign the PR to them by writing /assign @yujuhong in a comment when ready.

Associated issue: 46712

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot k8s-github-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. release-note-none Denotes a PR that doesn't merit a release note. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jun 9, 2017
@yujuhong
Copy link
Contributor

Instead of creating multiple kubelet in one test function, why not adding another wrapper function so that the test can use a different, custom, kubelet it it wishes? Or is the intention to run all tests on all kind of kubelets eventually?

@danehans
Copy link
Author

@yujuhong thank you for reviewing my PR. My intention is to run all tests on multiple types of kubelets, starting with IPv4 and IPv6-based kubelets and eventually a dual-stack kubelet. This approach a) helps minimize regressions while adding IPv6 support and b) builds a foundation for additional concurrent, custom kubelet testing. However, I will follow your guidance if you feel a different approach is necessary. Please advise.

@yujuhong
Copy link
Contributor

yujuhong commented Jun 15, 2017

My intention is to run all tests on multiple types of kubelets, starting with IPv4 and IPv6-based kubelets and eventually a dual-stack kubelet.

Can you narrow down the code that'd be affected and tested? I don't expect changes like this to affect all unit tests in the package. Running all tests multiple times seem like a waste of resources...

@danehans
Copy link
Author

@yujuhong I can narrow down the code and only update tests with a second, IPv6-only Kubelet for tests with ties to the hostname, nodeName or host IP. With that said, this PR does not implement the second, IPv6-only Kubelet.

My intention is to submit a follow-on PR that adds the IPv6-only Kubelet and I will only update tests with ties to the Kubelet hostname, nodeName or host IP. I did not want to update tests with the second, IPv6-only Kubelet if you found this approach unacceptable. With this understanding, do you find the approach this PR takes acceptable?

@k8s-github-robot k8s-github-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jun 19, 2017
@k8s-github-robot k8s-github-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jun 23, 2017
@k8s-github-robot k8s-github-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 7, 2017
@danehans
Copy link
Author

danehans commented Jul 7, 2017

/test pull-kubernetes-unit

@danehans
Copy link
Author

danehans commented Jul 7, 2017

/test pull-kubernetes-federation-e2e-gce

@k8s-github-robot
Copy link

@danehans PR needs rebase

@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 25, 2017
@danehans
Copy link
Author

@yujuhong sig-network is planning to add IPv6 support for the 1.9 release. It would be nice to have IPv6 Kubelet test coverage in the release. I updated this PR in June based on your feedback. If I rebase the PR to address conflicts, will it be accepted? Just trying to avoid having to continually rebase :-)

@yujuhong
Copy link
Contributor

I still find creating multiple kubelets for every test and specifying an index inside the test tedious, unclear, and error-prone.
Could you create a newTestIPv6Kubelet() and only call it for the tests that need IPv6? It'd also be great to have the second commit that include the tests you want to add/change.

@danehans
Copy link
Author

@yujuhong sounds like a plan. I'll get to work on it.

@k8s-github-robot
Copy link

This PR hasn't been active in 61 days. It will be closed in 28 days (Dec 28, 2017).

cc @danehans @yujuhong

You can add 'keep-open' label to prevent this from happening, or add a comment to keep it open another 90 days

@yujuhong
Copy link
Contributor

yujuhong commented Jan 3, 2018

@danehans are you still working on the PR?

@danehans
Copy link
Author

danehans commented Jan 8, 2018

@yujuhong I am not. I will close the PR.

@danehans danehans closed this Jan 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ipv6 cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants