Skip to content

Commit 0dc2ff5

Browse files
rkannan82claude
andauthored
Wire worker_commands namespace capability (#10084)
## What Wire the new `worker_commands` namespace capability to the existing `WorkerCommandsEnabled` dynamic config flag. Also bumped the API version. ## Why SDKs need this capability to know when to create the implicit control task queue and poller for receiving worker commands (temporalio/api#771). ## How did you test it? Unit tests 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 6f5b9b2 commit 0dc2ff5

4 files changed

Lines changed: 7 additions & 3 deletions

File tree

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ require (
6363
go.opentelemetry.io/otel/sdk v1.43.0
6464
go.opentelemetry.io/otel/sdk/metric v1.43.0
6565
go.opentelemetry.io/otel/trace v1.43.0
66-
go.temporal.io/api v1.62.12-0.20260424184119-9015efabce8d
66+
go.temporal.io/api v1.62.12-0.20260427172148-34044e215df3
6767
go.temporal.io/auto-scaled-workers v0.0.0-20260407181057-edd947d743d2
6868
go.temporal.io/sdk v1.41.1
6969
go.uber.org/fx v1.24.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -469,8 +469,8 @@ go.opentelemetry.io/proto/slim/otlp/collector/profiles/v1development v0.3.0 h1:R
469469
go.opentelemetry.io/proto/slim/otlp/collector/profiles/v1development v0.3.0/go.mod h1:I89cynRj8y+383o7tEQVg2SVA6SRgDVIouWPUVXjx0U=
470470
go.opentelemetry.io/proto/slim/otlp/profiles/v1development v0.3.0 h1:CQvJSldHRUN6Z8jsUeYv8J0lXRvygALXIzsmAeCcZE0=
471471
go.opentelemetry.io/proto/slim/otlp/profiles/v1development v0.3.0/go.mod h1:xSQ+mEfJe/GjK1LXEyVOoSI1N9JV9ZI923X5kup43W4=
472-
go.temporal.io/api v1.62.12-0.20260424184119-9015efabce8d h1:On7TmNeQ/mm1fxkXCn2Aqqf9Sy8GgcKPJUZunqA7Wpo=
473-
go.temporal.io/api v1.62.12-0.20260424184119-9015efabce8d/go.mod h1:iaxoP/9OXMJcQkETTECfwYq4cw/bj4nwov8b3ZLVnXM=
472+
go.temporal.io/api v1.62.12-0.20260427172148-34044e215df3 h1:6MMqFF1Gj9wMPOY3VM1EIEA/y29Y92CZKj4IjGy5UNA=
473+
go.temporal.io/api v1.62.12-0.20260427172148-34044e215df3/go.mod h1:iaxoP/9OXMJcQkETTECfwYq4cw/bj4nwov8b3ZLVnXM=
474474
go.temporal.io/auto-scaled-workers v0.0.0-20260407181057-edd947d743d2 h1:1hKeH3GyR6YD6LKMHGCZ76t6h1Sgha0hXVQBxWi3dlQ=
475475
go.temporal.io/auto-scaled-workers v0.0.0-20260407181057-edd947d743d2/go.mod h1:T8dnzVPeO+gaUTj9eDgm/lT2lZH4+JXNvrGaQGyVi50=
476476
go.temporal.io/sdk v1.41.1 h1:yOpvsHyDD1lNuwlGBv/SUodCPhjv9nDeC9lLHW/fJUA=

service/frontend/namespace_handler.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -867,6 +867,7 @@ func (d *namespaceHandler) createResponse(
867867
WorkflowPause: d.config.WorkflowPauseEnabled(info.Name),
868868
StandaloneActivities: d.config.Activity.Enabled(info.Name),
869869
WorkerPollCompleteOnShutdown: d.config.EnableCancelWorkerPollsOnShutdown(info.Name),
870+
WorkerCommands: d.config.WorkerCommandsEnabled(info.Name),
870871
PollerAutoscaling: true,
871872
},
872873
Limits: &namespacepb.NamespaceInfo_Limits{

service/frontend/namespace_handler_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,7 @@ func (s *namespaceHandlerCommonSuite) TestCapabilitiesAndLimits() {
387387
s.False(resp.NamespaceInfo.Capabilities.WorkflowPause)
388388
s.False(resp.NamespaceInfo.Capabilities.StandaloneActivities)
389389
s.False(resp.NamespaceInfo.Capabilities.WorkerPollCompleteOnShutdown)
390+
s.False(resp.NamespaceInfo.Capabilities.WorkerCommands)
390391
s.True(resp.NamespaceInfo.Capabilities.PollerAutoscaling)
391392
s.Equal(int64(2*1024*1024), resp.NamespaceInfo.Limits.BlobSizeLimitError)
392393
s.Equal(int64(2*1024*1024), resp.NamespaceInfo.Limits.MemoSizeLimitError)
@@ -402,6 +403,7 @@ func (s *namespaceHandlerCommonSuite) TestCapabilitiesAndLimits() {
402403
s.config.BlobSizeLimitError = dc.GetIntPropertyFnFilteredByNamespace(1024)
403404
s.config.MemoSizeLimitError = dc.GetIntPropertyFnFilteredByNamespace(512)
404405
s.config.EnableCancelWorkerPollsOnShutdown = dc.GetBoolPropertyFnFilteredByNamespace(true)
406+
s.config.WorkerCommandsEnabled = dc.GetBoolPropertyFnFilteredByNamespace(true)
405407

406408
resp, err = s.handler.DescribeNamespace(context.Background(), &workflowservice.DescribeNamespaceRequest{
407409
Namespace: "ns",
@@ -415,6 +417,7 @@ func (s *namespaceHandlerCommonSuite) TestCapabilitiesAndLimits() {
415417
s.True(resp.NamespaceInfo.Capabilities.WorkflowPause)
416418
s.True(resp.NamespaceInfo.Capabilities.StandaloneActivities)
417419
s.True(resp.NamespaceInfo.Capabilities.WorkerPollCompleteOnShutdown)
420+
s.True(resp.NamespaceInfo.Capabilities.WorkerCommands)
418421
s.Equal(int64(1024), resp.NamespaceInfo.Limits.BlobSizeLimitError)
419422
s.Equal(int64(512), resp.NamespaceInfo.Limits.MemoSizeLimitError)
420423
}

0 commit comments

Comments
 (0)