Discard events when Kas fails to send
Discard events when Kas fails to send them after reply attempts. This is to avoid sending events indefinitely and prevent causing issues from Gitlab monolith by sending too many events at once.
Notes about current retry settings:
- Currently, Kas creates the gitlab client with retry config. (client_options.go#L89) It uses the
go-retryablehttp
package'sDefaultBackoff
. (client.go#L546-L547) - Current configs will retry 4 times. (client_options.go#L22-24)
defaultRetryWaitMin = 100 * time.Millisecond
defaultRetryWaitMax = 30 * time.Second
defaultRetryMax = 4
So, after the first failure, it will retry after 100ms
, next after 200ms
, next after 400ms
, lastly after 800ms
.
Closes #515 (closed).
Edited by Taka Nishida