From be97ae4c5d6f79da250632264602997d7c4f2e86 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Fri, 21 Jun 2024 22:26:45 -0700 Subject: [PATCH] fix: gcs tier going offline due to customer HTTPclient (#19973) specifying customer HTTP client makes the gcs SDK ignore the passed credentials, instead let the GCS SDK manage the transport. this PR fixes #19922 a regression from #19565 --- cmd/warm-backend-gcs.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/cmd/warm-backend-gcs.go b/cmd/warm-backend-gcs.go index 029c2550b..3246fd1c8 100644 --- a/cmd/warm-backend-gcs.go +++ b/cmd/warm-backend-gcs.go @@ -22,7 +22,6 @@ import ( "errors" "fmt" "io" - "net/http" "cloud.google.com/go/storage" "github.com/minio/madmin-go/v3" @@ -118,14 +117,9 @@ func newWarmBackendGCS(conf madmin.TierGCS, tier string) (*warmBackendGCS, error return nil, err } - clnt := &http.Client{ - Transport: globalRemoteTargetTransport, - } - client, err := storage.NewClient(context.Background(), option.WithCredentialsJSON(credsJSON), option.WithScopes(storage.ScopeReadWrite), - option.WithHTTPClient(clnt), option.WithUserAgent(fmt.Sprintf("gcs-tier-%s", tier)+SlashSeparator+ReleaseTag), ) if err != nil {