diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index 85e36caa2..2f21bedcc 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -13670,6 +13670,10 @@ "standaloneActivities": { "type": "boolean", "title": "True if the namespace supports standalone activities" + }, + "workerPollCompleteOnShutdown": { + "type": "boolean", + "description": "True if the namespace supports server-side completion of outstanding worker polls on shutdown.\nWhen enabled, the server will complete polls for workers that send WorkerInstanceKey in their\npoll requests and call ShutdownWorker with the same WorkerInstanceKey. The poll will return\nan empty response. When this flag is true, workers should allow polls to return gracefully\nrather than terminating any open polls on shutdown." } }, "description": "Namespace capability details. Should contain what features are enabled in a namespace." diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index 058b71005..c220f6773 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -10744,6 +10744,14 @@ components: standaloneActivities: type: boolean description: True if the namespace supports standalone activities + workerPollCompleteOnShutdown: + type: boolean + description: |- + True if the namespace supports server-side completion of outstanding worker polls on shutdown. + When enabled, the server will complete polls for workers that send WorkerInstanceKey in their + poll requests and call ShutdownWorker with the same WorkerInstanceKey. The poll will return + an empty response. When this flag is true, workers should allow polls to return gracefully + rather than terminating any open polls on shutdown. description: Namespace capability details. Should contain what features are enabled in a namespace. NamespaceInfo_Limits: type: object diff --git a/temporal/api/namespace/v1/message.proto b/temporal/api/namespace/v1/message.proto index b6f5c4cda..9f52e3452 100644 --- a/temporal/api/namespace/v1/message.proto +++ b/temporal/api/namespace/v1/message.proto @@ -42,6 +42,12 @@ message NamespaceInfo { bool workflow_pause = 6; // True if the namespace supports standalone activities bool standalone_activities = 7; + // True if the namespace supports server-side completion of outstanding worker polls on shutdown. + // When enabled, the server will complete polls for workers that send WorkerInstanceKey in their + // poll requests and call ShutdownWorker with the same WorkerInstanceKey. The poll will return + // an empty response. When this flag is true, workers should allow polls to return gracefully + // rather than terminating any open polls on shutdown. + bool worker_poll_complete_on_shutdown = 8; } // Namespace configured limits