From 6ea925eeb8d49c49394d37e6946a8fe7a758d24d Mon Sep 17 00:00:00 2001 From: Matt Toohey Date: Mon, 27 May 2024 16:33:07 +1000 Subject: [PATCH] fix conversion from proto to metadata --- backend/schema/protobuf_dec.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/backend/schema/protobuf_dec.go b/backend/schema/protobuf_dec.go index 9093403337..04ed761fe3 100644 --- a/backend/schema/protobuf_dec.go +++ b/backend/schema/protobuf_dec.go @@ -136,6 +136,19 @@ func metadataToSchema(s *schemapb.Metadata) Metadata { Alias: s.Alias.Alias, } + case *schemapb.Metadata_Retry: + var count *int + if s.Retry.Count != nil { + countValue := int(*s.Retry.Count) + count = &countValue + } + return &MetadataRetry{ + Pos: posFromProto(s.Retry.Pos), + Count: count, + MinBackoff: s.Retry.MinBackoff, + MaxBackoff: s.Retry.MaxBackoff, + } + default: panic(fmt.Sprintf("unhandled metadata type: %T", s)) }