Commit bfe3be26 authored by David Diederich's avatar David Diederich
Browse files

Merge branch 'cherry-pick-defe99a7' into 'release/0.11'

[Hotfix] Used Credentials instead of token (gcsgs lib requires either Credentials or path to SA file)

See merge request !14
parents 959891b7 c306dbe7
Pipeline #69855 passed with stage
in 38 seconds
......@@ -2,14 +2,9 @@ from typing import Optional
from osdu.core.api.storage.dask_storage_parameters import DaskStorageParameters
from osdu.core.api.storage.tenant import Tenant
from .blob_storage_gcp import GCloudAioStorage
async def get_dask_storage_parameters(tenant: Tenant, directory: Optional[str] = None) -> DaskStorageParameters:
gcp_store = GCloudAioStorage(service_account_file=tenant.credentials)
token = await gcp_store._get_access_token(tenant.project_id, tenant.bucket_name)
storage_options = {'token': token}
storage_options = {'token': tenant.credentials}
base_directory = f'{tenant.bucket_name}/{directory}' if directory else tenant.bucket_name
return DaskStorageParameters(protocol='gs',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment