We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 49c12f7 commit ac6f914Copy full SHA for ac6f914
1 file changed
metaflow/plugins/gcp/gs_storage_client_factory.py
@@ -14,9 +14,14 @@ def _get_gs_storage_client_default():
14
from google.cloud import storage
15
16
if os.environ.get("STORAGE_EMULATOR_HOST"):
17
- # Emulator mode: anonymous client, no real GCP credentials needed.
18
- # google-cloud-storage routes requests to STORAGE_EMULATOR_HOST automatically.
19
- _client_cache[cache_key] = storage.Client()
+ # Emulator mode: supply AnonymousCredentials explicitly so
+ # google-cloud-storage never calls google.auth.default(), which
+ # raises DefaultCredentialsError in CI environments with no ADC.
20
+ from google.auth.credentials import AnonymousCredentials
21
+
22
+ _client_cache[cache_key] = storage.Client(
23
+ credentials=AnonymousCredentials(), project="test"
24
+ )
25
else:
26
import google.auth
27
0 commit comments