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

clean up LocalTrafficDetector construction / tests #124582

Merged
merged 6 commits into from Apr 28, 2024

Conversation

danwinship
Copy link
Contributor

What this PR does / why we need it:

More LocalTrafficDetector cleanup; this is basically part 2 of #124529, focusing on proxy construction and the associated unit tests.

I originally had done this as a single commit (along with parts of #124529) but it was impossible to figure out what was and wasn't changing in the unit tests so I split it up. But this is intended to merge with tide/merge-method-squash, and in particular, the middle parts are gofmt'ed incorrectly (and the first commit is empty because it's just there to provide the final commit message, and the last commit is separate from the second-to-last commit only because it makes the diffs clearer).

Does this PR introduce a user-facing change?

NONE

/kind cleanup
/label tide/merge-method-squash
/assign @tnqn

Also, only warn if the *primary* IP family is not correctly configured
(since we don't actually know if the cluster is really dual-stack or
not), and pass the pair of detectors to the proxiers as a map rather
than an array.
@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Apr 27, 2024
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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 needs-priority Indicates a PR lacks a `priority/foo` label and requires one. label Apr 27, 2024
@danwinship danwinship changed the title clean up LocalTrafficDetector tests clean up LocalTrafficDetector construction / tests Apr 27, 2024
@k8s-ci-robot k8s-ci-robot added area/ipvs area/kube-proxy sig/network Categorizes an issue or PR as relevant to SIG Network. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Apr 27, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: danwinship

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 27, 2024
@k8s-ci-robot
Copy link
Contributor

@danwinship: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-kubernetes-e2e-kind-cloud-provider-loadbalancer e782bd8 link false /test pull-kubernetes-e2e-kind-cloud-provider-loadbalancer

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.

Copy link
Member

@tnqn tnqn left a comment

Choose a reason for hiding this comment

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

Thanks for splitting up the commits and the detailed descriptions.
/lgtm

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

LGTM label has been added.

Git tree hash: a88dd147be2403bdfe99b3a8c4e36890d1b2af46

@k8s-ci-robot k8s-ci-robot merged commit f1f390f into kubernetes:master Apr 28, 2024
16 of 17 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.31 milestone Apr 28, 2024
@danwinship danwinship deleted the localtraffic-tests branch April 28, 2024 20:50
jingczhang pushed a commit to nokia/kubernetes that referenced this pull request May 7, 2024
* LocalTrafficDetector construction and test improvements

* Reorder getLocalDetector unit test fields so "input" args come before "output" args

* Don't pass DetectLocalMode as a separate arg to getLocalDetector

It's already part of `config`

* Clarify test names in preparation for merging

* Merge single-stack/dual-stack LocalTrafficDetector construction

Also, only warn if the *primary* IP family is not correctly configured
(since we don't actually know if the cluster is really dual-stack or
not), and pass the pair of detectors to the proxiers as a map rather
than an array.

* Remove the rest of Test_getDualStackLocalDetectorTuple
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. area/ipvs area/kube-proxy cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. release-note-none Denotes a PR that doesn't merit a release note. sig/network Categorizes an issue or PR as relevant to SIG Network. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants