storage: Loading creds during NewClient breaks application without default creds #4980
Labels
api: storage
Issues related to the Cloud Storage API.
priority: p1
Important issue which blocks shipping the next release. Will be fixed prior to next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Client
storage
Environment
Self-hosted CI (not on GCE)
Go Environment
$ go version
go 1.16
Code
Expected behavior
Init with success.
Actual behavior
Output error:
Additional context
We met this error during our depandabot upgrade from 1.17 to 1.18: beyondstorage/go-service-gcs#80
Our failed build log: https://teamcity.beyondstorage.io/buildConfiguration/Services_Gcs_IntegrationTests/934?showLog=934_67_67
This problem is introduced by #4604:
google-cloud-go/storage/storage.go
Lines 134 to 140 in 0f7457c
Do we have a better solution to handle the situation when user doesn't pass credential during
storage.NewClient
?The text was updated successfully, but these errors were encountered: