Skip to content

Commit

Permalink
Add missing request builder
Browse files Browse the repository at this point in the history
  • Loading branch information
dbalabka committed Sep 19, 2024
1 parent 3c5a3f4 commit b6261f1
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions dask_cloudprovider/gcp/instances.py
Original file line number Diff line number Diff line change
Expand Up @@ -629,9 +629,11 @@ def __init__(
"gpu_instance": self.gpu_instance,
"bootstrap": self.bootstrap,
"auto_shutdown": self.auto_shutdown,
"preemptible": preemptible
if preemptible is not None
else self.config.get("preemptible"),
"preemptible": (
preemptible
if preemptible is not None
else self.config.get("preemptible")
),
"instance_labels": instance_labels or self.config.get("instance_labels"),
"service_account": service_account or self.config.get("service_account"),
}
Expand Down Expand Up @@ -671,7 +673,12 @@ def refresh_client(self):
credentials, _ = google.auth.default()

# Use the credentials to build a service client
return googleapiclient.discovery.build("compute", "v1", credentials=credentials)
return googleapiclient.discovery.build(
"compute",
"v1",
credentials=credentials,
requestBuilder=build_request(credentials),
)

def instances(self):
try:
Expand Down

0 comments on commit b6261f1

Please sign in to comment.