-
Notifications
You must be signed in to change notification settings - Fork 1k
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
fix nil pointer in jobCache.update #2420
fix nil pointer in jobCache.update #2420
Conversation
Signed-off-by: Qiuyu Wu <qiuyu.wu@shopee.com>
488c7b0
to
f16976d
Compare
if oldResourceversion, err = strconv.ParseUint(job.Job.ResourceVersion, 10, 64); err != nil { | ||
return fmt.Errorf("failed to parase job <%v> resource version <%s>", key, job.Job.ResourceVersion) | ||
} | ||
if job.Job != 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.
When does job.Job=nil in update, i can see we set job.Job in Add callback
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.
as I mentioned in #2417, when we delete vj, it triggers deleteJob() in informer of volcano-job-controller, deleteJob() calls cc.cache.Delete(job) which set jobInfo.Job = nil in L182 pkg/controllers/cache/cache.go
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hzxuzhonghu, 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 |
@Akiqqqqqqq Thanks for the fix. Can you also submit the fix to branch |
sure~ |
there is no such issue in 1.5 and 1.4, so I only submit the fix to 1.6 |
Signed-off-by: Qiuyu Wu qiuyu.wu@shopee.com
fix: #2417