Add Cloud Run Id worker sample - #219
Draft
seanbollin wants to merge 9 commits into
Draft
seanbollin wants to merge 9 commits into
seanbollin wants to merge 9 commits into
Conversation
Add a long-lived Temporal Worker sample for Google Cloud Run that uses the new Temporalio.Extensions.Gcp.CloudRun helper to derive the worker identity and a pinned Worker Deployment Version from Cloud Run metadata. It reads TEMPORAL_ADDRESS / TEMPORAL_NAMESPACE / TEMPORAL_TASK_QUEUE from the environment, registers a greeting workflow and activity, and polls until the container is stopped. The helper is unreleased, so the project temporarily references the SDK from a sibling sdk-dotnet checkout via ProjectReference; the README and csproj explain how to switch to the released package. This is why the PR is a draft. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Register a single CloudRunPlugin on TemporalClientConnectOptions.Plugins instead of calling the removed ApplyGoogleCloudRunDefaults* helpers. The plugin sets the client identity at connect time and pins the worker to the Cloud Run deployment version automatically. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Follows the sdk-dotnet rename: the Cloud Run worker-identity plugin is now WorkerIdPlugin (Cloud Run can host multiple Temporal plugins, so the generic CloudRunPlugin name is no longer used). Update the sample's registration, workflow comment, and README. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The Google Cloud Run worker-ID plugin moved from the root Temporalio.Extensions.Gcp.CloudRun project into a new Temporalio.Extensions.Gcp.CloudRun.WorkerId sibling. Update the project reference, the using directive, and the README to match. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Move src/CloudRunWorker to src/Gcp/CloudRun/WorkerId to mirror the sibling OpenTelemetry Cloud Run sample, and rename the project and namespace to TemporalioSamples.Gcp.CloudRun.WorkerId. Register the moved project in the solution and update the root README sample entry. Remove all Worker Deployment Versioning content (deployment name, build id, versioning behavior, pinned) from the code, comments, and README. The sample now only registers WorkerIdPlugin to set the worker identity from Cloud Run metadata, and logs GoogleCloudRunMetadata.WorkerIdentity. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ommitted local feed
seanbollin
force-pushed
the
cloud-run-worker-id
branch
from
September 18, 2026 17:46
c6ac449 to
d2b96bd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Runs a Temporal Worker on a Google Cloud Run worker pool using the Cloud Run Id plugin (
Temporalio.Extensions.Gcp.CloudRun.Id.CloudRunIdPlugin), which sets the Temporal client identity from Cloud Run instance metadata ({instanceId}@{revision}) so each instance is identifiable in Temporal.Deploy:
gcloud run worker-pools deploy "$WORKER_POOL" --image "$WORKER_IMAGE" --region "$REGION". Run:temporal workflow execute --task-queue cloud-run-worker-sample --type SampleWorkflow --input '"Cloud Run"'. See the sample README.The extension is unreleased on nuget.org, so it is restored from a committed
local-packages/feed until it ships.