-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Enable golinting for scheduler packages. #58437
Enable golinting for scheduler packages. #58437
Conversation
/ok-to-test |
@tossmilestone Could you rebase your commits into two? Commit 1. Enable golint for |
@resouer updated, PTAL! |
d8df122
to
1df1402
Compare
ab7065f
to
2751ccf
Compare
@@ -53,9 +53,9 @@ func TestMakeTransportValid(t *testing.T) { | |||
EnableHttps: true, | |||
TLSClientConfig: restclient.TLSClientConfig{ | |||
CertFile: "../../client/testdata/mycertvalid.cer", | |||
// TLS Configuration, only applies if EnableHttps is true. | |||
// TLS Configuration, only applies if EnableHTTPs is true. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EnableHttps
is the flag here at 2751ccf#diff-00db4807093c02bb99fd7c3c4d9f5bc5L53, so need for this change I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it should be not changed.
// TaintNodeNotReady would be automatically added by node controller | ||
// when node is not ready, and removed when node becomes ready. | ||
// TaintNodeNotReady would be automatically added by node controller, | ||
// when feature-gate for TaintBasedEvictions=true flag is enabled |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably TaintBasedEvictions flag is enabled
// TaintNodeUnreachable would be automatically added by node controller | ||
// when node becomes unreachable (corresponding to NodeReady status ConditionUnknown) | ||
// when feature-gate for TaintBasedEvictions=true flag is enabled and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think for sake of consistency we can start with TaintNodeUnreachable will be added when node becomes..
pkg/scheduler/testing/fake_lister.go
Outdated
@@ -25,11 +25,11 @@ import ( | |||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | |||
"k8s.io/apimachinery/pkg/labels" | |||
corelisters "k8s.io/client-go/listers/core/v1" | |||
. "k8s.io/kubernetes/pkg/scheduler/algorithm" | |||
algo "k8s.io/kubernetes/pkg/scheduler/algorithm" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Probably algorithm
may be a better name.
Thanks @tossmilestone for working on this!! Just some minor nits, rest look good to me. I will let @k82cn and @resouer to provide their feedback before merge. |
@ravisantoshgudimetla Thanks a lot for your review on so many changes! I will fix the errors soon. |
/test pull-kubernetes-e2e-kops-aws |
@@ -451,7 +456,7 @@ func podFitsOnNode( | |||
// TODO(bsalamat): consider using eCache and adding proper eCache invalidations | |||
// when pods are nominated or their nominations change. | |||
eCacheAvailable = eCacheAvailable && !podsAdded | |||
for _, predicateKey := range predicates.PredicatesOrdering() { | |||
for _, predicateKey := range predicates.Ordering() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why change this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because PredicatesOrdering
caused the error:
pkg/scheduler/algorithm/predicates/predicates.go:152:6: func name will be used as predicates.PredicatesOrdering by other packages, and that stutters; consider calling this Ordering
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we touch any code about PredicatesOrdering
? Not sure why it works before but failed in this PR :(.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found the code about renaming.
/lgtm /assign @k82cn |
ffa8882
to
72e0be5
Compare
745d3aa
to
3a1c9e3
Compare
/unassign @pwittrock |
/assign @liggitt |
00cf4e3
to
86effd7
Compare
@liggitt please help to review the PR if you are free, thanks! 😄 |
looks like the only thing that still requires approval is the hack dir change enabling linting on those folders. that looks fine, but the PR needs a squash before merge (still has several merge commits present) |
050fdbf
to
5ba0442
Compare
@liggitt commits have been squashed, please take a look 😄 |
5ba0442
to
3fdacfe
Compare
/retest |
/approve |
@ravisantoshgudimetla needs your lgtm to merge the PR 😄 |
/lgtm Thanks again @tossmilestone for working on this issue. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: k82cn, liggitt, ravisantoshgudimetla, tossmilestone 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 OWNERS Files:
Approvers can indicate their approval by writing |
/test all [submit-queue is verifying that this PR is safe to merge] |
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here. |
What this PR does / why we need it:
Enable golinting for scheduler packages
Which issue(s) this PR fixes:
Fixes #58234
Special notes for your reviewer:
pkg/scheduler/api
andpkg/scheduler/api/v1
are not removed fromhack/.golint_failures
, because there are auto-generated go files bydeepcopy-gen
in the package, which have golint errors and are not suggested manually edited.Release note: