From 3e0398ca98fcbb1933d3898b55baf20af0c4fc09 Mon Sep 17 00:00:00 2001 From: Daniel Stinson-Diess Date: Fri, 22 Mar 2024 16:47:46 -0500 Subject: [PATCH] fix(enrich_kv_store_set): default to 0 duration Documentation states that this is an optional parameter, but the initializing function will return an error if it's not set. > transform: enrich_kv_store_set: time: invalid duration "" --- transform/enrich_kv_store_set.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/transform/enrich_kv_store_set.go b/transform/enrich_kv_store_set.go index 396fc13b..7510fef3 100644 --- a/transform/enrich_kv_store_set.go +++ b/transform/enrich_kv_store_set.go @@ -89,6 +89,10 @@ func newEnrichKVStoreSet(_ context.Context, cfg config.Config) (*enrichKVStoreSe return nil, fmt.Errorf("transform: enrich_kv_store_set: %v", err) } + if conf.TTLOffset == "" { + conf.TTLOffset = "0s" + } + dur, err := time.ParseDuration(conf.TTLOffset) if err != nil { return nil, fmt.Errorf("transform: enrich_kv_store_set: %v", err)