Skip to content

Commit

Permalink
Use default send after for empty string (#7683) (#5460)
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Apr 11, 2023
1 parent ab40b17 commit 1813abd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .changelog/7683.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
all: fixed an error resulting from leaving `provider.batching.send_after` unspecified and `provider.batching` specified
```
2 changes: 1 addition & 1 deletion google-beta/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -1256,7 +1256,7 @@ func ExpandProviderBatchingConfig(v interface{}) (*batchingConfig, error) {
}

cfgV := ls[0].(map[string]interface{})
if sendAfterV, ok := cfgV["send_after"]; ok {
if sendAfterV, ok := cfgV["send_after"]; ok && sendAfterV != "" {
SendAfter, err := time.ParseDuration(sendAfterV.(string))
if err != nil {
return nil, fmt.Errorf("unable to parse duration from 'send_after' value %q", sendAfterV)
Expand Down

0 comments on commit 1813abd

Please sign in to comment.