-
Notifications
You must be signed in to change notification settings - Fork 998
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
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]
?
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.
updated
} | ||
} | ||
} | ||
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
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.
updated
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.
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.
updated
b45b6c4
to
a09a6bb
Compare
a09a6bb
to
fd4f3b0
Compare
ca96c2b
to
60aa5f1
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 |
5baff31
to
573b09a
Compare
Signed-off-by: Box Zhang <[email protected]>
573b09a
to
af5dbf7
Compare
Implement issue #3812
fix failed ci pipeline after the related pr at apis repo volcano-sh/apis#140 merged