Skip to content

COM-132: Add GCP Cloud Run support to worker deployment version command#1103

Open
gcristea-temporal wants to merge 2 commits into
mainfrom
feature/gcp_cloud_run
Open

COM-132: Add GCP Cloud Run support to worker deployment version command#1103
gcristea-temporal wants to merge 2 commits into
mainfrom
feature/gcp_cloud_run

Conversation

@gcristea-temporal

@gcristea-temporal gcristea-temporal commented Jun 29, 2026

Copy link
Copy Markdown

Mirror the AWS Lambda support: four --gcp-cloud-run-* flags on create-version and update-version-compute-config, writing a gcp-cloud-run ComputeConfig provider.

Related issues

What changed?

Add GCP Cloud Run worker pools as a compute provider

Lets an operator point a Worker Deployment Version at a GCP Cloud Run worker pool, mirroring the existing AWS Lambda support 1:1. CLI-only — serializes the four detail keys WCI reads (project, region, worker_pool, service_account)

  temporal worker deployment create-version \                                                        
      --deployment-name YourDeployment --build-id YourBuildID \  
      --gcp-cloud-run-project YourProject \
      --gcp-cloud-run-region us-central1 \
      --gcp-cloud-run-worker-pool YourWorkerPool \
      --gcp-cloud-run-service-account customer-sa@proj.iam.gserviceaccount.com                                                                                         

Changes

  • commands.yaml / commands.gen.go: four --gcp-cloud-run-* flags on
    create-version and update-version-compute-config, plus usage examples.
  • commands.worker.deployment.go: GCP validate/payload helpers and a
    shared computeProviderConfig selector that enforces AWS/GCP mutual
    exclusivity and dispatches on the trigger flag. Both run methods rewired.
  • tests: GCP validation + mutual-exclusivity cases folded into
    TestCreateWorkerDeploymentVersion_Errors; a skipped round-trip test
    mirrors the Lambda one (needs real GCP fixtures).

Checklist

Stability

  • Breaking changes are marked with 💥 in the PR title and release notes
  • Changes to JSON output (-o json / -o jsonl) are treated as breaking changes

Design

  • This feature does not depend on Cloud-only APIs or behavior (it works against an OSS server)
  • New commands follow temporal <noun> <verb> structure (e.g. temporal workflow start)
  • New flags are named after the API concept, not the implementation mechanism (good: --search-attribute, bad: --index-field)
  • New flags don't duplicate an existing flag that serves the same purpose
  • New flags do not have short aliases without strong justification
  • Experimental features are marked with (Experimental) in commands.yaml

Help text (see style guide at the top of commands.yaml)

  • All flags shown in help text and examples are implemented and functional
  • Summaries use sentence case and have no trailing period
  • Long descriptions end with a period and include at least one example invocation
  • Examples use long flags (--namespace, not -n), one flag per line
  • Placeholder values use YourXxx form (YourWorkflowId, YourNamespace)

Behavior

  • Results go to stdout; errors and warnings go to stderr
  • Error messages are lowercase with no trailing punctuation

Tests

  • Added functional test(s) (SharedServerSuite)
  • Added unit test(s) (func TestXxx) where applicable

Manual tests

Setup

./temporal --profile "ns-cloud-run-test" worker deployment create-version \
    --deployment-name "cloud-run-deployment" \
    --build-id "1.0" \
    --gcp-cloud-run-project "compute-team-sandbox" \
    --gcp-cloud-run-region "us-west1" \
    --gcp-cloud-run-worker-pool "omes-worker-pool" \
    --gcp-cloud-run-service-account "wci-invocation-sa@compute-team-sandbox.iam.gserviceaccount.com"
Successfully created worker deployment version

Happy path

./temporal --profile "ns-cloud-run-test" worker deployment describe-version \
      --deployment-name "cloud-run-deployment" \
      --build-id "1.0"
Worker Deployment Version:
  DeploymentName        cloud-run-deployment
  BuildID               1.0
  CreateTime            2 minutes ago
  RoutingChangedTime    a long while ago
  CurrentSinceTime      a long while ago
  RampingSinceTime      a long while ago
  RampPercentage        0
  ComputeConfigSummary  gcp-cloud-run

Error case

./temporal --profile "ns-cloud-run-test" worker deployment create-version \   
    --deployment-name "cloud-run-deployment" \  
    --build-id "1.0" \
    --gcp-cloud-run-project "compute-team-sandbox" \
    --gcp-cloud-run-region "us-west1" \
    --gcp-cloud-run-worker-pool "fake-omes-worker-pool" \
    --gcp-cloud-run-service-account "wci-invocation-sa@compute-team-sandbox.iam.gserviceaccount.com"
Error: error creating worker deployment version: Worker Deployment Version "cloud-run-deployment.1.0" already exists

./temporal --profile "ns-cloud-run-test" worker deployment create-version \
    --deployment-name "cloud-run-deployment" \
    --build-id "2.0" \
    --gcp-cloud-run-project "compute-team-sandbox" \
    --gcp-cloud-run-region "us-west1" \
    --gcp-cloud-run-worker-pool "fake-omes-worker-pool" \
    --gcp-cloud-run-service-account "wci-invocation-sa@compute-team-sandbox.iam.gserviceaccount.com"
Error: error creating worker deployment version: default: worker pool "projects/compute-team-sandbox/locations/us-west1/workerPools/fake-omes-worker-pool" not found: rpc error: code = NotFound desc = Resource 'fake-omes-worker-pool' of kind 'WORKER_POOL' in region 'us-west1' in project 'compute-team-sandbox' does not exist.

Composition

$ temporal <command-one> ...
$ temporal <command-two> --flag <value-from-above>
<expected output>

@CLAassistant

CLAassistant commented Jun 29, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

…ion commands

Mirror the AWS Lambda support: four --gcp-cloud-run-* flags on create-version and update-version-compute-config, writing a gcp-cloud-run ComputeConfig provider.
@gcristea-temporal gcristea-temporal marked this pull request as ready for review July 9, 2026 03:14
@gcristea-temporal gcristea-temporal requested a review from a team as a code owner July 9, 2026 03:14
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