Skip to content

Implement Validate API and call Update/Delete on WCI#9759

Merged
ShahabT merged 7 commits intotemporalio:serverlessfrom
ShahabT:wdv-validate-compute-config
Apr 1, 2026
Merged

Implement Validate API and call Update/Delete on WCI#9759
ShahabT merged 7 commits intotemporalio:serverlessfrom
ShahabT:wdv-validate-compute-config

Conversation

@ShahabT
Copy link
Copy Markdown
Contributor

@ShahabT ShahabT commented Apr 1, 2026

What changed?

  • Implement ValidateWorkerDeploymentVersionComputeConfig.
  • Implement last_modifier_identity for Version
  • Refactor the workflows/activities to send incremental compute config to WCI

Why?

Needed for server-scaled workers

How did you test it?

  • built
  • run locally and tested manually
  • covered by existing tests
  • added new unit test(s)
  • added new functional test(s)

Potential risks

None

@ShahabT ShahabT marked this pull request as ready for review April 1, 2026 19:07
@ShahabT ShahabT requested review from a team as code owners April 1, 2026 19:07
@rkannan82 rkannan82 self-requested a review April 1, 2026 20:19
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.

Looks fine to me

@ShahabT ShahabT merged commit eb2caa5 into temporalio:serverless Apr 1, 2026
32 of 33 checks passed
if err != nil {
if computeConfig != nil {
deleteCtx := workflow.WithActivityOptions(ctx, defaultActivityOptions)
err = workflow.ExecuteActivity(deleteCtx, d.a.DeleteWorkerControllerInstanceFromDeployment, &deploymentspb.DeleteWorkerControllerInstanceInput{
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.

This overwrites the original error. So if deletion succeeds, we don't return error. Is this intentional?

func (a *Activities) UpdateWorkerControllerInstanceFromDeployment(ctx context.Context, input *deploymentspb.UpdateWorkerControllerInstanceInput) error {
upserts := scalingGroupUpdatesToWCI(input.GetUpsertScalingGroups())
if err := a.WorkerControllerInstanceClient.UpdateWorkerControllerInstance(ctx, a.namespace, input.GetVersion(), nil, input.GetIdentity(), upserts, input.GetRemoveScalingGroups()); err != nil {
return temporal.NewApplicationError(err.Error(), errInvalidComputeConfig)
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.

nit: We are treating even rpc errors as invalid config. Why is that?

ShahabT added a commit that referenced this pull request Apr 2, 2026
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.

3 participants