Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add missing request builder
Browse files Browse the repository at this point in the history
dbalabka committed Sep 19, 2024

Unverified

The committer email address is not verified.
1 parent f3a7ca2 commit 75993df
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
@@ -626,9 +626,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"),
}
@@ -652,7 +654,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:

0 comments on commit 75993df

Please sign in to comment.