fix: Add additional validation for timeout while retrieving headers (#14217)

pull/14221/head
Paul Rogers 2 years ago committed by GitHub
parent adf08ac32d
commit 8322e518e6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 5
      pkg/storage/chunk/client/gcp/gcs_object_client.go

@ -7,6 +7,7 @@ import (
"io"
"net"
"net/http"
"strings"
"time"
"cloud.google.com/go/storage"
@ -269,7 +270,9 @@ func (s *GCSObjectClient) IsStorageTimeoutErr(err error) bool {
// TODO(dannyk): move these out to be generic
// context errors are all client-side
if isContextErr(err) {
return false
// Go 1.23 changed the type of the error returned by the http client when a timeout occurs
// while waiting for headers. This is a server side timeout.
return strings.Contains(err.Error(), "Client.Timeout exceeded while awaiting header")
}
// connection misconfiguration, or writing on a closed connection

Loading…
Cancel
Save