Skip to content

extstore gcs driver#2130

Open
cconstable wants to merge 3 commits into
mainfrom
extstore-gcs-driver
Open

extstore gcs driver#2130
cconstable wants to merge 3 commits into
mainfrom
extstore-gcs-driver

Conversation

@cconstable

@cconstable cconstable commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

What changed?

  • Adds the built-in GCS driver for External Storage.
  • @temporalio/external-storage-gcs: GcsStorageDriver + GcsStorageDriverClient interface, no Google SDK
    dependency.
  • @temporalio/external-storage-gcs-google-sdk: GoogleCloudGcsStorageDriverClient, backed by
    @google-cloud/storage (peer dep).
  • @experimental and both packages private (unpublished)

Why?

  • extstore GA

Checklist

  • New tests for both packages.

@cconstable cconstable requested a review from a team as a code owner June 18, 2026 16:19
@@ -0,0 +1,53 @@
{
"name": "@temporalio/external-storage-gcs-google-sdk",
"version": "1.18.1",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is locked to whatever sdk-ts is regardless of what is put here

{
"name": "@temporalio/external-storage-gcs-google-sdk",
"version": "1.18.1",
"private": true,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prevents npm publish from exposing these until extstore is released. we'll want to flip this later.

Comment on lines +110 to +115
async function allSettledOrThrow<T>(tasks: Promise<T>[]): Promise<T[]> {
const results = await Promise.allSettled(tasks);
const rejected = results.find((r): r is PromiseRejectedResult => r.status === 'rejected');
if (rejected) throw rejected.reason;
return (results as PromiseFulfilledResult<T>[]).map((r) => r.value);
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

n.b.

  • S3 driver's runAllWithAbortOnError is concurrent and cancels in-flight sibling requests on the first failure (AWS SDK allows for cancelling mid-request).
  • GCS driver's allSettledOrThrow is concurrent but doesn't attempt mid-flight cancellation. @google-cloud/storage can't cancel an in-flight request. Abort in GCS is only check up-front.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the note, helpful 👍

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Open to better names here too. These functions have the same "await all tasks" shape but they behave a little differently

Comment thread contrib/external-storage-gcs/src/driver.ts
Comment thread contrib/external-storage-gcs/src/driver.ts Outdated
Comment thread contrib/external-storage-gcs/src/driver.ts
Comment thread contrib/external-storage-gcs/src/driver.ts Outdated
Comment thread contrib/external-storage-gcs/src/__tests__/test-driver.ts
Comment thread contrib/external-storage-gcs/README.md
@cconstable cconstable force-pushed the extstore-gcs-driver branch from f45bcd7 to c87aad4 Compare June 25, 2026 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants