Skip to content

Commit

Permalink
fix(enrich_kv_store_set): default to 0 duration
Browse files Browse the repository at this point in the history
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 ""
  • Loading branch information
shellcromancer committed Mar 22, 2024
1 parent 4f8288b commit 3e0398c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions transform/enrich_kv_store_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3e0398c

Please sign in to comment.