Skip to content

Commit d0f868b

Browse files
committed
fix: remove unnecessary call to mds service
1 parent 554f967 commit d0f868b

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

google/auth/compute_engine/credentials.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -87,25 +87,6 @@ def __init__(
8787
self._universe_domain = universe_domain
8888
self._universe_domain_cached = True
8989

90-
def _retrieve_info(self, request):
91-
"""Retrieve information about the service account.
92-
93-
Updates the scopes and retrieves the full service account email.
94-
95-
Args:
96-
request (google.auth.transport.Request): The object used to make
97-
HTTP requests.
98-
"""
99-
info = _metadata.get_service_account_info(
100-
request, service_account=self._service_account_email
101-
)
102-
103-
self._service_account_email = info["email"]
104-
105-
# Don't override scopes requested by the user.
106-
if self._scopes is None:
107-
self._scopes = info["scopes"]
108-
10990
def _metric_header_for_usage(self):
11091
return metrics.CRED_TYPE_SA_MDS
11192

@@ -123,7 +104,6 @@ def refresh(self, request):
123104
"""
124105
scopes = self._scopes if self._scopes is not None else self._default_scopes
125106
try:
126-
self._retrieve_info(request)
127107
self.token, self.expiry = _metadata.get_service_account_token(
128108
request, service_account=self._service_account_email, scopes=scopes
129109
)

0 commit comments

Comments
 (0)