From cad02991dbea84f9e40c4127e9035d6084fbecbc Mon Sep 17 00:00:00 2001 From: Alex Shtin Date: Wed, 13 Nov 2024 17:17:56 -0800 Subject: [PATCH 1/2] Remove SkipGenerateWorkflowTask from signal APIs --- buf.yaml | 3 ++- openapi/openapiv2.json | 14 +------------- openapi/openapiv3.yaml | 16 +++------------- temporal/api/history/v1/message.proto | 3 +-- .../workflowservice/v1/request_response.proto | 13 +++++-------- 5 files changed, 12 insertions(+), 37 deletions(-) diff --git a/buf.yaml b/buf.yaml index a09458dc5..bdd832ae5 100644 --- a/buf.yaml +++ b/buf.yaml @@ -9,7 +9,8 @@ build: - google breaking: use: - - WIRE_JSON + # TODO (alex): revert it back to WIRE_JSON in follow up PR. + - WIRE ignore: - google lint: diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index 5a963f871..cba6551af 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -5750,11 +5750,7 @@ }, "workflowStartDelay": { "type": "string", - "description": "Time to wait before dispatching the first workflow task. Cannot be used with `cron_schedule`.\nNote that the signal will be delivered with the first workflow task. If the workflow gets\nanother SignalWithStartWorkflow before the delay and `skip_generate_workflow_task` is false\nor not set, a workflow task will be dispatched immediately and the rest of the delay period\nwill be ignored, even if that request also had a delay. Signal via SignalWorkflowExecution\nwill not unblock the workflow." - }, - "skipGenerateWorkflowTask": { - "type": "boolean", - "description": "Indicates that a new workflow task should not be generated when this signal is received." + "description": "Time to wait before dispatching the first workflow task. Cannot be used with `cron_schedule`.\nNote that the signal will be delivered with the first workflow task. If the workflow gets\nanother SignalWithStartWorkflow before the delay a workflow task will be dispatched immediately\nand the rest of the delay period will be ignored, even if that request also had a delay.\nSignal via SignalWorkflowExecution will not unblock the workflow." }, "userMetadata": { "$ref": "#/definitions/v1UserMetadata", @@ -5802,10 +5798,6 @@ "$ref": "#/definitions/v1Header", "description": "Headers that are passed with the signal to the processing workflow.\nThese can include things like auth or tracing tokens." }, - "skipGenerateWorkflowTask": { - "type": "boolean", - "description": "Indicates that a new workflow task should not be generated when this signal is received." - }, "links": { "type": "array", "items": { @@ -12166,10 +12158,6 @@ "$ref": "#/definitions/v1Header", "description": "Headers that were passed by the sender of the signal and copied by temporal \nserver into the workflow task." }, - "skipGenerateWorkflowTask": { - "type": "boolean", - "description": "Indicates the signal did not generate a new workflow task when received." - }, "externalWorkflowExecution": { "$ref": "#/definitions/v1WorkflowExecution", "description": "When signal origin is a workflow execution, this field is set." diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index e8203f4c9..8c980bbd3 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -8272,13 +8272,9 @@ components: description: |- Time to wait before dispatching the first workflow task. Cannot be used with `cron_schedule`. Note that the signal will be delivered with the first workflow task. If the workflow gets - another SignalWithStartWorkflow before the delay and `skip_generate_workflow_task` is false - or not set, a workflow task will be dispatched immediately and the rest of the delay period - will be ignored, even if that request also had a delay. Signal via SignalWorkflowExecution - will not unblock the workflow. - skipGenerateWorkflowTask: - type: boolean - description: Indicates that a new workflow task should not be generated when this signal is received. + another SignalWithStartWorkflow before the delay a workflow task will be dispatched immediately + and the rest of the delay period will be ignored, even if that request also had a delay. + Signal via SignalWorkflowExecution will not unblock the workflow. userMetadata: allOf: - $ref: '#/components/schemas/UserMetadata' @@ -8329,9 +8325,6 @@ components: description: |- Headers that are passed with the signal to the processing workflow. These can include things like auth or tracing tokens. - skipGenerateWorkflowTask: - type: boolean - description: Indicates that a new workflow task should not be generated when this signal is received. links: type: array items: @@ -9689,9 +9682,6 @@ components: allOf: - $ref: '#/components/schemas/Header' description: "Headers that were passed by the sender of the signal and copied by temporal \n server into the workflow task." - skipGenerateWorkflowTask: - type: boolean - description: Indicates the signal did not generate a new workflow task when received. externalWorkflowExecution: allOf: - $ref: '#/components/schemas/WorkflowExecution' diff --git a/temporal/api/history/v1/message.proto b/temporal/api/history/v1/message.proto index 6e9a3ef8a..7cc0f5c13 100644 --- a/temporal/api/history/v1/message.proto +++ b/temporal/api/history/v1/message.proto @@ -472,8 +472,7 @@ message WorkflowExecutionSignaledEventAttributes { // Headers that were passed by the sender of the signal and copied by temporal // server into the workflow task. temporal.api.common.v1.Header header = 4; - // Indicates the signal did not generate a new workflow task when received. - bool skip_generate_workflow_task = 5; + reserved 5; // When signal origin is a workflow execution, this field is set. temporal.api.common.v1.WorkflowExecution external_workflow_execution = 6; } diff --git a/temporal/api/workflowservice/v1/request_response.proto b/temporal/api/workflowservice/v1/request_response.proto index 78698c513..f9c55911c 100644 --- a/temporal/api/workflowservice/v1/request_response.proto +++ b/temporal/api/workflowservice/v1/request_response.proto @@ -654,8 +654,7 @@ message SignalWorkflowExecutionRequest { // Headers that are passed with the signal to the processing workflow. // These can include things like auth or tracing tokens. temporal.api.common.v1.Header header = 8; - // Indicates that a new workflow task should not be generated when this signal is received. - bool skip_generate_workflow_task = 9; + reserved 9; // Links to be associated with the WorkflowExecutionSignaled event. repeated temporal.api.common.v1.Link links = 10; @@ -708,13 +707,11 @@ message SignalWithStartWorkflowExecutionRequest { temporal.api.common.v1.Header header = 19; // Time to wait before dispatching the first workflow task. Cannot be used with `cron_schedule`. // Note that the signal will be delivered with the first workflow task. If the workflow gets - // another SignalWithStartWorkflow before the delay and `skip_generate_workflow_task` is false - // or not set, a workflow task will be dispatched immediately and the rest of the delay period - // will be ignored, even if that request also had a delay. Signal via SignalWorkflowExecution - // will not unblock the workflow. + // another SignalWithStartWorkflow before the delay a workflow task will be dispatched immediately + // and the rest of the delay period will be ignored, even if that request also had a delay. + // Signal via SignalWorkflowExecution will not unblock the workflow. google.protobuf.Duration workflow_start_delay = 20; - // Indicates that a new workflow task should not be generated when this signal is received. - bool skip_generate_workflow_task = 21; + reserved 21; // Metadata on the workflow if it is started. This is carried over to the WorkflowExecutionInfo // for use by user interfaces to display the fixed as-of-start summary and details of the // workflow. From d6d0a9921a4bc11d6f745c7b6b67551175c78214 Mon Sep 17 00:00:00 2001 From: Alex Shtin Date: Thu, 14 Nov 2024 16:21:05 -0800 Subject: [PATCH 2/2] Deprecate history field --- openapi/openapiv2.json | 4 ++++ openapi/openapiv3.yaml | 3 +++ temporal/api/history/v1/message.proto | 3 ++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index cba6551af..001052999 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -12158,6 +12158,10 @@ "$ref": "#/definitions/v1Header", "description": "Headers that were passed by the sender of the signal and copied by temporal \nserver into the workflow task." }, + "skipGenerateWorkflowTask": { + "type": "boolean", + "description": "This field is deprecated and never respected. It should always be set to false." + }, "externalWorkflowExecution": { "$ref": "#/definitions/v1WorkflowExecution", "description": "When signal origin is a workflow execution, this field is set." diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index 8c980bbd3..484c584f9 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -9682,6 +9682,9 @@ components: allOf: - $ref: '#/components/schemas/Header' description: "Headers that were passed by the sender of the signal and copied by temporal \n server into the workflow task." + skipGenerateWorkflowTask: + type: boolean + description: This field is deprecated and never respected. It should always be set to false. externalWorkflowExecution: allOf: - $ref: '#/components/schemas/WorkflowExecution' diff --git a/temporal/api/history/v1/message.proto b/temporal/api/history/v1/message.proto index 7cc0f5c13..af7901fe9 100644 --- a/temporal/api/history/v1/message.proto +++ b/temporal/api/history/v1/message.proto @@ -472,7 +472,8 @@ message WorkflowExecutionSignaledEventAttributes { // Headers that were passed by the sender of the signal and copied by temporal // server into the workflow task. temporal.api.common.v1.Header header = 4; - reserved 5; + // This field is deprecated and never respected. It should always be set to false. + bool skip_generate_workflow_task = 5 [deprecated = true]; // When signal origin is a workflow execution, this field is set. temporal.api.common.v1.WorkflowExecution external_workflow_execution = 6; }