adityadtu5 commented on code in PR #1062:
URL: https://github.com/apache/yunikorn-k8shim/pull/1062#discussion_r3771634626


##########
pkg/cache/context.go:
##########
@@ -798,14 +797,6 @@ func (ctx *Context) bindPodVolumes(pod *v1.Pod) error {
                                        zap.Error(err))
                                return err
                        }
-                       if volumes.StaticBindings == nil {
-                               // convert nil to empty array
-                               volumes.StaticBindings = 
make([]*volumebinding.BindingInfo, 0)
-                       }
-                       if volumes.DynamicProvisions == nil {
-                               // convert nil to empty array
-                               volumes.DynamicProvisions = 
make([]*volumebinding.DynamicProvision, 0)
-                       }

Review Comment:
   Earlier I though it is redundant. But after checking these failing tests, it 
seems that volume binder plugin returns error in case if staticBindings or 
DynamicProvisions are nil. Adding them back.



-- 
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]

Reply via email to