migtools / openshift-migration-plugin

Velero plugin to support migration of openshift workloads across clusters
Apache License 2.0
3 stars 9 forks source link

Always return the item in plugins unless there's an error #60

Closed sseago closed 4 years ago

sseago commented 4 years ago

When returning the unmodified item in the migration common restore plugin in the case of cluster-scoped resources, return the item rather than nil. Returning nil results in velero errors like this: error preparing customresourcedefinitions.apiextensions.k8s.io/foos.example.foo.com: rpc error: code = Aborted desc = plugin panicked: runtime error: invalid memory address or nil pointer dereference

dymurray commented 4 years ago

@Danil-Grigorev FYI this was a regression introduced with #58 . When we want a skip a resource we need to return the unmodified object instead of nil.