Skip to content

Add Go GCS external storage driver snippet - #866

Merged
lennessyy merged 2 commits into
mainfrom
docs/external-storage-snippets-go-gcs
Aug 13, 2026
Merged

Add Go GCS external storage driver snippet#866
lennessyy merged 2 commits into
mainfrom
docs/external-storage-snippets-go-gcs

Conversation

@lennessyy

@lennessyy lennessyy commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

What

Adds features/snippets/external_storage/gcs_setup/gcs_driver_create.go, exposing the go-gcs-driver-create region consumed by the Go External Storage docs page. Layout mirrors the existing s3_setup snippets (package gcssetup, function returning a converter.StorageDriver).

Docs PR that consumes it: temporalio/documentation#5101.

Adds the driver-creation snippet for the Google Cloud Storage external
storage driver, matching the existing s3_setup layout. The region
go-gcs-driver-create is consumed by the Go External Storage docs page.

The snippet is the code I ran end to end against a real GCS bucket: a
3 MiB payload round-tripped through a Workflow and Activity intact,
and the Event History carried an ExternalStorageReference rather than
the payload data.

go.temporal.io/sdk/contrib/gcp/gcsdriver has no release tag yet, so
both it and its gcssdk companion are pinned to a pseudo-version at
sdk-go main. Those modules declare go 1.25.4, which raises this
module's go directive from 1.24.0 to match. The repository root module
is already at 1.25.4.
Reverts features/go.mod and features/go.sum to main, leaving only the
snippet file on this branch.

The dependency work has to be redone at tag time anyway: the two
pseudo-version pins become real versions, the go directive lands
wherever the tagged modules declare, and the transitive tree resolves
differently. Carrying a throwaway version of it here only forces a
premature decision about raising this module's Go floor to 1.25.4.

The consequence is that the gcs_setup package does not compile on this
branch, because gcsdriver, gcssdk, and cloud.google.com/go/storage are
absent from go.mod. That is expected until the tag lands.
@lennessyy
lennessyy marked this pull request as ready for review August 13, 2026 18:03
@lennessyy
lennessyy requested review from a team as code owners August 13, 2026 18:03
@lennessyy
lennessyy merged commit e2b3d7f into main Aug 13, 2026
26 checks passed
@lennessyy
lennessyy deleted the docs/external-storage-snippets-go-gcs branch August 13, 2026 20:33
lennessyy added a commit to temporalio/documentation that referenced this pull request Aug 13, 2026
temporalio/features#866 merged, so the go-gcs-driver-create region now
exists upstream. Replaces the hand-written GCS code block with a
Snipsync wrapper, which adds the source link and keeps the sample tied
to code the features repo builds.

Also names the processes that need bucket credentials, rather than
saying "components": the Client and the Workers each reach the bucket
directly. Points at the Amazon S3 and Cloud Storage access control
documentation for granting that access.
lennessyy added a commit to temporalio/documentation that referenced this pull request Aug 13, 2026
* docs: add Google Cloud Storage setup to Go External Storage

Adds GCS alongside Amazon S3 on the Go External Storage page, mirroring
the structure of the TypeScript page. The setup section now uses tabs
with the shared `external-storage-backend` group id so the backend
choice follows the reader across SDK pages.

Also corrects the shared post-setup prose, which described only the S3
driver. Both drivers use content-addressable SHA-256 keys, deduplicate
within a Namespace and Workflow, verify the hash on retrieve, and
enforce a 50 MiB `MaxPayloadSize` default. Adds the read-permission
prerequisite, since both drivers check for an existing object before
uploading.

Details verified against contrib/gcp/gcsdriver in sdk-go.

* docs: clarify when the storage drivers reuse an object

Verified the GCS driver end to end against a real bucket: a 3 MiB
payload round-tripped intact, the Event History carried an
ExternalStorageReference instead of the data, and the object keys
matched the documented structure.

That test showed the earlier dedup wording was wrong. It claimed
identical payloads within a Namespace and Workflow are stored once,
but the object key also includes the Run ID, so the same bytes in a
different Run are stored again. Reworded to state which boundaries
share an object and which do not.

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* docs: source the GCS snippet from Snipsync and clarify credentials

temporalio/features#866 merged, so the go-gcs-driver-create region now
exists upstream. Replaces the hand-written GCS code block with a
Snipsync wrapper, which adds the source link and keeps the sample tied
to code the features repo builds.

Also names the processes that need bucket credentials, rather than
saying "components": the Client and the Workers each reach the bucket
directly. Points at the Amazon S3 and Cloud Storage access control
documentation for granting that access.

* docs: rewrap the object key paragraph after the identifier fix

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.

2 participants