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
Remove some unused functions #111628
Remove some unused functions #111628
Conversation
@thockin: This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The 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. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: thockin 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 |
why the linter Line 28 in ea21947
it seems there is a private copy here kubernetes/staging/src/k8s.io/component-helpers/scheduling/corev1/nodeaffinity/nodeaffinity.go Lines 203 to 205 in ea21947
|
/lgtm double checked $ grep -r NodeSelectorRequirementsAsSelector
pkg/apis/core/helper/helpers_test.go:func TestNodeSelectorRequirementsAsSelector(t *testing.T) {
pkg/apis/core/helper/helpers_test.go: out, err := NodeSelectorRequirementsAsSelector(tc.in)
pkg/apis/core/helper/helpers.go:// NodeSelectorRequirementsAsSelector converts the []NodeSelectorRequirement core type into a struct that implements
pkg/apis/core/helper/helpers.go:func NodeSelectorRequirementsAsSelector(nsm []core.NodeSelectorRequirement) (labels.Selector, error) {
staging/src/k8s.io/component-helpers/scheduling/corev1/nodeaffinity/nodeaffinity_test.go:func TestNodeSelectorRequirementsAsSelector(t *testing.T) {
$ grep -r NodeSelectorRequirementsAsFieldSelector
pkg/apis/core/helper/helpers.go:// NodeSelectorRequirementsAsFieldSelector converts the []NodeSelectorRequirement core type into a struct that implements
pkg/apis/core/helper/helpers.go:func NodeSelectorRequirementsAsFieldSelector(nsm []core.NodeSelectorRequirement) (fields.Selector, error) { |
Let me try to explain, I'm not very familiar with https://github.com/dominikh/go-tools, please correct me if I'm wrong.
Because this pr deleted function is an exported function. The linter
There is something not quite the same, at least one more function parameter in private copy.
Through my quick search, there doesn't seem to be such a tool readily available at the moment. BTW, are we sure we don't guarantee the compatibility of the exported functions in the non-staging folder? |
non-staging is effectively internal and we DO NOT make API guarantees there. We just can't. |
It would be nice to have a tool that found "likely candidates" and let humans verify later. |
Create #111666 for discussion |
We really should have a tool that check for this on internal (unsupported for external users, not staging/...) pkgs.
I found these by accident - I guarantee there are more.
/kind cleanup