Storage: raise errors when timestamps cannot be parsed (#79405)

* raise errors when timestamps cannot be parsed

* return partial origin info if timestamp parsing fails
This commit is contained in:
Dan Cech
2023-12-12 15:55:10 -05:00
committed by GitHub
parent aa63e91a43
commit 0c1d1c6b6e
3 changed files with 48 additions and 36 deletions
+1 -1
View File
@@ -123,7 +123,7 @@ func getLegacyID(item *unstructured.Unstructured) int64 {
meta := kinds.GrafanaResourceMetadata{
Annotations: item.GetAnnotations(),
}
info := meta.GetOriginInfo()
info, _ := meta.GetOriginInfo()
if info != nil && info.Name == "SQL" {
i, err := strconv.ParseInt(info.Key, 10, 64)
if err == nil {