Skip to content

Add CreateWorkerDeploymentVersion API with compute config and CREATED status#9651

Merged
ShahabT merged 11 commits intoserverlessfrom
create-wdv
Mar 26, 2026
Merged

Add CreateWorkerDeploymentVersion API with compute config and CREATED status#9651
ShahabT merged 11 commits intoserverlessfrom
create-wdv

Conversation

@ShahabT
Copy link
Copy Markdown
Contributor

@ShahabT ShahabT commented Mar 24, 2026

Summary

  • Add CreateWorkerDeploymentVersion frontend API that explicitly creates a version in an existing deployment with optional compute config and scaling group validation
  • Add WORKER_DEPLOYMENT_VERSION_STATUS_CREATED status for explicitly created versions that transitions to INACTIVE once a poller registers a task queue
  • Validate scaling groups in compute config have no overlapping task queue types (extracted as reusable ValidateWorkerDeploymentVersionComputeConfig in util.go)
  • Pass compute config through the full flow: frontend → client → deployment workflow → activity → version workflow initial state

Test plan

  • Unit tests for CreateWorkerDeploymentVersion success, idempotency, and rejection cases in workflow_test.go
  • Functional tests for success, idempotency, already-exists, deployment-not-found, invalid args, auto-created conflict, multiple versions, and task queue registration in worker_deployment_version_test.go
  • Functional tests for invalid/valid scaling group configurations
  • Functional test verifying CREATED → INACTIVE status transition on poll
  • Compute config round-trip verified via DescribeWorkerDeploymentVersion

@ShahabT ShahabT requested review from a team as code owners March 24, 2026 22:53
Copy link
Copy Markdown
Contributor

@02strich 02strich left a comment

Choose a reason for hiding this comment

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

I am not seeing the place where the actual worker controller instance would be created/deleted - can you add that?

Also for the risk of just having it missed it: is there anything in the read path that needs to change? Today the API doesn't really return much status about the compute config so maybe not...

return &workflowservice.CreateWorkerDeploymentVersionResponse{}, nil
}

func (wh *WorkflowHandler) UpdateWorkerDeploymentVersionComputeConfig(
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.

do you plan to funnel this through the worker deployment version WF as well, or do the update directly?

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.

funnel through. describe version need to have up-to-date compute info.

Comment on lines +1331 to +1332
args.VersionState.ComputeConfig = computeConfig
args.VersionState.Status = enumspb.WORKER_DEPLOYMENT_VERSION_STATUS_CREATED
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.

seems inconsistent to have these here and not in makeVersionWorkflowArgs?

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.

do you also need to update common/api/metadata.go?

@ShahabT ShahabT requested a review from a team as a code owner March 26, 2026 01:31
@ShahabT ShahabT merged commit a95ad94 into serverless Mar 26, 2026
42 of 43 checks passed
@ShahabT ShahabT deleted the create-wdv branch March 26, 2026 20:52
ShahabT added a commit that referenced this pull request Apr 3, 2026
This PR merges the serverless feature branch into main.

Individual PRs included in this branch:
- #9380
- #9651
- #9412
- #9746
- #9759

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Stefan Richter <stefan.richter@temporal.io>
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