-
Notifications
You must be signed in to change notification settings - Fork 993
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
[WIP] support more actions for volcano job failure scenario #3813
base: master
Are you sure you want to change the base?
Conversation
8206c69
to
dfb4a4f
Compare
dfb4a4f
to
fc3fa27
Compare
for podName, delayAct := range taskMap { | ||
shouldCancel := false | ||
|
||
if podName == req.PodName { |
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 use for key := range taskMap if key == xxx
rather than val, exists := taskMap[key]
?
} | ||
} | ||
} | ||
cc.delayActionMapLock.Unlock() |
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.
refactor into a function and unlock by defer
req.Namespace, req.JobName, err) | ||
} | ||
|
||
func (cc *jobcontroller) cleanupDelayActions(jobKey string, excludePod string) { |
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.
The parameter excludePod
can be misunderstood. Literally, it suggests "cleanup actions exclude this pod," but in reality, it merely skips the execution of the CancelFunc
.
Additionally, the CancelFunc
can be executed multiple times. So it is unnecessary to check it.
fc3fa27
to
b45b6c4
Compare
Signed-off-by: Box Zhang <wszwbsddbk@gmail.com>
b45b6c4
to
a09a6bb
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@bibibox: PR needs rebase. 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. |
Implement issue #3812
fix failed ci pipeline after the related pr at apis repo volcano-sh/apis#140 merged