mirror of
https://github.com/rancher/steve.git
synced 2025-08-31 06:46:25 +00:00
Log and ignore transform errors. (#683)
This commit is contained in:
@@ -95,10 +95,14 @@ func (t *TransformBuilder) GetTransformFunc(gvk schema.GroupVersionKind, columns
|
||||
}
|
||||
// Conversions are run in this loop:
|
||||
for _, f := range converters {
|
||||
obj, err = f(obj)
|
||||
transformed, err := f(obj)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
// If we return an error here, the upstream k8s library will retry a transform, and we don't want that,
|
||||
// as it's likely to loop forever and the server will hang.
|
||||
// Instead, log this error and try the remaining transform functions
|
||||
logrus.Errorf("error in transform: %v", err)
|
||||
}
|
||||
obj = transformed
|
||||
}
|
||||
return obj, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user