Skip to content

feat(deployments): simplify create worker deployment UX#3518

Merged
rossnelson merged 6 commits into
mainfrom
dt-4089
Jun 12, 2026
Merged

feat(deployments): simplify create worker deployment UX#3518
rossnelson merged 6 commits into
mainfrom
dt-4089

Conversation

@rossnelson

@rossnelson rossnelson commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Redesigns the create serverless worker form into two cards: Configuration (name + auto-generated Build ID) and Compute (provider selection + Resource/Access/Scaling sections)
  • Adds Google Cloud Run as a second compute provider (Project ID, Region, Worker Pool + console button, Service Account) with buildGcpCloudRunComputeConfig / decodeGcpCloudRunProviderDetails in the deployments service
  • Extracts the provider-specific Resource/Access/Scaling sections into a shared compute-fields.svelte used by all three forms — create deployment, create version, and edit version render identical provider UIs, including provider-aware validation (shared zod superRefine) and per-provider compute config on submit
  • Gates the Cloud Run provider behind the serverScaledProviderCloudRun capability (Add server_scaled_provider_cloud_run capability api#799): when the server doesn't advertise it, the radio card is disabled with a Coming Soon badge. Cloud-ui enables it by mapping the enable_server_scaled_provider_cloud_run feature flag (temporalio/cloud-ui#2775, temporalio/saas-control-plane#13828) into its synthesized capabilities. Adds a hasCapability() utility, now also used by CapabilityGuard
  • Cloud Run requests omit the scaler block — no worker-set-compatible scaling algorithm exists server-side yet — and the Scaling & Lifecycle section shows a Coming Soon badge with Customize disabled for Cloud Run (Lambda scaling unchanged)
  • Expanded version rows decode and render Cloud Run provider details (worker pool, project, region, service account)
  • Replaces the old sidebar setup guide with a collapsible "Don't have a role yet?" section containing CloudFormation and Terraform tabs; CFN/Terraform templates stored as real files imported with Vite ?raw
  • Adds cfnTemplate and cfnTemplateUrl props so cloud-ui can supply its S3-hosted templates and enable the CloudFormation Launch Stack deep link (open-source UI falls back to the CF console root)
  • Removes unused serverless-worker-setup-guide.svelte and setup-guide-toggle.svelte
CleanShot 2026-06-10 at 16 47 07 CleanShot 2026-06-10 at 16 47 40 CleanShot 2026-06-10 at 16 29 56

Testing locally

The serverless section only appears when the server advertises serverScaledDeployments, and Cloud Run is additionally gated on serverScaledProviderCloudRun (not in the published api yet — Cloud Run shows as Coming Soon everywhere by default).

  1. Run a WCI-enabled Temporal server: clone temporalio/temporal-auto-scaled-workers next to your temporal clone, add replace go.temporal.io/auto-scaled-workers => ../auto-scaled-workers to temporal's go.mod, then make start (for AWS validation: AWS_PROFILE=<profile> make start)
  2. temporal operator namespace create -n default --address localhost:7233
  3. pnpm dev:local-temporal in this repo → http://localhost:3000
  4. To make Cloud Run selectable locally, temporarily merge the capability in src/routes/(app)/+layout.ts after fetchSystemInfo:
    if (import.meta.env.MODE === 'local-temporal') {
      systemInfo.capabilities = {
        ...systemInfo.capabilities,
        serverScaledProviderCloudRun: true,
      } as GetSystemInfoResponse['capabilities'];
    }
  5. End-to-end credentials/IAM setup for real Lambda/Cloud Run validation is documented in the winston aws-lambda-deploy-test and gcp-cloud-run-deploy-test skills (test values in 1Password, dev vault). Both providers were validated end-to-end against real cloud resources with this branch

Test plan

  • Lambda provider: Name, Build ID (auto-generated), Lambda ARN + console button, IAM Role ARN, External ID, "Don't have a role?" expand → CloudFormation tab (Launch Stack, Download Template) → Terraform tab (code block, GitHub link)
  • Cloud Run provider (capability on): Project ID, Region, Worker Pool + console button, Service Account; submit creates + validates deployment; scaler omitted from request
  • Cloud Run provider (capability off): radio disabled with Coming Soon badge
  • Create version / edit version forms match the create deployment provider sections; edit pre-selects the stored provider and round-trips its config
  • Scaling & Lifecycle: Customize toggle works for Lambda; disabled + Coming Soon for Cloud Run
  • Expanded version row shows Lambda ARNs or Cloud Run details per provider
  • Form validation fires on submit for required fields per provider
  • Successful submit navigates back to deployments list
  • Dark mode rendering

Redesigns the create serverless worker deployment form with a two-card
layout (Configuration + Compute), compute provider selection (Lambda /
GCP Cloud Run), provider-conditional fields, and a collapsible IAM role
setup guide with CloudFormation and Terraform tabs.

- Auto-generates Build ID with a random hex value
- Adds GCP Cloud Run provider fields and buildGcpCloudRunComputeConfig
- Stores CFN and Terraform templates as raw files (?raw imports)
- Accepts cfnTemplate and cfnTemplateUrl props so cloud-ui can supply
  hosted S3 templates and Launch Stack deep links
- Removes unused serverless-worker-setup-guide and setup-guide-toggle
@vercel

vercel Bot commented Jun 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
holocene Ready Ready Preview, Comment Jun 11, 2026 11:17pm

Request Review

…aler until supported

- Extract shared provider Resource/Access/Scaling sections into
  compute-fields.svelte; create deployment, create version, and edit
  version forms all render identical provider-specific sections
- Add provider + GCP fields to create/edit version schemas with
  conditional validation (shared superRefine)
- Build GCP Cloud Run compute config in version create/edit pages;
  infer initial provider from stored config when editing
- Omit the scaler block for Cloud Run requests: no worker-set
  compatible scaling algorithm exists server-side yet; scaling
  section shows a Coming Soon badge with Customize disabled
- Decode and render GCP provider details (worker pool, project,
  region, service account) in the expanded version row
Cloud Run radio card renders disabled with a Coming Soon badge unless
cloudRunEnabled is passed. OSS routes enable it; cloud-ui can wire the
prop to a feature flag and flip it when the backend is ready.
…ility

The provider picker reads the gcpCloudRunDeployments system capability
directly (via a new hasCapability helper, also adopted by
CapabilityGuard) and renders the Cloud Run radio card disabled with a
Coming Soon badge when absent. The field doesn't exist in the published
api proto yet, so OSS shows Coming Soon until the server advertises it;
cloud-ui enables it by mapping a feature flag into its synthesized
systemInfo capabilities, same as serverScaledDeployments.
Matches the proto field server_scaled_provider_cloud_run
(temporalio/api#799).
@rossnelson rossnelson marked this pull request as ready for review June 11, 2026 16:58
@rossnelson rossnelson requested a review from a team as a code owner June 11, 2026 16:58
Comment thread src/lib/components/deployments/version-compute-details.svelte
- buildId default uses crypto.randomUUID()
- provider detail decoders short-circuit unless the scaling group's
  provider type matches, instead of both running on every config
@rossnelson rossnelson merged commit 83b2d4e into main Jun 12, 2026
23 checks passed
@rossnelson rossnelson deleted the dt-4089 branch June 12, 2026 14: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.

2 participants