CloudWatch Logs: Add retry strategy for hitting max concurrent queries (#39290)

* Add error passing and retry strategy

* Change generic error to specific one

* Make the error more generic

* Refactor retry strategy

* Add retry that handles multiple queries

* Rollback some backend changes

* Remove simple retry strategy

* Add comments

* Add tests

* Small test fixes

* Add log timeout config

* Fix tests

* Fix tests

* Add validation

* Remove commented code and add comment

* Fix snapshots

* Remove unnecessary cast
This commit is contained in:
Andrej Ocenas
2021-11-17 21:46:13 +01:00
committed by GitHub
parent 3dd73387fa
commit e237ff20a9
10 changed files with 659 additions and 58 deletions

View File

@@ -3,7 +3,6 @@ package cloudwatch
import (
"context"
"encoding/json"
"fmt"
"testing"
"time"
@@ -285,7 +284,7 @@ func TestQuery_StartQuery(t *testing.T) {
})
require.Error(t, err)
assert.Equal(t, fmt.Errorf("invalid time range: start time must be before end time"), err)
assert.Contains(t, err.Error(), "invalid time range: start time must be before end time")
})
t.Run("valid time range", func(t *testing.T) {