diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index 5fe09704e..9a77688f9 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -13508,6 +13508,14 @@ "endpointId": { "type": "string", "description": "Endpoint ID as resolved in the endpoint registry at the time this event was generated.\nThis is stored on the event and used internally by the server in case the endpoint is renamed from the time the\nevent was originally scheduled." + }, + "scheduleToStartTimeout": { + "type": "string", + "description": "Schedule-to-start timeout for this operation.\nSee ScheduleNexusOperationCommandAttributes.schedule_to_start_timeout for details." + }, + "startToCloseTimeout": { + "type": "string", + "description": "Start-to-close timeout for this operation.\nSee ScheduleNexusOperationCommandAttributes.start_to_close_timeout for details." } }, "description": "Event marking that an operation was scheduled by a workflow via the ScheduleNexusOperation command." @@ -13823,6 +13831,14 @@ "operationToken": { "type": "string", "description": "Operation token. Only set for asynchronous operations after a successful StartOperation call." + }, + "scheduleToStartTimeout": { + "type": "string", + "description": "Schedule-to-start timeout for this operation." + }, + "startToCloseTimeout": { + "type": "string", + "description": "Start-to-close timeout for this operation." } }, "description": "PendingNexusOperationInfo contains the state of a pending Nexus operation." diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index 51d896b69..f2625c126 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -10576,6 +10576,22 @@ components: Endpoint ID as resolved in the endpoint registry at the time this event was generated. This is stored on the event and used internally by the server in case the endpoint is renamed from the time the event was originally scheduled. + scheduleToStartTimeout: + pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ + type: string + description: |- + Schedule-to-start timeout for this operation. + See ScheduleNexusOperationCommandAttributes.schedule_to_start_timeout for details. + (-- api-linter: core::0140::prepositions=disabled + aip.dev/not-precedent: "to" is used to indicate interval. --) + startToCloseTimeout: + pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ + type: string + description: |- + Start-to-close timeout for this operation. + See ScheduleNexusOperationCommandAttributes.start_to_close_timeout for details. + (-- api-linter: core::0140::prepositions=disabled + aip.dev/not-precedent: "to" is used to indicate interval. --) description: Event marking that an operation was scheduled by a workflow via the ScheduleNexusOperation command. NexusOperationStartedEventAttributes: type: object @@ -10968,6 +10984,20 @@ components: operationToken: type: string description: Operation token. Only set for asynchronous operations after a successful StartOperation call. + scheduleToStartTimeout: + pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ + type: string + description: |- + Schedule-to-start timeout for this operation. + (-- api-linter: core::0140::prepositions=disabled + aip.dev/not-precedent: "to" is used to indicate interval. --) + startToCloseTimeout: + pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ + type: string + description: |- + Start-to-close timeout for this operation. + (-- api-linter: core::0140::prepositions=disabled + aip.dev/not-precedent: "to" is used to indicate interval. --) description: PendingNexusOperationInfo contains the state of a pending Nexus operation. PendingWorkflowTaskInfo: type: object diff --git a/temporal/api/command/v1/message.proto b/temporal/api/command/v1/message.proto index d32829f22..12c2e43ff 100644 --- a/temporal/api/command/v1/message.proto +++ b/temporal/api/command/v1/message.proto @@ -249,6 +249,27 @@ message ScheduleNexusOperationCommandAttributes { // Note these headers are not the same as Temporal headers on internal activities and child workflows, these are // transmitted to Nexus operations that may be external and are not traditional payloads. map nexus_header = 6; + + // Schedule-to-start timeout for this operation. + // Indicates how long the caller is willing to wait for the operation to be started (or completed if synchronous) + // by the handler. If the operation is not started within this timeout, it will fail with + // TIMEOUT_TYPE_SCHEDULE_TO_START. + // If not set or zero, no schedule-to-start timeout is enforced. + // (-- api-linter: core::0140::prepositions=disabled + // aip.dev/not-precedent: "to" is used to indicate interval. --) + // Requires server version 1.31.0 or later. + google.protobuf.Duration schedule_to_start_timeout = 7; + + // Start-to-close timeout for this operation. + // Indicates how long the caller is willing to wait for an asynchronous operation to complete after it has been + // started. If the operation does not complete within this timeout after starting, it will fail with + // TIMEOUT_TYPE_START_TO_CLOSE. + // Only applies to asynchronous operations. Synchronous operations ignore this timeout. + // If not set or zero, no start-to-close timeout is enforced. + // (-- api-linter: core::0140::prepositions=disabled + // aip.dev/not-precedent: "to" is used to indicate interval. --) + // Requires server version 1.31.0 or later. + google.protobuf.Duration start_to_close_timeout = 8; } message RequestCancelNexusOperationCommandAttributes { diff --git a/temporal/api/history/v1/message.proto b/temporal/api/history/v1/message.proto index a405b70c8..4243baab6 100644 --- a/temporal/api/history/v1/message.proto +++ b/temporal/api/history/v1/message.proto @@ -975,6 +975,18 @@ message NexusOperationScheduledEventAttributes { // This is stored on the event and used internally by the server in case the endpoint is renamed from the time the // event was originally scheduled. string endpoint_id = 9; + + // Schedule-to-start timeout for this operation. + // See ScheduleNexusOperationCommandAttributes.schedule_to_start_timeout for details. + // (-- api-linter: core::0140::prepositions=disabled + // aip.dev/not-precedent: "to" is used to indicate interval. --) + google.protobuf.Duration schedule_to_start_timeout = 10; + + // Start-to-close timeout for this operation. + // See ScheduleNexusOperationCommandAttributes.start_to_close_timeout for details. + // (-- api-linter: core::0140::prepositions=disabled + // aip.dev/not-precedent: "to" is used to indicate interval. --) + google.protobuf.Duration start_to_close_timeout = 11; } // Event marking an asynchronous operation was started by the responding Nexus handler. diff --git a/temporal/api/workflow/v1/message.proto b/temporal/api/workflow/v1/message.proto index 18bd4be54..40753b2ce 100644 --- a/temporal/api/workflow/v1/message.proto +++ b/temporal/api/workflow/v1/message.proto @@ -526,6 +526,16 @@ message PendingNexusOperationInfo { // Operation token. Only set for asynchronous operations after a successful StartOperation call. string operation_token = 15; + + // Schedule-to-start timeout for this operation. + // (-- api-linter: core::0140::prepositions=disabled + // aip.dev/not-precedent: "to" is used to indicate interval. --) + google.protobuf.Duration schedule_to_start_timeout = 16; + + // Start-to-close timeout for this operation. + // (-- api-linter: core::0140::prepositions=disabled + // aip.dev/not-precedent: "to" is used to indicate interval. --) + google.protobuf.Duration start_to_close_timeout = 17; } // NexusOperationCancellationInfo contains the state of a nexus operation cancellation.