craigcondit commented on code in PR #810:
URL: https://github.com/apache/yunikorn-k8shim/pull/810#discussion_r1548178860
##########
pkg/cache/context.go:
##########
@@ -792,45 +792,54 @@ func (ctx *Context) AssumePod(name string, node string)
error {
// assume pod volumes before assuming the pod
// this will update scheduler cache with essential
PV/PVC binding info
var allBound = true
- // volume builder might be null in UTs
- if ctx.apiProvider.GetAPIs().VolumeBinder != nil {
- var err error
- // retrieve the volume claims
- podVolumeClaims, err :=
ctx.apiProvider.GetAPIs().VolumeBinder.GetPodVolumeClaims(ctx.klogger, pod)
- if err != nil {
- log.Log(log.ShimContext).Error("Failed
to get pod volume claims",
- zap.String("podName",
assumedPod.Name),
- zap.Error(err))
- return err
- }
+ task := ctx.getTask(applicationID, name)
+ if task == nil {
+ log.Log(log.ShimContext).Error("BUG: task not
found", zap.String("taskID", name))
Review Comment:
I don't think this would necessarily indicate a bug. The task could have
been removed asynchronously while we're running - should probably log as a
warning.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]