From c7399c83078718046ef6ccf777b37e7f752e19b1 Mon Sep 17 00:00:00 2001 From: lucasgomide Date: Wed, 1 Jan 2025 15:55:46 -0300 Subject: [PATCH 1/2] feat: extends supported parameters to generate signed url The Blob.generate_signed_url method includes several parameters that are not supported by our implementation for generating signed URLs --- gcp_pilot/storage.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/gcp_pilot/storage.py b/gcp_pilot/storage.py index f96eba0..a8e4f8f 100644 --- a/gcp_pilot/storage.py +++ b/gcp_pilot/storage.py @@ -159,15 +159,20 @@ def get_download_url( blob_name: str, expiration: timedelta = timedelta(minutes=5), version: str = "v4", + method: str = "GET", + **kwargs, ): bucket = self.client.bucket(bucket_name) blob = bucket.blob(blob_name) + kwargs = kwargs | { + "service_account_email": self.service_account_email, + "access_token": self.token, + } return blob.generate_signed_url( version=version, expiration=expiration, - method="GET", - service_account_email=self.service_account_email, - access_token=self.token, + method=method, + **kwargs, ) From 5cc6a33385eaa7963a33541f577a01c3f2b26b58 Mon Sep 17 00:00:00 2001 From: lucasgomide Date: Wed, 1 Jan 2025 16:00:31 -0300 Subject: [PATCH 2/2] build: bump version --- pyproject.toml | 2 +- uv.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index e235c78..b9221a6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "gcp-pilot" -version = "1.31.0" +version = "1.32.0" description = "Google Cloud Platform Friendly Pilot" authors = [ {name = "Joao Daher", email = "joao@daher.dev"}, diff --git a/uv.lock b/uv.lock index a8c974a..5a8436f 100644 --- a/uv.lock +++ b/uv.lock @@ -230,7 +230,7 @@ wheels = [ [[package]] name = "gcp-pilot" -version = "1.31.0" +version = "1.32.0" source = { virtual = "." } dependencies = [ { name = "factory-boy" },