-
Notifications
You must be signed in to change notification settings - Fork 977
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
Lint:fix lints #841
Lint:fix lints #841
Conversation
Welcome @Thor-wl! |
Travis tests have failedHey @Thor-wl, TravisBuddy Request Identifier: a94101b0-a18a-11ea-b485-534d9f3e4954 |
Travis tests have failedHey @Thor-wl, TravisBuddy Request Identifier: c40b4690-a18f-11ea-b485-534d9f3e4954 |
if err := setConfigDefaults(&config); err != nil { | ||
return nil, err | ||
} | ||
setConfigDefaults(&config) |
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.
those are generated code, so please do not modify them.
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.
done
Travis tests have failedHey @Thor-wl, TravisBuddy Request Identifier: e51900b0-a217-11ea-a8e9-e7e13745aead |
@@ -50,7 +50,7 @@ func (ra *Action) Execute(ssn *framework.Session) { | |||
klog.V(3).Infof("There are <%d> Jobs and <%d> Queues in total for scheduling.", | |||
len(ssn.Jobs), len(ssn.Queues)) | |||
|
|||
var underRequest []*api.JobInfo | |||
// var underRequest []*api.JobInfo |
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 remove 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.
It is useless
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.
useless variable has been already deleted
if sc.Nodes[node.Name] != nil { | ||
sc.Nodes[node.Name].SetNode(node) | ||
} else { | ||
sc.Nodes[node.Name] = schedulingapi.NewNodeInfo(node) | ||
} | ||
|
||
return nil |
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.
let's keep 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.
recoveried
klog.Errorf("Failed to add node %s into cache: %v", node.Name, err) | ||
return | ||
} | ||
sc.addNode(node) |
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.
let's keep oldNode, if not used, try _
.
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.
recoveried
please do not change the signature of function in this PR. |
Travis tests have failedHey @Thor-wl, TravisBuddy Request Identifier: 3248f300-a226-11ea-a8e9-e7e13745aead |
Signed-off-by: Thor <[email protected]>
.golangci.yml
Outdated
linters-settings: | ||
lll: | ||
line-length: 256 | ||
funlen: |
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 we can disable this check. In the following pr, we need to first enable that with high priority.
As to the priority, If we have no enough time to analyze I suggest looking at https://github.com/istio/istio/blob/494aca43715d2f970bdb76ce1dfcc5e1095f3070/common/config/.golangci.yml#L34-L53
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.
OK
} | ||
|
||
if len(job.TaskStatusIndex[api.Pending]) != 0 { | ||
if _, found := preemptorsMap[job.Queue]; !found { | ||
preemptorsMap[job.Queue] = util.NewPriorityQueue(ssn.JobOrderFn) | ||
} | ||
preemptorsMap[job.Queue].Push(job) | ||
underRequest = append(underRequest, job) | ||
// underRequest = append(underRequest, job) |
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.
please remove directly
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.
done
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.
/lgtm
please address the minor comments in the following pr
Signed-off-by: Thor <[email protected]>
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hzxuzhonghu, k82cn, Thor-wl 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 |
Try to address issue #791