From 9e9c76a2a832158af3145e1081ace8e9e00e86bd Mon Sep 17 00:00:00 2001 From: "alice.yin" Date: Thu, 16 Nov 2023 12:38:57 -0800 Subject: [PATCH 1/8] Create workflow collection proto --- .../api/workflow/v1/workflow_collection.proto | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 temporal/api/workflow/v1/workflow_collection.proto diff --git a/temporal/api/workflow/v1/workflow_collection.proto b/temporal/api/workflow/v1/workflow_collection.proto new file mode 100644 index 000000000..5aa42d8eb --- /dev/null +++ b/temporal/api/workflow/v1/workflow_collection.proto @@ -0,0 +1,42 @@ +// The MIT License +// +// Copyright (c) 2020 Temporal Technologies Inc. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +syntax = "proto3"; + +package temporal.api.workflow.v1; + +option go_package = "go.temporal.io/api/workflow/v1;workflow"; +option java_package = "io.temporal.api.workflow.v1"; +option java_multiple_files = true; +option java_outer_classname = "WorkflowCollectionProto"; +option ruby_package = "Temporalio::Api::Workflow::V1"; +option csharp_namespace = "Temporalio.Api.Workflow.V1"; + +import "temporal/api/history/v1/message.proto"; + +message WorkflowCollection { + repeated Workflow workflows = 1; +} + +message Workflow { + temporal.api.history.v1.History history = 1; +} \ No newline at end of file From 701f41ac6457bc6dc22644f114480757e05a831a Mon Sep 17 00:00:00 2001 From: "alice.yin" Date: Thu, 16 Nov 2023 14:32:24 -0800 Subject: [PATCH 2/8] address comments --- ...oto => workflow_execution_history_collection.proto} | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) rename temporal/api/workflow/v1/{workflow_collection.proto => workflow_execution_history_collection.proto} (79%) diff --git a/temporal/api/workflow/v1/workflow_collection.proto b/temporal/api/workflow/v1/workflow_execution_history_collection.proto similarity index 79% rename from temporal/api/workflow/v1/workflow_collection.proto rename to temporal/api/workflow/v1/workflow_execution_history_collection.proto index 5aa42d8eb..de8ef8feb 100644 --- a/temporal/api/workflow/v1/workflow_collection.proto +++ b/temporal/api/workflow/v1/workflow_execution_history_collection.proto @@ -27,16 +27,18 @@ package temporal.api.workflow.v1; option go_package = "go.temporal.io/api/workflow/v1;workflow"; option java_package = "io.temporal.api.workflow.v1"; option java_multiple_files = true; -option java_outer_classname = "WorkflowCollectionProto"; +option java_outer_classname = "WorkflowExecutionHistoryCollectionProto"; option ruby_package = "Temporalio::Api::Workflow::V1"; option csharp_namespace = "Temporalio.Api.Workflow.V1"; import "temporal/api/history/v1/message.proto"; -message WorkflowCollection { - repeated Workflow workflows = 1; +// WorkflowExecutionHistoryCollection is utilized by the Cloud Export feature to deserialize +// the exported file. It encapsulates a collection of workflow execution histories. +message WorkflowExecutionHistoryCollection { + repeated WorkflowExecutionHistoryCollection workflow_execution_histories = 1; } -message Workflow { +message WorkflowExecutionHistory { temporal.api.history.v1.History history = 1; } \ No newline at end of file From 92e0033ed326a60af2df50e4ed1586ee1926ba65 Mon Sep 17 00:00:00 2001 From: "alice.yin" Date: Thu, 16 Nov 2023 15:13:03 -0800 Subject: [PATCH 3/8] add export in the name --- .../v1/message.proto} | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) rename temporal/api/{workflow/v1/workflow_execution_history_collection.proto => export/v1/message.proto} (70%) diff --git a/temporal/api/workflow/v1/workflow_execution_history_collection.proto b/temporal/api/export/v1/message.proto similarity index 70% rename from temporal/api/workflow/v1/workflow_execution_history_collection.proto rename to temporal/api/export/v1/message.proto index de8ef8feb..2f3f009f1 100644 --- a/temporal/api/workflow/v1/workflow_execution_history_collection.proto +++ b/temporal/api/export/v1/message.proto @@ -22,23 +22,23 @@ syntax = "proto3"; -package temporal.api.workflow.v1; +package temporal.api.export.v1; -option go_package = "go.temporal.io/api/workflow/v1;workflow"; -option java_package = "io.temporal.api.workflow.v1"; +option go_package = "go.temporal.io/api/export/v1;workflow"; +option java_package = "io.temporal.api.export.v1"; option java_multiple_files = true; -option java_outer_classname = "WorkflowExecutionHistoryCollectionProto"; -option ruby_package = "Temporalio::Api::Workflow::V1"; -option csharp_namespace = "Temporalio.Api.Workflow.V1"; +option java_outer_classname = "MessageProto"; +option ruby_package = "Temporalio::Api::Export::V1"; +option csharp_namespace = "Temporalio.Api.Export.V1"; import "temporal/api/history/v1/message.proto"; -// WorkflowExecutionHistoryCollection is utilized by the Cloud Export feature to deserialize +// ExportWorkflowExecutionHistories is utilized by the Cloud Export feature to deserialize // the exported file. It encapsulates a collection of workflow execution histories. -message WorkflowExecutionHistoryCollection { - repeated WorkflowExecutionHistoryCollection workflow_execution_histories = 1; +message ExportWorkflowExecutionHistories { + repeated ExportWorkflowExecutionHistory export_workflow_execution_histories = 1; } -message WorkflowExecutionHistory { +message ExportWorkflowExecutionHistory { temporal.api.history.v1.History history = 1; } \ No newline at end of file From bdd0ea3e70280bec9a38f4f298e46c0e1d98fef5 Mon Sep 17 00:00:00 2001 From: alice-yin <124640969+alice-yin@users.noreply.github.com> Date: Thu, 16 Nov 2023 15:15:55 -0800 Subject: [PATCH 4/8] Apply suggestions from code review Co-authored-by: Roey Berman --- temporal/api/export/v1/message.proto | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/temporal/api/export/v1/message.proto b/temporal/api/export/v1/message.proto index 2f3f009f1..b4738d948 100644 --- a/temporal/api/export/v1/message.proto +++ b/temporal/api/export/v1/message.proto @@ -35,10 +35,10 @@ import "temporal/api/history/v1/message.proto"; // ExportWorkflowExecutionHistories is utilized by the Cloud Export feature to deserialize // the exported file. It encapsulates a collection of workflow execution histories. -message ExportWorkflowExecutionHistories { - repeated ExportWorkflowExecutionHistory export_workflow_execution_histories = 1; +message WorkflowExecutionHistories { + repeated ExportWorkflowExecutionHistory items = 1; } -message ExportWorkflowExecutionHistory { +message WorkflowExecutionHistory { temporal.api.history.v1.History history = 1; } \ No newline at end of file From 08a2d89358ac59c3c5413bf6476e6266a7fbcd34 Mon Sep 17 00:00:00 2001 From: alice-yin <124640969+alice-yin@users.noreply.github.com> Date: Thu, 16 Nov 2023 15:17:08 -0800 Subject: [PATCH 5/8] Apply suggestions from code review --- temporal/api/export/v1/message.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/temporal/api/export/v1/message.proto b/temporal/api/export/v1/message.proto index b4738d948..26b91a5ca 100644 --- a/temporal/api/export/v1/message.proto +++ b/temporal/api/export/v1/message.proto @@ -36,7 +36,7 @@ import "temporal/api/history/v1/message.proto"; // ExportWorkflowExecutionHistories is utilized by the Cloud Export feature to deserialize // the exported file. It encapsulates a collection of workflow execution histories. message WorkflowExecutionHistories { - repeated ExportWorkflowExecutionHistory items = 1; + repeated WorkflowExecutionHistory items = 1; } message WorkflowExecutionHistory { From 4b2c030cc239d6ddf9d76f8dd101ef4deb18ef0c Mon Sep 17 00:00:00 2001 From: alice-yin <124640969+alice-yin@users.noreply.github.com> Date: Thu, 16 Nov 2023 15:17:53 -0800 Subject: [PATCH 6/8] Update temporal/api/export/v1/message.proto --- temporal/api/export/v1/message.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/temporal/api/export/v1/message.proto b/temporal/api/export/v1/message.proto index 26b91a5ca..65452554f 100644 --- a/temporal/api/export/v1/message.proto +++ b/temporal/api/export/v1/message.proto @@ -33,7 +33,7 @@ option csharp_namespace = "Temporalio.Api.Export.V1"; import "temporal/api/history/v1/message.proto"; -// ExportWorkflowExecutionHistories is utilized by the Cloud Export feature to deserialize +// WorkflowExecutionHistories is utilized by the Cloud Export feature to deserialize // the exported file. It encapsulates a collection of workflow execution histories. message WorkflowExecutionHistories { repeated WorkflowExecutionHistory items = 1; From e34a5b6b2cb7e795a4f7f3c6177c124b04ae871f Mon Sep 17 00:00:00 2001 From: "alice.yin" Date: Fri, 17 Nov 2023 10:56:24 -0800 Subject: [PATCH 7/8] address comments --- temporal/api/export/v1/message.proto | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/temporal/api/export/v1/message.proto b/temporal/api/export/v1/message.proto index 65452554f..2b28e29e1 100644 --- a/temporal/api/export/v1/message.proto +++ b/temporal/api/export/v1/message.proto @@ -33,12 +33,14 @@ option csharp_namespace = "Temporalio.Api.Export.V1"; import "temporal/api/history/v1/message.proto"; -// WorkflowExecutionHistories is utilized by the Cloud Export feature to deserialize + +message WorkflowExecutionHistory { + temporal.api.history.v1.History history = 1; +} + +// WorkflowExecutionHistories is used by the Cloud Export feature to deserialize // the exported file. It encapsulates a collection of workflow execution histories. message WorkflowExecutionHistories { repeated WorkflowExecutionHistory items = 1; } -message WorkflowExecutionHistory { - temporal.api.history.v1.History history = 1; -} \ No newline at end of file From b49e6971f34eebf20c8e672b61eb9209cb39d1b8 Mon Sep 17 00:00:00 2001 From: "alice.yin" Date: Fri, 17 Nov 2023 13:23:56 -0800 Subject: [PATCH 8/8] rename workflowExecutionHistory to workflowExecution --- temporal/api/export/v1/message.proto | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/temporal/api/export/v1/message.proto b/temporal/api/export/v1/message.proto index 2b28e29e1..7ffd23305 100644 --- a/temporal/api/export/v1/message.proto +++ b/temporal/api/export/v1/message.proto @@ -33,14 +33,13 @@ option csharp_namespace = "Temporalio.Api.Export.V1"; import "temporal/api/history/v1/message.proto"; - -message WorkflowExecutionHistory { +message WorkflowExecution { temporal.api.history.v1.History history = 1; } -// WorkflowExecutionHistories is used by the Cloud Export feature to deserialize -// the exported file. It encapsulates a collection of workflow execution histories. -message WorkflowExecutionHistories { - repeated WorkflowExecutionHistory items = 1; +// WorkflowExecutions is used by the Cloud Export feature to deserialize +// the exported file. It encapsulates a collection of workflow execution information. +message WorkflowExecutions { + repeated WorkflowExecution items = 1; }