mirror of
https://github.com/rancher/steve.git
synced 2025-09-02 16:05:42 +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:
|
// Conversions are run in this loop:
|
||||||
for _, f := range converters {
|
for _, f := range converters {
|
||||||
obj, err = f(obj)
|
transformed, err := f(obj)
|
||||||
if err != nil {
|
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
|
return obj, nil
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user