diff --git a/Makefile b/Makefile index 7f409356aea..0554b3fd806 100644 --- a/Makefile +++ b/Makefile @@ -209,7 +209,7 @@ $(THRIFT_GEN): $(THRIFT_FILES) $(BIN)/thriftrw $(BIN)/thriftrw-plugin-yarpc | $( PROTO_ROOT := proto # output location is defined by `option go_package` in the proto files, all must stay in sync with this PROTO_OUT := .gen/proto -PROTO_FILES = $(shell find ./$(PROTO_ROOT) -name "*.proto" | grep -v "persistenceblobs") +PROTO_FILES = $(shell find -L ./$(PROTO_ROOT) -name "*.proto" | grep -v "persistenceblobs") PROTO_DIRS = $(sort $(dir $(PROTO_FILES))) # protoc splits proto files into directories, otherwise protoc-gen-gogofast is complaining about inconsistent package diff --git a/idls b/idls index b1a9b9ede5f..355c7369a25 160000 --- a/idls +++ b/idls @@ -1 +1 @@ -Subproject commit b1a9b9ede5fbd29a5b67cb8e082f602488ce0446 +Subproject commit 355c7369a2585357303e878a96599b5bb92827db diff --git a/proto/public b/proto/public new file mode 120000 index 00000000000..ebd15b82b03 --- /dev/null +++ b/proto/public @@ -0,0 +1 @@ +../idls/proto \ No newline at end of file diff --git a/proto/public/uber/cadence/api/v1/common.proto b/proto/public/uber/cadence/api/v1/common.proto deleted file mode 100644 index ecc893a30a2..00000000000 --- a/proto/public/uber/cadence/api/v1/common.proto +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) 2020 Uber Technologies, Inc. -// -// 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 uber.cadence.api.v1; - -option go_package = "github.com/uber/cadence/.gen/proto/api/v1;apiv1"; -option java_multiple_files = true; -option java_outer_classname = "ApiProto"; -option java_package = "com.uber.cadence.api.v1"; - -import "google/protobuf/duration.proto"; - -message WorkflowExecution { - string workflow_id = 1; - string run_id = 2; -} - -message WorkflowType { - string name = 1; -} - -message ActivityType { - string name = 1; -} - -message Payload { - bytes data = 1; -} - -message Failure { - string reason = 1; - bytes details = 2; -} - -message Memo { - map fields = 1; -} - -message Header { - map fields = 1; -} - -message SearchAttributes { - map indexed_fields = 1; -} - -enum EncodingType { - ENCODING_TYPE_INVALID = 0; - ENCODING_TYPE_THRIFTRW = 1; - ENCODING_TYPE_JSON = 2; - ENCODING_TYPE_PROTO3 = 3; -} - -message DataBlob { - EncodingType encoding_type = 1; - bytes data = 2; -} - -message WorkerVersionInfo { - string impl = 1; - string feature_version = 2; -} - -message SupportedClientVersions { - // Indicates the highest Go SDK version server will accept requests from. - string go_sdk = 1; - // Indicates the highest Java SDK version server will accept requests from. - string java_sdk = 2; -} - -message RetryPolicy { - // Interval of the first retry. If backoffCoefficient is 1.0 then it is used for all retries. - google.protobuf.Duration initial_interval = 1; - - // Coefficient used to calculate the next retry interval. - // The next retry interval is previous interval multiplied by the coefficient. - // Must be 1 or larger. - double backoff_coefficient = 2; - - // Maximum interval between retries. Exponential backoff leads to interval increase. - // This value is the cap of the increase. Default is 100x of initial interval. - google.protobuf.Duration maximum_interval = 3; - - // Maximum number of attempts. When exceeded the retries stop even if not expired yet. - // Must be 1 or bigger. Default is unlimited. - int32 maximum_attempts = 4; - - // Non-Retryable errors. Will stop retrying if error type matches this list. - repeated string non_retryable_error_reasons = 5; - - // Expiration time for the whole retry process. - google.protobuf.Duration expiration_interval = 6; -} diff --git a/proto/public/uber/cadence/api/v1/decision.proto b/proto/public/uber/cadence/api/v1/decision.proto deleted file mode 100644 index 1b5e7e0cfa6..00000000000 --- a/proto/public/uber/cadence/api/v1/decision.proto +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (c) 2020 Uber Technologies, Inc. -// -// 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 uber.cadence.api.v1; - -option go_package = "github.com/uber/cadence/.gen/proto/api/v1;apiv1"; -option java_multiple_files = true; -option java_outer_classname = "ApiProto"; -option java_package = "com.uber.cadence.api.v1"; - -import "google/protobuf/duration.proto"; -import "uber/cadence/api/v1/common.proto"; -import "uber/cadence/api/v1/tasklist.proto"; -import "uber/cadence/api/v1/workflow.proto"; - -message Decision { - oneof attributes { - ScheduleActivityTaskDecisionAttributes schedule_activity_task_decision_attributes = 1; - StartTimerDecisionAttributes start_timer_decision_attributes = 2; - CompleteWorkflowExecutionDecisionAttributes complete_workflow_execution_decision_attributes = 3; - FailWorkflowExecutionDecisionAttributes fail_workflow_execution_decision_attributes = 4; - RequestCancelActivityTaskDecisionAttributes request_cancel_activity_task_decision_attributes = 5; - CancelTimerDecisionAttributes cancel_timer_decision_attributes = 6; - CancelWorkflowExecutionDecisionAttributes cancel_workflow_execution_decision_attributes = 7; - RequestCancelExternalWorkflowExecutionDecisionAttributes request_cancel_external_workflow_execution_decision_attributes = 8; - RecordMarkerDecisionAttributes record_marker_decision_attributes = 9; - ContinueAsNewWorkflowExecutionDecisionAttributes continue_as_new_workflow_execution_decision_attributes = 10; - StartChildWorkflowExecutionDecisionAttributes start_child_workflow_execution_decision_attributes = 11; - SignalExternalWorkflowExecutionDecisionAttributes signal_external_workflow_execution_decision_attributes = 12; - UpsertWorkflowSearchAttributesDecisionAttributes upsert_workflow_search_attributes_decision_attributes = 13; - } -} - -message ScheduleActivityTaskDecisionAttributes { - string activity_id = 1; - ActivityType activity_type = 2; - string domain = 3; - TaskList task_list = 4; - Payload input = 5; - google.protobuf.Duration schedule_to_close_timeout = 6; - google.protobuf.Duration schedule_to_start_timeout = 7; - google.protobuf.Duration start_to_close_timeout = 8; - google.protobuf.Duration heartbeat_timeout = 9; - RetryPolicy retry_policy = 11; - Header header = 12; - bool request_local_dispatch = 13; -} - -message StartTimerDecisionAttributes { - string timer_id = 1; - google.protobuf.Duration start_to_fire_timeout = 2; -} - -message CompleteWorkflowExecutionDecisionAttributes { - Payload result = 1; -} - -message FailWorkflowExecutionDecisionAttributes { - Failure failure = 1; -} - -message RequestCancelActivityTaskDecisionAttributes { - string activity_id = 1; -} - -message CancelTimerDecisionAttributes { - string timer_id = 1; -} - -message CancelWorkflowExecutionDecisionAttributes { - Payload details = 1; -} - -message RequestCancelExternalWorkflowExecutionDecisionAttributes { - string domain = 1; - WorkflowExecution workflow_execution = 2; - bytes control = 3; - bool child_workflow_only = 4; -} - -message RecordMarkerDecisionAttributes { - string marker_name = 1; - Payload details = 2; - Header header = 3; -} - -message ContinueAsNewWorkflowExecutionDecisionAttributes { - WorkflowType workflow_type = 1; - TaskList task_list = 2; - Payload input = 3; - google.protobuf.Duration execution_start_to_close_timeout = 4; - google.protobuf.Duration task_start_to_close_timeout = 5; - google.protobuf.Duration backoff_start_interval = 6; - RetryPolicy retry_policy = 7; - ContinueAsNewInitiator initiator = 8; - Failure failure = 9; - Payload last_completion_result = 10; - string cron_schedule = 11; - Header header = 12; - Memo memo = 13; - SearchAttributes search_attributes = 14; -} - -message StartChildWorkflowExecutionDecisionAttributes { - string domain = 1; - string workflow_id = 2; - WorkflowType workflow_type = 3; - TaskList task_list = 4; - Payload input = 5; - google.protobuf.Duration execution_start_to_close_timeout = 6; - google.protobuf.Duration task_start_to_close_timeout = 7; - ParentClosePolicy parent_close_policy = 8; - bytes control = 9; - WorkflowIdReusePolicy workflow_id_reuse_policy = 10; - RetryPolicy retry_policy = 11; - string cron_schedule = 12; - Header header = 13; - Memo memo = 14; - SearchAttributes search_attributes = 15; -} - -message SignalExternalWorkflowExecutionDecisionAttributes { - string domain = 1; - WorkflowExecution workflow_execution = 2; - string signal_name = 3; - Payload input = 4; - bytes control = 5; - bool child_workflow_only = 6; -} - -message UpsertWorkflowSearchAttributesDecisionAttributes { - SearchAttributes search_attributes = 1; -} diff --git a/proto/public/uber/cadence/api/v1/domain.proto b/proto/public/uber/cadence/api/v1/domain.proto deleted file mode 100644 index 47c29fbe474..00000000000 --- a/proto/public/uber/cadence/api/v1/domain.proto +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) 2020 Uber Technologies, Inc. -// -// 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 uber.cadence.api.v1; - -option go_package = "github.com/uber/cadence/.gen/proto/api/v1;apiv1"; -option java_multiple_files = true; -option java_outer_classname = "ApiProto"; -option java_package = "com.uber.cadence.api.v1"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; - -message Domain { - string id = 1; - string name = 2; - DomainStatus status = 3; - string description = 4; - string owner_email = 5; - map data = 6; - google.protobuf.Duration workflow_execution_retention_period = 7; - BadBinaries bad_binaries = 8; - ArchivalStatus history_archival_status = 9; - string history_archival_uri = 10; - ArchivalStatus visibility_archival_status = 11; - string visibility_archival_uri = 12; - string active_cluster_name = 13; - repeated ClusterReplicationConfiguration clusters = 14; - int64 failover_version = 15; - bool is_global_domain = 16; -} - -message ClusterReplicationConfiguration { - string cluster_name = 1; -} - -message BadBinaries { - map binaries = 1; -} - -message BadBinaryInfo { - string reason = 1; - string operator = 2; - google.protobuf.Timestamp created_time = 3; -} - -enum DomainStatus { - DOMAIN_STATUS_INVALID = 0; - DOMAIN_STATUS_REGISTERED = 1; - DOMAIN_STATUS_DEPRECATED = 2; - DOMAIN_STATUS_DELETED = 3; -} - -enum ArchivalStatus { - ARCHIVAL_STATUS_INVALID = 0; - ARCHIVAL_STATUS_DISABLED = 1; - ARCHIVAL_STATUS_ENABLED = 2; -} diff --git a/proto/public/uber/cadence/api/v1/error.proto b/proto/public/uber/cadence/api/v1/error.proto deleted file mode 100644 index b6d0de0b27a..00000000000 --- a/proto/public/uber/cadence/api/v1/error.proto +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2020 Uber Technologies, Inc. -// -// 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 uber.cadence.api.v1; - -option go_package = "github.com/uber/cadence/.gen/proto/api/v1;apiv1"; -option java_multiple_files = true; -option java_outer_classname = "ApiProto"; -option java_package = "com.uber.cadence.api.v1"; - -message WorkflowExecutionAlreadyStartedError { - string start_request_id = 1; - string run_id = 2; -} - -message EntityNotExistsError { - string current_cluster = 1; - string active_cluster = 2; -} - -message DomainNotActiveError { - string domain = 1; - string current_cluster = 2; - string active_cluster = 3; -} - -message ClientVersionNotSupportedError { - string feature_version = 1; - string client_impl = 2; - string supported_versions = 3; -} - -message CancellationAlreadyRequestedError { -} - -message DomainAlreadyExistsError { -} - -message LimitExceededError { -} - -message QueryFailedError { -} - -message ServiceBusyError { -} diff --git a/proto/public/uber/cadence/api/v1/history.proto b/proto/public/uber/cadence/api/v1/history.proto deleted file mode 100644 index dd4d4918de9..00000000000 --- a/proto/public/uber/cadence/api/v1/history.proto +++ /dev/null @@ -1,455 +0,0 @@ -// Copyright (c) 2020 Uber Technologies, Inc. -// -// 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 uber.cadence.api.v1; - -option go_package = "github.com/uber/cadence/.gen/proto/api/v1;apiv1"; -option java_multiple_files = true; -option java_outer_classname = "ApiProto"; -option java_package = "com.uber.cadence.api.v1"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; -import "uber/cadence/api/v1/common.proto"; -import "uber/cadence/api/v1/tasklist.proto"; -import "uber/cadence/api/v1/workflow.proto"; - -message History { - repeated HistoryEvent events = 1; -} - -message HistoryEvent { - int64 event_id = 1; - google.protobuf.Timestamp event_time = 2; - int64 version = 3; - int64 task_id = 4; - oneof attributes { - WorkflowExecutionStartedEventAttributes workflow_execution_started_event_attributes = 5; - WorkflowExecutionCompletedEventAttributes workflow_execution_completed_event_attributes = 6; - WorkflowExecutionFailedEventAttributes workflow_execution_failed_event_attributes = 7; - WorkflowExecutionTimedOutEventAttributes workflow_execution_timed_out_event_attributes = 8; - DecisionTaskScheduledEventAttributes decision_task_scheduled_event_attributes = 9; - DecisionTaskStartedEventAttributes decision_task_started_event_attributes = 10; - DecisionTaskCompletedEventAttributes decision_task_completed_event_attributes = 11; - DecisionTaskTimedOutEventAttributes decision_task_timed_out_event_attributes = 12; - DecisionTaskFailedEventAttributes decision_task_failed_event_attributes = 13; - ActivityTaskScheduledEventAttributes activity_task_scheduled_event_attributes = 14; - ActivityTaskStartedEventAttributes activity_task_started_event_attributes = 15; - ActivityTaskCompletedEventAttributes activity_task_completed_event_attributes = 16; - ActivityTaskFailedEventAttributes activity_task_failed_event_attributes = 17; - ActivityTaskTimedOutEventAttributes activity_task_timed_out_event_attributes = 18; - TimerStartedEventAttributes timer_started_event_attributes = 19; - TimerFiredEventAttributes timer_fired_event_attributes = 20; - ActivityTaskCancelRequestedEventAttributes activity_task_cancel_requested_event_attributes = 21; - RequestCancelActivityTaskFailedEventAttributes request_cancel_activity_task_failed_event_attributes = 22; - ActivityTaskCanceledEventAttributes activity_task_canceled_event_attributes = 23; - TimerCanceledEventAttributes timer_canceled_event_attributes = 24; - CancelTimerFailedEventAttributes cancel_timer_failed_event_attributes = 25; - MarkerRecordedEventAttributes marker_recorded_event_attributes = 26; - WorkflowExecutionSignaledEventAttributes workflow_execution_signaled_event_attributes = 27; - WorkflowExecutionTerminatedEventAttributes workflow_execution_terminated_event_attributes = 28; - WorkflowExecutionCancelRequestedEventAttributes workflow_execution_cancel_requested_event_attributes = 29; - WorkflowExecutionCanceledEventAttributes workflow_execution_canceled_event_attributes = 30; - RequestCancelExternalWorkflowExecutionInitiatedEventAttributes request_cancel_external_workflow_execution_initiated_event_attributes = 31; - RequestCancelExternalWorkflowExecutionFailedEventAttributes request_cancel_external_workflow_execution_failed_event_attributes = 32; - ExternalWorkflowExecutionCancelRequestedEventAttributes external_workflow_execution_cancel_requested_event_attributes = 33; - WorkflowExecutionContinuedAsNewEventAttributes workflow_execution_continued_as_new_event_attributes = 34; - StartChildWorkflowExecutionInitiatedEventAttributes start_child_workflow_execution_initiated_event_attributes = 35; - StartChildWorkflowExecutionFailedEventAttributes start_child_workflow_execution_failed_event_attributes = 36; - ChildWorkflowExecutionStartedEventAttributes child_workflow_execution_started_event_attributes = 37; - ChildWorkflowExecutionCompletedEventAttributes child_workflow_execution_completed_event_attributes = 38; - ChildWorkflowExecutionFailedEventAttributes child_workflow_execution_failed_event_attributes = 39; - ChildWorkflowExecutionCanceledEventAttributes child_workflow_execution_canceled_event_attributes = 40; - ChildWorkflowExecutionTimedOutEventAttributes child_workflow_execution_timed_out_event_attributes = 41; - ChildWorkflowExecutionTerminatedEventAttributes child_workflow_execution_terminated_event_attributes = 42; - SignalExternalWorkflowExecutionInitiatedEventAttributes signal_external_workflow_execution_initiated_event_attributes = 43; - SignalExternalWorkflowExecutionFailedEventAttributes signal_external_workflow_execution_failed_event_attributes = 44; - ExternalWorkflowExecutionSignaledEventAttributes external_workflow_execution_signaled_event_attributes = 45; - UpsertWorkflowSearchAttributesEventAttributes upsert_workflow_search_attributes_event_attributes = 46; - } -} - -message WorkflowExecutionStartedEventAttributes { - WorkflowType workflow_type = 1; - ParentExecutionInfo parent_execution_info = 2; - TaskList task_list = 3; - Payload input = 4; - google.protobuf.Duration execution_start_to_close_timeout = 5; - google.protobuf.Duration task_start_to_close_timeout = 6; - string continued_execution_run_id = 7; - ContinueAsNewInitiator initiator = 8; - Failure continued_failure = 9; - Payload last_completion_result = 10; - // This is the previous runID of ContinueAsNew. - string original_execution_run_id = 11; - string identity = 12; - // This is the very first runID along the chain of ContinueAsNew and Reset. - string first_execution_run_id = 13; - RetryPolicy retry_policy = 14; - int32 attempt = 15; - google.protobuf.Timestamp expiration_time = 16; - string cron_schedule = 17; - google.protobuf.Duration first_decision_task_backoff = 18; - Memo memo = 19; - SearchAttributes search_attributes = 20; - ResetPoints prev_auto_reset_points = 21; - Header header = 22; -} - -message WorkflowExecutionCompletedEventAttributes { - Payload result = 1; - int64 decision_task_completed_event_id = 2; -} - -message WorkflowExecutionFailedEventAttributes { - Failure failure = 1; - int64 decision_task_completed_event_id = 2; -} - -message WorkflowExecutionTimedOutEventAttributes { - TimeoutType timeout_type = 1; -} - -message DecisionTaskScheduledEventAttributes { - TaskList task_list = 1; - google.protobuf.Duration start_to_close_timeout = 2; - int32 attempt = 3; -} - -message DecisionTaskStartedEventAttributes { - int64 scheduled_event_id = 1; - string identity = 2; - string request_id = 3; -} - -message DecisionTaskCompletedEventAttributes { - int64 scheduled_event_id = 1; - int64 started_event_id = 2; - string identity = 3; - string binary_checksum = 4; - bytes execution_context = 5; -} - -message DecisionTaskTimedOutEventAttributes { - int64 scheduled_event_id = 1; - int64 started_event_id = 2; - TimeoutType timeout_type = 3; - // For reset workflow. - string base_run_id = 4; - string new_run_id = 5; - int64 fork_event_version = 6; - string reason = 7; - DecisionTaskTimedOutCause cause = 8; -} - -message DecisionTaskFailedEventAttributes { - int64 scheduled_event_id = 1; - int64 started_event_id = 2; - DecisionTaskFailedCause cause = 3; - Failure failure = 4; - string identity = 5; - // For reset workflow. - string base_run_id = 6; - string new_run_id = 7; - int64 fork_event_version = 8; - string binary_checksum = 9; -} - -message ActivityTaskScheduledEventAttributes { - string activity_id = 1; - ActivityType activity_type = 2; - string domain = 3; - TaskList task_list = 4; - Payload input = 6; - google.protobuf.Duration schedule_to_close_timeout = 7; - google.protobuf.Duration schedule_to_start_timeout = 8; - google.protobuf.Duration start_to_close_timeout = 9; - google.protobuf.Duration heartbeat_timeout = 10; - int64 decision_task_completed_event_id = 11; - RetryPolicy retry_policy = 12; - Header header = 13; -} - -message ActivityTaskStartedEventAttributes { - int64 scheduled_event_id = 1; - string identity = 2; - string request_id = 3; - int32 attempt = 4; - Failure last_failure = 5; -} - -message ActivityTaskCompletedEventAttributes { - Payload result = 1; - int64 scheduled_event_id = 2; - int64 started_event_id = 3; - string identity = 4; -} - -message ActivityTaskFailedEventAttributes { - Failure failure = 1; - int64 scheduled_event_id = 2; - int64 started_event_id = 3; - string identity = 4; -} - -message ActivityTaskTimedOutEventAttributes { - Payload details = 1; - int64 scheduled_event_id = 2; - int64 started_event_id = 3; - TimeoutType timeout_type = 4; - // For retry activity, it may have a failure before timeout. It's important to keep those information for debug. - // Client can also provide the info for making next decision - Failure last_failure = 5; -} - -message ActivityTaskCancelRequestedEventAttributes { - string activity_id = 1; - int64 decision_task_completed_event_id = 2; -} - -message RequestCancelActivityTaskFailedEventAttributes { - string activity_id = 1; - string cause = 2; - int64 decision_task_completed_event_id = 3; -} - -message ActivityTaskCanceledEventAttributes { - Payload details = 1; - int64 latest_cancel_requested_event_id = 2; - int64 scheduled_event_id = 3; - int64 started_event_id = 4; - string identity = 5; -} - -message TimerStartedEventAttributes { - string timer_id = 1; - google.protobuf.Duration start_to_fire_timeout = 2; - int64 decision_task_completed_event_id = 3; -} - -message TimerFiredEventAttributes { - string timer_id = 1; - int64 started_event_id = 2; -} - -message TimerCanceledEventAttributes { - string timer_id = 1; - int64 started_event_id = 2; - int64 decision_task_completed_event_id = 3; - string identity = 4; -} - -message CancelTimerFailedEventAttributes { - string timer_id = 1; - string cause = 2; - int64 decision_task_completed_event_id = 3; - string identity = 4; -} - -message WorkflowExecutionContinuedAsNewEventAttributes { - string new_execution_run_id = 1; - WorkflowType workflow_type = 2; - TaskList task_list = 3; - Payload input = 4; - google.protobuf.Duration execution_start_to_close_timeout = 5; - google.protobuf.Duration task_start_to_close_timeout = 6; - int64 decision_task_completed_event_id = 7; - google.protobuf.Duration backoff_start_interval = 8; - ContinueAsNewInitiator initiator = 9; - Failure failure = 10; - Payload last_completion_result = 11; - Header header = 12; - Memo memo = 13; - SearchAttributes search_attributes = 14; -} - -message WorkflowExecutionCancelRequestedEventAttributes { - string cause = 1; - string identity = 2; - ExternalExecutionInfo external_execution_info = 3; -} - -message WorkflowExecutionCanceledEventAttributes { - int64 decision_task_completed_event_id = 1; - Payload details = 2; -} - -message MarkerRecordedEventAttributes { - string marker_name = 1; - Payload details = 2; - int64 decision_task_completed_event_id = 3; - Header header = 4; -} - -message WorkflowExecutionSignaledEventAttributes { - string signal_name = 1; - Payload input = 2; - string identity = 3; -} - -message WorkflowExecutionTerminatedEventAttributes { - string reason = 1; - Payload details = 2; - string identity = 3; -} - -message RequestCancelExternalWorkflowExecutionInitiatedEventAttributes { - int64 decision_task_completed_event_id = 1; - string domain = 2; - WorkflowExecution workflow_execution = 3; - bytes control = 4; - bool child_workflow_only = 5; -} - -message RequestCancelExternalWorkflowExecutionFailedEventAttributes { - CancelExternalWorkflowExecutionFailedCause cause = 1; - int64 decision_task_completed_event_id = 2; - string domain = 3; - WorkflowExecution workflow_execution = 4; - int64 initiated_event_id = 5; - bytes control = 6; -} - -message ExternalWorkflowExecutionCancelRequestedEventAttributes { - int64 initiated_event_id = 1; - string domain = 2; - WorkflowExecution workflow_execution = 3; -} - -message SignalExternalWorkflowExecutionInitiatedEventAttributes { - int64 decision_task_completed_event_id = 1; - string domain = 2; - WorkflowExecution workflow_execution = 3; - string signal_name = 4; - Payload input = 5; - bytes control = 6; - bool child_workflow_only = 7; -} - -message SignalExternalWorkflowExecutionFailedEventAttributes { - SignalExternalWorkflowExecutionFailedCause cause = 1; - int64 decision_task_completed_event_id = 2; - string domain = 3; - WorkflowExecution workflow_execution = 4; - int64 initiated_event_id = 5; - bytes control = 6; -} - -message ExternalWorkflowExecutionSignaledEventAttributes { - int64 initiated_event_id = 1; - string domain = 2; - WorkflowExecution workflow_execution = 3; - bytes control = 4; -} - -message UpsertWorkflowSearchAttributesEventAttributes { - int64 decision_task_completed_event_id = 1; - SearchAttributes search_attributes = 2; -} - -message StartChildWorkflowExecutionInitiatedEventAttributes { - string domain = 1; - string workflow_id = 2; - WorkflowType workflow_type = 3; - TaskList task_list = 4; - Payload input = 5; - google.protobuf.Duration execution_start_to_close_timeout = 6; - google.protobuf.Duration task_start_to_close_timeout = 7; - ParentClosePolicy parent_close_policy = 8; - bytes control = 9; - int64 decision_task_completed_event_id = 10; - WorkflowIdReusePolicy workflow_id_reuse_policy = 11; - RetryPolicy retry_policy = 13; - string cron_schedule = 14; - Header header = 15; - Memo memo = 16; - SearchAttributes search_attributes = 17; - google.protobuf.Duration delay_start = 18; -} - -message StartChildWorkflowExecutionFailedEventAttributes { - string domain = 1; - string workflow_id = 2; - WorkflowType workflow_type = 3; - ChildWorkflowExecutionFailedCause cause = 4; - bytes control = 5; - int64 initiated_event_id = 6; - int64 decision_task_completed_event_id = 7; -} - -message ChildWorkflowExecutionStartedEventAttributes { - string domain = 1; - WorkflowExecution workflow_execution = 2; - WorkflowType workflow_type = 3; - int64 initiated_event_id = 4; - Header header = 5; -} - -message ChildWorkflowExecutionCompletedEventAttributes { - string domain = 1; - WorkflowExecution workflow_execution = 2; - WorkflowType workflow_type = 3; - int64 initiated_event_id = 4; - int64 started_event_id = 5; - Payload result = 6; -} - -message ChildWorkflowExecutionFailedEventAttributes { - string domain = 1; - WorkflowExecution workflow_execution = 2; - WorkflowType workflow_type = 3; - int64 initiated_event_id = 4; - int64 started_event_id = 5; - Failure failure = 6; -} - -message ChildWorkflowExecutionCanceledEventAttributes { - string domain = 1; - WorkflowExecution workflow_execution = 2; - WorkflowType workflow_type = 3; - int64 initiated_event_id = 4; - int64 started_event_id = 5; - Payload details = 6; -} - -message ChildWorkflowExecutionTimedOutEventAttributes { - string domain = 1; - WorkflowExecution workflow_execution = 2; - WorkflowType workflow_type = 3; - int64 initiated_event_id = 4; - int64 started_event_id = 5; - TimeoutType timeout_type = 6; -} - -message ChildWorkflowExecutionTerminatedEventAttributes { - string domain = 1; - WorkflowExecution workflow_execution = 2; - WorkflowType workflow_type = 3; - int64 initiated_event_id = 4; - int64 started_event_id = 5; -} - -enum EventFilterType { - EVENT_FILTER_TYPE_INVALID = 0; - EVENT_FILTER_TYPE_ALL_EVENT = 1; - EVENT_FILTER_TYPE_CLOSE_EVENT = 2; -} diff --git a/proto/public/uber/cadence/api/v1/query.proto b/proto/public/uber/cadence/api/v1/query.proto deleted file mode 100644 index 176c3bf5901..00000000000 --- a/proto/public/uber/cadence/api/v1/query.proto +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) 2020 Uber Technologies, Inc. -// -// 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 uber.cadence.api.v1; - -option go_package = "github.com/uber/cadence/.gen/proto/api/v1;apiv1"; -option java_multiple_files = true; -option java_outer_classname = "ApiProto"; -option java_package = "com.uber.cadence.api.v1"; - -import "uber/cadence/api/v1/common.proto"; -import "uber/cadence/api/v1/workflow.proto"; - -message WorkflowQuery { - string query_type = 1; - Payload query_args = 2; -} - -message WorkflowQueryResult { - QueryResultType result_type = 1; - Payload answer = 2; - string error_message = 3; -} - -message QueryRejected { - WorkflowExecutionCloseStatus close_status = 1; -} - -enum QueryResultType { - QUERY_RESULT_TYPE_INVALID = 0; - QUERY_RESULT_TYPE_ANSWERED = 1; - QUERY_RESULT_TYPE_FAILED = 2; -} - -enum QueryRejectCondition { - QUERY_REJECT_CONDITION_INVALID = 0; - - // QUERY_REJECT_CONDITION_NOT_OPEN indicates that query should be rejected if workflow is not open. - QUERY_REJECT_CONDITION_NOT_OPEN = 1; - - // QUERY_REJECT_CONDITION_NOT_COMPLETED_CLEANLY indicates that query should be rejected if workflow did not complete cleanly. - QUERY_REJECT_CONDITION_NOT_COMPLETED_CLEANLY = 2; -} - -enum QueryConsistencyLevel { - QUERY_CONSISTENCY_LEVEL_INVALID = 0; - - // EVENTUAL indicates that query should be eventually consistent. - QUERY_CONSISTENCY_LEVEL_EVENTUAL = 1; - - // STRONG indicates that any events that came before query should be reflected in workflow state before running query. - QUERY_CONSISTENCY_LEVEL_STRONG = 2; -} diff --git a/proto/public/uber/cadence/api/v1/service_domain.proto b/proto/public/uber/cadence/api/v1/service_domain.proto deleted file mode 100644 index 0e6ecf522e1..00000000000 --- a/proto/public/uber/cadence/api/v1/service_domain.proto +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) 2020 Uber Technologies, Inc. -// -// 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 uber.cadence.api.v1; - -option go_package = "github.com/uber/cadence/.gen/proto/api/v1;apiv1"; -option java_multiple_files = true; -option java_outer_classname = "ApiProto"; -option java_package = "com.uber.cadence.api.v1"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/field_mask.proto"; -import "uber/cadence/api/v1/domain.proto"; - -service DomainAPI { - // RegisterDomain creates a new domain which can be used as a container for all resources. Domain is a top level - // entity within Cadence, used as a container for all resources like workflow executions, task lists, etc. Domain - // acts as a sandbox and provides isolation for all resources within the domain. All resources belongs to exactly one - // domain. - rpc RegisterDomain(RegisterDomainRequest) returns (RegisterDomainResponse); - - // DescribeDomain returns the information and configuration for a registered domain. - rpc DescribeDomain(DescribeDomainRequest) returns (DescribeDomainResponse); - - // ListDomains returns the information and configuration for all domains. - rpc ListDomains(ListDomainsRequest) returns (ListDomainsResponse); - - // UpdateDomain is used to update the information and configuration for a registered domain. - rpc UpdateDomain(UpdateDomainRequest) returns (UpdateDomainResponse); - - // DeprecateDomain us used to update status of a registered domain to DEPRECATED. Once the domain is deprecated - // it cannot be used to start new workflow executions. Existing workflow executions will continue to run on - // deprecated domains. - rpc DeprecateDomain(DeprecateDomainRequest) returns (DeprecateDomainResponse); -} - -message RegisterDomainRequest { - string security_token = 1; - string name = 2; - string description = 3; - string owner_email = 4; - google.protobuf.Duration workflow_execution_retention_period = 5; - repeated ClusterReplicationConfiguration clusters = 6; - string active_cluster_name = 7; - map data = 8; - bool is_global_domain = 9; - ArchivalStatus history_archival_status = 10; - string history_archival_uri = 11; - ArchivalStatus visibility_archival_status = 12; - string visibility_archival_uri = 13; -} - -message RegisterDomainResponse { -} - -message UpdateDomainRequest { - string security_token = 1; - string name = 2; - - // Below are the fields that can be updated if specified by update_mask. - google.protobuf.FieldMask update_mask = 10; - string description = 11; - string owner_email = 12; - map data = 13; - google.protobuf.Duration workflow_execution_retention_period = 14; - BadBinaries bad_binaries = 15; - ArchivalStatus history_archival_status = 16; - string history_archival_uri = 17; - ArchivalStatus visibility_archival_status = 18; - string visibility_archival_uri = 19; - string active_cluster_name = 20; - repeated ClusterReplicationConfiguration clusters = 21; - string delete_bad_binary = 22; - google.protobuf.Duration failover_timeout = 23; -} - -message UpdateDomainResponse { - Domain domain = 1; -} - -message DeprecateDomainRequest { - string security_token = 1; - string name = 2; -} - -message DeprecateDomainResponse { -} - -message DescribeDomainRequest { - oneof describe_by { - string id = 1; - string name = 2; - } -} - -message DescribeDomainResponse { - Domain domain = 1; -} - -message ListDomainsRequest { - int32 page_size = 1; - bytes next_page_token = 2; -} - -message ListDomainsResponse { - repeated Domain domains = 1; - bytes next_page_token = 2; -} diff --git a/proto/public/uber/cadence/api/v1/service_meta.proto b/proto/public/uber/cadence/api/v1/service_meta.proto deleted file mode 100644 index 3bc42e288fa..00000000000 --- a/proto/public/uber/cadence/api/v1/service_meta.proto +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2020 Uber Technologies, Inc. -// -// 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 uber.cadence.api.v1; - -option go_package = "github.com/uber/cadence/.gen/proto/api/v1;apiv1"; -option java_multiple_files = true; -option java_outer_classname = "ApiProto"; -option java_package = "com.uber.cadence.api.v1"; - -service MetaAPI { - rpc Health(HealthRequest) returns(HealthResponse); -} - -message HealthRequest { -} - -message HealthResponse { - bool ok = 1; - string message = 2; -} diff --git a/proto/public/uber/cadence/api/v1/service_visibility.proto b/proto/public/uber/cadence/api/v1/service_visibility.proto deleted file mode 100644 index 6720b608c87..00000000000 --- a/proto/public/uber/cadence/api/v1/service_visibility.proto +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright (c) 2020 Uber Technologies, Inc. -// -// 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 uber.cadence.api.v1; - -option go_package = "github.com/uber/cadence/.gen/proto/api/v1;apiv1"; -option java_multiple_files = true; -option java_outer_classname = "ApiProto"; -option java_package = "com.uber.cadence.api.v1"; - -import "uber/cadence/api/v1/visibility.proto"; -import "uber/cadence/api/v1/workflow.proto"; - -service VisibilityAPI { - // ListWorkflowExecutions is a visibility API to list workflow executions in a specific domain. - rpc ListWorkflowExecutions(ListWorkflowExecutionsRequest) returns (ListWorkflowExecutionsResponse); - - // ListOpenWorkflowExecutions is a visibility API to list the open executions in a specific domain. - rpc ListOpenWorkflowExecutions(ListOpenWorkflowExecutionsRequest) returns (ListOpenWorkflowExecutionsResponse); - - // ListClosedWorkflowExecutions is a visibility API to list the closed executions in a specific domain. - rpc ListClosedWorkflowExecutions(ListClosedWorkflowExecutionsRequest) returns (ListClosedWorkflowExecutionsResponse); - - // ListArchivedWorkflowExecutions is a visibility API to list archived workflow executions in a specific domain. - rpc ListArchivedWorkflowExecutions(ListArchivedWorkflowExecutionsRequest) returns (ListArchivedWorkflowExecutionsResponse); - - // ScanWorkflowExecutions is a visibility API to list large amount of workflow executions in a specific domain without order. - rpc ScanWorkflowExecutions(ScanWorkflowExecutionsRequest) returns (ScanWorkflowExecutionsResponse); - - // CountWorkflowExecutions is a visibility API to count of workflow executions in a specific domain. - rpc CountWorkflowExecutions(CountWorkflowExecutionsRequest) returns (CountWorkflowExecutionsResponse); - - // GetSearchAttributes is a visibility API to get all legal keys that could be used in list APIs. - rpc GetSearchAttributes(GetSearchAttributesRequest) returns (GetSearchAttributesResponse); -} - - -message ListWorkflowExecutionsRequest { - string domain = 1; - int32 page_size = 2; - bytes next_page_token = 3; - string query = 4; -} - -message ListWorkflowExecutionsResponse { - repeated WorkflowExecutionInfo executions = 1; - bytes next_page_token = 2; -} - -message ListOpenWorkflowExecutionsRequest { - string domain = 1; - int32 page_size = 2; - bytes next_page_token = 3; - StartTimeFilter start_time_filter = 4; - oneof filters { - WorkflowExecutionFilter execution_filter = 5; - WorkflowTypeFilter type_filter = 6; - } -} - -message ListOpenWorkflowExecutionsResponse { - repeated WorkflowExecutionInfo executions = 1; - bytes next_page_token = 2; -} - -message ListClosedWorkflowExecutionsRequest { - string domain = 1; - int32 page_size = 2; - bytes next_page_token = 3; - StartTimeFilter start_time_filter = 4; - oneof filters { - WorkflowExecutionFilter execution_filter = 5; - WorkflowTypeFilter type_filter = 6; - StatusFilter status_filter = 7; - } -} - -message ListClosedWorkflowExecutionsResponse { - repeated WorkflowExecutionInfo executions = 1; - bytes next_page_token = 2; -} - -message ListArchivedWorkflowExecutionsRequest { - string domain = 1; - int32 page_size = 2; - bytes next_page_token = 3; - string query = 4; -} - -message ListArchivedWorkflowExecutionsResponse { - repeated WorkflowExecutionInfo executions = 1; - bytes next_page_token = 2; -} - -message ScanWorkflowExecutionsRequest { - string domain = 1; - int32 page_size = 2; - bytes next_page_token = 3; - string query = 4; -} - -message ScanWorkflowExecutionsResponse { - repeated WorkflowExecutionInfo executions = 1; - bytes next_page_token = 2; -} - -message CountWorkflowExecutionsRequest { - string domain = 1; - string query = 2; -} - -message CountWorkflowExecutionsResponse { - int64 count = 1; -} - -message GetSearchAttributesRequest { -} - -message GetSearchAttributesResponse { - map keys = 1; -} \ No newline at end of file diff --git a/proto/public/uber/cadence/api/v1/service_worker.proto b/proto/public/uber/cadence/api/v1/service_worker.proto deleted file mode 100644 index 8ebaa2dca31..00000000000 --- a/proto/public/uber/cadence/api/v1/service_worker.proto +++ /dev/null @@ -1,323 +0,0 @@ -// Copyright (c) 2020 Uber Technologies, Inc. -// -// 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 uber.cadence.api.v1; - -option go_package = "github.com/uber/cadence/.gen/proto/api/v1;apiv1"; -option java_multiple_files = true; -option java_outer_classname = "ApiProto"; -option java_package = "com.uber.cadence.api.v1"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/wrappers.proto"; -import "uber/cadence/api/v1/common.proto"; -import "uber/cadence/api/v1/decision.proto"; -import "uber/cadence/api/v1/history.proto"; -import "uber/cadence/api/v1/query.proto"; -import "uber/cadence/api/v1/tasklist.proto"; -import "uber/cadence/api/v1/workflow.proto"; - -// WorkerAPI is exposed to provide support for long running applications. Such applications are -// expected to have a worker which regularly polls for DecisionTask and ActivityTask from the WorkflowService. For each -// DecisionTask, application is expected to process the history of events for that session and respond back with next -// decisions. For each ActivityTask, application is expected to execute the actual logic for that task and respond back -// with completion or failure. Worker is expected to regularly heartbeat while activity task is running. -service WorkerAPI { - // PollForDecisionTask is called by application worker to process DecisionTask from a specific taskList. - // A DecisionTask is dispatched to callers for active workflow executions, with pending decisions. - // Application is then expected to call 'RespondDecisionTaskCompleted' API when it is done processing the DecisionTask. - // It will also create a 'DecisionTaskStarted' event in the history for that session before handing off DecisionTask to - // application worker. - rpc PollForDecisionTask(PollForDecisionTaskRequest) returns (PollForDecisionTaskResponse); - - // RespondDecisionTaskCompleted is called by application worker to complete a DecisionTask handed as a result of - // 'PollForDecisionTask' API call. Completing a DecisionTask will result in new events for the workflow execution and - // potentially new ActivityTask being created for corresponding decisions. It will also create a DecisionTaskCompleted - // event in the history for that session. Use the 'taskToken' provided as response of PollForDecisionTask API call - // for completing the DecisionTask. - // The response could contain a new decision task if there is one or if the request asking for one. - rpc RespondDecisionTaskCompleted(RespondDecisionTaskCompletedRequest) returns (RespondDecisionTaskCompletedResponse); - - // RespondDecisionTaskFailed is called by application worker to indicate failure. This results in - // DecisionTaskFailedEvent written to the history and a new DecisionTask created. This API can be used by client to - // either clear sticky tasklist or report any panics during DecisionTask processing. Cadence will only append first - // DecisionTaskFailed event to the history of workflow execution for consecutive failures. - rpc RespondDecisionTaskFailed(RespondDecisionTaskFailedRequest) returns (RespondDecisionTaskFailedResponse); - - - // PollForActivityTask is called by application worker to process ActivityTask from a specific taskList. ActivityTask - // is dispatched to callers whenever a ScheduleTask decision is made for a workflow execution. - // Application is expected to call 'RespondActivityTaskCompleted' or 'RespondActivityTaskFailed' once it is done - // processing the task. - // Application also needs to call 'RecordActivityTaskHeartbeat' API within 'heartbeatTimeoutSeconds' interval to - // prevent the task from getting timed out. An event 'ActivityTaskStarted' event is also written to workflow execution - // history before the ActivityTask is dispatched to application worker. - rpc PollForActivityTask(PollForActivityTaskRequest) returns (PollForActivityTaskResponse); - - // RespondActivityTaskCompleted is called by application worker when it is done processing an ActivityTask. It will - // result in a new 'ActivityTaskCompleted' event being written to the workflow history and a new DecisionTask - // created for the workflow so new decisions could be made. Use the 'taskToken' provided as response of - // PollForActivityTask API call for completion. It fails with 'EntityNotExistsError' if the taskToken is not valid - // anymore due to activity timeout. - rpc RespondActivityTaskCompleted(RespondActivityTaskCompletedRequest) returns (RespondActivityTaskCompletedResponse); - - // RespondActivityTaskCompletedByID is called by application worker when it is done processing an ActivityTask. - // It will result in a new 'ActivityTaskCompleted' event being written to the workflow history and a new DecisionTask - // created for the workflow so new decisions could be made. Similar to RespondActivityTaskCompleted but use Domain, - // WorkflowID and ActivityID instead of 'taskToken' for completion. It fails with 'EntityNotExistsError' - // if the these IDs are not valid anymore due to activity timeout. - rpc RespondActivityTaskCompletedByID(RespondActivityTaskCompletedByIDRequest) returns (RespondActivityTaskCompletedByIDResponse); - - // RespondActivityTaskFailed is called by application worker when it is done processing an ActivityTask. It will - // result in a new 'ActivityTaskFailed' event being written to the workflow history and a new DecisionTask - // created for the workflow instance so new decisions could be made. Use the 'taskToken' provided as response of - // PollForActivityTask API call for completion. It fails with 'EntityNotExistsError' if the taskToken is not valid - // anymore due to activity timeout. - rpc RespondActivityTaskFailed(RespondActivityTaskFailedRequest) returns (RespondActivityTaskFailedResponse); - - // RespondActivityTaskFailedByID is called by application worker when it is done processing an ActivityTask. - // It will result in a new 'ActivityTaskFailed' event being written to the workflow history and a new DecisionTask - // created for the workflow instance so new decisions could be made. Similar to RespondActivityTaskFailed but use - // Domain, WorkflowID and ActivityID instead of 'taskToken' for completion. It fails with 'EntityNotExistsError' - // if the these IDs are not valid anymore due to activity timeout. - rpc RespondActivityTaskFailedByID(RespondActivityTaskFailedByIDRequest) returns (RespondActivityTaskFailedByIDResponse); - - // RespondActivityTaskCanceled is called by application worker when it is successfully canceled an ActivityTask. - // It will result in a new 'ActivityTaskCanceled' event being written to the workflow history and a new DecisionTask - // created for the workflow instance so new decisions could be made. Use the 'taskToken' provided as response of - // PollForActivityTask API call for completion. It fails with 'EntityNotExistsError' if the taskToken is not valid - // anymore due to activity timeout. - rpc RespondActivityTaskCanceled(RespondActivityTaskCanceledRequest) returns (RespondActivityTaskCanceledResponse); - - // RespondActivityTaskCanceledByID is called by application worker when it is successfully canceled an ActivityTask. - // It will result in a new 'ActivityTaskCanceled' event being written to the workflow history and a new DecisionTask - // created for the workflow instance so new decisions could be made. Similar to RespondActivityTaskCanceled but use - // Domain, WorkflowID and ActivityID instead of 'taskToken' for completion. It fails with 'EntityNotExistsError' - // if the these IDs are not valid anymore due to activity timeout. - rpc RespondActivityTaskCanceledByID(RespondActivityTaskCanceledByIDRequest) returns (RespondActivityTaskCanceledByIDResponse); - - // RecordActivityTaskHeartbeat is called by application worker while it is processing an ActivityTask. If worker fails - // to heartbeat within 'heartbeatTimeoutSeconds' interval for the ActivityTask, then it will be marked as timedout and - // 'ActivityTaskTimedOut' event will be written to the workflow history. Calling 'RecordActivityTaskHeartbeat' will - // fail with 'EntityNotExistsError' in such situations. Use the 'taskToken' provided as response of - // PollForActivityTask API call for heartbeating. - rpc RecordActivityTaskHeartbeat(RecordActivityTaskHeartbeatRequest) returns (RecordActivityTaskHeartbeatResponse); - - // RecordActivityTaskHeartbeatByID is called by application worker while it is processing an ActivityTask. If worker - // fails to heartbeat within 'heartbeatTimeoutSeconds' interval for the ActivityTask, then it will be marked as - // timed out and 'ActivityTaskTimedOut' event will be written to the workflow history. - // Calling 'RecordActivityTaskHeartbeatByID' will fail with 'EntityNotExistsError' in such situations. Instead of - // using 'taskToken' like in RecordActivityTaskHeartbeat, use Domain, WorkflowID and ActivityID. - rpc RecordActivityTaskHeartbeatByID(RecordActivityTaskHeartbeatByIDRequest) returns (RecordActivityTaskHeartbeatByIDResponse); - - - // RespondQueryTaskCompleted is called by application worker to complete a QueryTask (which is a DecisionTask for query) - // as a result of 'PollForDecisionTask' API call. Completing a QueryTask will unblock the client call to 'QueryWorkflow' - // API and return the query result to client as a response to 'QueryWorkflow' API call. - rpc RespondQueryTaskCompleted(RespondQueryTaskCompletedRequest) returns (RespondQueryTaskCompletedResponse); - - // RequestCancelWorkflowExecution is called by application worker when it wants to request cancellation of a workflow - // instance. It will result in a new 'WorkflowExecutionCancelRequested' event being written to the workflow history - // and a new DecisionTask created for the workflow instance so new decisions could be made. It fails with - // 'EntityNotExistsError' if the workflow is not valid anymore due to completion or doesn't exist. - rpc RequestCancelWorkflowExecution(RequestCancelWorkflowExecutionRequest) returns (RequestCancelWorkflowExecutionResponse); -} - -message PollForDecisionTaskRequest { - string domain = 1; - TaskList task_list = 2; - string identity = 3; - string binary_checksum = 4; -} - -message PollForDecisionTaskResponse { - bytes task_token = 1; - WorkflowExecution workflow_execution = 2; - WorkflowType workflow_type = 3; - google.protobuf.Int64Value previous_started_event_id = 4; - int64 started_event_id = 5; - int64 attempt = 6; - int64 backlog_count_hint = 7; - History history = 8; - bytes next_page_token = 9; - WorkflowQuery query = 10; - TaskList workflow_execution_task_list = 11; - google.protobuf.Timestamp scheduled_time = 12; - google.protobuf.Timestamp started_time = 13; - map queries = 14; -} - -message RespondDecisionTaskCompletedRequest { - bytes task_token = 1; - repeated Decision decisions = 2; - bytes execution_context = 3; - string identity = 4; - StickyExecutionAttributes sticky_attributes = 5; - bool return_new_decision_task = 6; - bool force_create_new_decision_task = 7; - string binary_checksum = 8; - map query_results = 9; -} - -message RespondDecisionTaskCompletedResponse { - PollForDecisionTaskResponse decision_task = 1; - map activities_to_dispatch_locally = 2; -} - -message RespondDecisionTaskFailedRequest { - bytes task_token = 1; - DecisionTaskFailedCause cause = 2; - Payload details = 3; - string identity = 4; - string binary_checksum = 5; -} - -message RespondDecisionTaskFailedResponse { -} - -message PollForActivityTaskRequest { - string domain = 1; - TaskList task_list = 2; - string identity = 3; - TaskListMetadata task_list_metadata = 4; -} - -message PollForActivityTaskResponse { - bytes task_token = 1; - WorkflowExecution workflow_execution = 2; - string activity_id = 3; - ActivityType activity_type = 4; - Payload input = 5; - google.protobuf.Timestamp scheduled_time = 6; - google.protobuf.Timestamp started_time = 7; - google.protobuf.Duration schedule_to_close_timeout = 8; - google.protobuf.Duration start_to_close_timeout = 9; - google.protobuf.Duration heartbeat_timeout = 10; - int32 attempt = 11; - google.protobuf.Timestamp scheduled_time_of_this_attempt = 12; - Payload heartbeat_details = 13; - WorkflowType workflow_type = 14; - string workflow_domain = 15; - Header header = 16; -} - -message RespondActivityTaskCompletedRequest { - bytes task_token = 1; - Payload result = 2; - string identity = 3; -} - -message RespondActivityTaskCompletedResponse { -} - -message RespondActivityTaskCompletedByIDRequest { - string domain = 1; - WorkflowExecution workflow_execution = 2; - string activity_id = 3; - Payload result = 4; - string identity = 5; -} - -message RespondActivityTaskCompletedByIDResponse { -} - -message RespondActivityTaskFailedRequest { - bytes task_token = 1; - Failure failure = 2; - string identity = 3; -} - -message RespondActivityTaskFailedResponse { -} - -message RespondActivityTaskFailedByIDRequest { - string domain = 1; - WorkflowExecution workflow_execution = 2; - string activity_id = 3; - Failure failure = 4; - string identity = 5; -} - -message RespondActivityTaskFailedByIDResponse { -} - -message RespondActivityTaskCanceledRequest { - bytes task_token = 1; - Payload details = 2; - string identity = 3; -} - -message RespondActivityTaskCanceledResponse { -} - -message RespondActivityTaskCanceledByIDRequest { - string domain = 1; - WorkflowExecution workflow_execution = 2; - string activity_id = 3; - Payload details = 4; - string identity = 5; -} - -message RespondActivityTaskCanceledByIDResponse { -} - -message RecordActivityTaskHeartbeatRequest { - bytes task_token = 1; - Payload details = 2; - string identity = 3; -} - -message RecordActivityTaskHeartbeatResponse { - bool cancel_requested = 1; -} - -message RecordActivityTaskHeartbeatByIDRequest { - string domain = 1; - WorkflowExecution workflow_execution = 2; - string activity_id = 3; - Payload details = 4; - string identity = 5; -} - -message RecordActivityTaskHeartbeatByIDResponse { - bool cancel_requested = 1; -} - -message RespondQueryTaskCompletedRequest { - bytes task_token = 1; - WorkflowQueryResult result = 2; - WorkerVersionInfo worker_version_info = 3; -} - -message RespondQueryTaskCompletedResponse { -} - -message RequestCancelWorkflowExecutionRequest { - string domain = 1; - WorkflowExecution workflow_execution = 2; - string identity = 3; - string request_id = 4; -} - -message RequestCancelWorkflowExecutionResponse { -} diff --git a/proto/public/uber/cadence/api/v1/service_workflow.proto b/proto/public/uber/cadence/api/v1/service_workflow.proto deleted file mode 100644 index 3e5a4dfee0c..00000000000 --- a/proto/public/uber/cadence/api/v1/service_workflow.proto +++ /dev/null @@ -1,242 +0,0 @@ -// Copyright (c) 2020 Uber Technologies, Inc. -// -// 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 uber.cadence.api.v1; - -option go_package = "github.com/uber/cadence/.gen/proto/api/v1;apiv1"; -option java_multiple_files = true; -option java_outer_classname = "ApiProto"; -option java_package = "com.uber.cadence.api.v1"; - -import "google/protobuf/duration.proto"; -import "uber/cadence/api/v1/common.proto"; -import "uber/cadence/api/v1/history.proto"; -import "uber/cadence/api/v1/query.proto"; -import "uber/cadence/api/v1/tasklist.proto"; -import "uber/cadence/api/v1/workflow.proto"; - -service WorkflowAPI { - // StartWorkflowExecution starts a new long running workflow instance. It will create the instance with - // 'WorkflowExecutionStarted' event in history and also schedule the first DecisionTask for the worker to make the - // first decision for this instance. It will return 'WorkflowExecutionAlreadyStartedError', if an instance already - // exists with same workflowId. - rpc StartWorkflowExecution(StartWorkflowExecutionRequest) returns (StartWorkflowExecutionResponse); - - // SignalWorkflowExecution is used to send a signal event to running workflow execution. This results in - // WorkflowExecutionSignaled event recorded in the history and a decision task being created for the execution. - rpc SignalWorkflowExecution(SignalWorkflowExecutionRequest) returns (SignalWorkflowExecutionResponse); - - // SignalWithStartWorkflowExecution is used to ensure sending signal to a workflow. If the workflow is running, - // this results in WorkflowExecutionSignaled event being recorded in the history and a decision task being created for - // the execution. If the workflow is not running or not found, this results in WorkflowExecutionStarted and - // WorkflowExecutionSignaled events being recorded in history, and a decision task being created for the execution. - rpc SignalWithStartWorkflowExecution(SignalWithStartWorkflowExecutionRequest) returns (SignalWithStartWorkflowExecutionResponse); - - // ResetWorkflowExecution reset an existing workflow execution to DecisionTaskCompleted event(exclusive). - // And it will immediately terminating the current execution instance. - rpc ResetWorkflowExecution(ResetWorkflowExecutionRequest) returns (ResetWorkflowExecutionResponse); - - // TerminateWorkflowExecution terminates an existing workflow execution by recording WorkflowExecutionTerminated event - // in the history and immediately terminating the execution instance. - rpc TerminateWorkflowExecution(TerminateWorkflowExecutionRequest) returns (TerminateWorkflowExecutionResponse); - - // DescribeWorkflowExecution returns information about the specified workflow execution. - rpc DescribeWorkflowExecution(DescribeWorkflowExecutionRequest) returns (DescribeWorkflowExecutionResponse); - - // QueryWorkflow returns query result for a specified workflow execution. - rpc QueryWorkflow(QueryWorkflowRequest) returns (QueryWorkflowResponse); - - // DescribeTaskList returns information about the target tasklist, right now this API returns the - // pollers which polled this tasklist in last few minutes. - rpc DescribeTaskList(DescribeTaskListRequest) returns (DescribeTaskListResponse); - - // ListTaskListPartitions returns information about task list partitions. - rpc ListTaskListPartitions(ListTaskListPartitionsRequest) returns(ListTaskListPartitionsResponse); - - // Reset the sticky tasklist related information in mutable state of a given workflow. - // Things cleared are: - // 1. StickyTaskList - // 2. StickyScheduleToStartTimeout - // 3. ClientLibraryVersion - // 4. ClientFeatureVersion - // 5. ClientImpl - rpc ResetStickyTaskList(ResetStickyTaskListRequest) returns(ResetStickyTaskListResponse); - - // GetClusterInfo returns information about cadence cluster. - rpc GetClusterInfo(GetClusterInfoRequest) returns(GetClusterInfoResponse); - - // Returns the history of specified workflow execution. It fails with 'EntityNotExistError' if specified workflow - // execution in unknown to the service. - rpc GetWorkflowExecutionHistory(GetWorkflowExecutionHistoryRequest) returns(GetWorkflowExecutionHistoryResponse); -} - - -message StartWorkflowExecutionRequest { - string domain = 1; - string workflow_id = 2; - WorkflowType workflow_type = 3; - TaskList task_list = 4; - Payload input = 5; - google.protobuf.Duration execution_start_to_close_timeout = 6; - google.protobuf.Duration task_start_to_close_timeout = 7; - string identity = 8; - string request_id = 9; - WorkflowIdReusePolicy workflow_id_reuse_policy = 10; - RetryPolicy retry_policy = 11; - string cron_schedule = 12; - Memo memo = 13; - SearchAttributes search_attributes = 14; - Header header = 15; - google.protobuf.Duration delay_start = 16; -} - -message StartWorkflowExecutionResponse { - string run_id = 1; -} - -message SignalWorkflowExecutionRequest { - string domain = 1; - WorkflowExecution workflow_execution = 2; - string identity = 3; - string request_id = 4; - string signal_name = 5; - Payload signal_input = 6; - bytes control = 7; -} - -message SignalWorkflowExecutionResponse { -} - -message SignalWithStartWorkflowExecutionRequest { - StartWorkflowExecutionRequest start_request = 1; - string signal_name = 2; - Payload signal_input = 3; - bytes control = 4; -} - -message SignalWithStartWorkflowExecutionResponse { - string run_id = 1; -} - -message ResetWorkflowExecutionRequest { - string domain = 1; - WorkflowExecution workflow_execution = 2; - string reason = 3; - int64 decision_finish_event_id = 4; - string request_id = 5; - bool skip_signal_reapply = 6; -} - -message ResetWorkflowExecutionResponse { - string run_id = 1; -} - -message TerminateWorkflowExecutionRequest { - string domain = 1; - WorkflowExecution workflow_execution = 2; - string reason = 3; - Payload details = 4; - string identity = 5; -} - -message TerminateWorkflowExecutionResponse { -} - -message DescribeWorkflowExecutionRequest { - string domain = 1; - WorkflowExecution workflow_execution = 2; -} - -message DescribeWorkflowExecutionResponse { - WorkflowExecutionConfiguration execution_configuration = 1; - WorkflowExecutionInfo workflow_execution_info = 2; - repeated PendingActivityInfo pending_activities = 3; - repeated PendingChildExecutionInfo pending_children = 4; - PendingDecisionInfo pending_decision = 5; -} - -message QueryWorkflowRequest { - string domain = 1; - WorkflowExecution workflow_execution = 2; - WorkflowQuery query = 3; - QueryRejectCondition query_reject_condition = 4; - QueryConsistencyLevel query_consistency_level = 5; -} - -message QueryWorkflowResponse { - Payload query_result = 1; - QueryRejected query_rejected = 2; -} - -message DescribeTaskListRequest { - string domain = 1; - TaskList task_list = 2; - TaskListType task_list_type = 3; - bool include_task_list_status = 4; -} - -message DescribeTaskListResponse { - repeated PollerInfo pollers = 1; - TaskListStatus task_list_status = 2; -} - -message ListTaskListPartitionsRequest { - string domain = 1; - TaskList task_list = 2; -} - -message ListTaskListPartitionsResponse { - repeated TaskListPartitionMetadata activity_task_list_partitions = 1; - repeated TaskListPartitionMetadata decision_task_list_partitions = 2; -} - -message ResetStickyTaskListRequest { - string domain = 1; - WorkflowExecution workflow_execution = 2; -} - -message ResetStickyTaskListResponse { -} - -message GetClusterInfoRequest { -} - -message GetClusterInfoResponse { - SupportedClientVersions supported_client_versions = 1; -} - -message GetWorkflowExecutionHistoryRequest { - string domain = 1; - WorkflowExecution workflow_execution = 2; - int32 page_size = 3; - bytes next_page_token = 4; - bool wait_for_new_event = 5; - EventFilterType history_event_filter_type = 6; - bool skip_archival = 7; -} - -message GetWorkflowExecutionHistoryResponse { - History history = 1; - repeated DataBlob raw_history = 2; - bytes next_page_token = 3; - bool archived = 4; -} diff --git a/proto/public/uber/cadence/api/v1/tasklist.proto b/proto/public/uber/cadence/api/v1/tasklist.proto deleted file mode 100644 index 052263b30e2..00000000000 --- a/proto/public/uber/cadence/api/v1/tasklist.proto +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) 2020 Uber Technologies, Inc. -// -// 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 uber.cadence.api.v1; - -option go_package = "github.com/uber/cadence/.gen/proto/api/v1;apiv1"; -option java_multiple_files = true; -option java_outer_classname = "ApiProto"; -option java_package = "com.uber.cadence.api.v1"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/wrappers.proto"; - -message TaskList { - string name = 1; - TaskListKind kind = 2; -} - -enum TaskListKind { - TASK_LIST_KIND_INVALID = 0; - TASK_LIST_KIND_NORMAL = 1; - TASK_LIST_KIND_STICKY = 2; -} - -enum TaskListType { - TASK_LIST_TYPE_INVALID = 0; - TASK_LIST_TYPE_DECISION = 1; - TASK_LIST_TYPE_ACTIVITY = 2; -} - -message TaskListMetadata { - google.protobuf.DoubleValue max_tasks_per_second = 1; -} - -message TaskListPartitionMetadata { - string key = 1; - string owner_host_name = 2; -} - -message TaskListStatus { - int64 backlog_count_hint = 1; - int64 read_level = 2; - int64 ack_level = 3; - double rate_per_second = 4; - TaskIDBlock task_id_block = 5; -} - -message TaskIDBlock { - int64 start_id = 1; - int64 end_id = 2; -} - -message PollerInfo { - google.protobuf.Timestamp last_access_time = 1; - string identity = 2; - double rate_per_second = 3; -} - -message StickyExecutionAttributes { - TaskList worker_task_list = 1; - google.protobuf.Duration schedule_to_start_timeout = 2; -} diff --git a/proto/public/uber/cadence/api/v1/visibility.proto b/proto/public/uber/cadence/api/v1/visibility.proto deleted file mode 100644 index 2d6677df8cd..00000000000 --- a/proto/public/uber/cadence/api/v1/visibility.proto +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) 2020 Uber Technologies, Inc. -// -// 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 uber.cadence.api.v1; - -option go_package = "github.com/uber/cadence/.gen/proto/api/v1;apiv1"; -option java_multiple_files = true; -option java_outer_classname = "ApiProto"; -option java_package = "com.uber.cadence.api.v1"; - -import "google/protobuf/timestamp.proto"; -import "uber/cadence/api/v1/workflow.proto"; - -message WorkflowExecutionFilter { - string workflow_id = 1; - string run_id = 2; -} - -message WorkflowTypeFilter { - string name = 1; -} - -message StartTimeFilter { - google.protobuf.Timestamp earliest_time = 1; - google.protobuf.Timestamp latest_time = 2; -} - -message StatusFilter { - WorkflowExecutionCloseStatus status = 1; -} - -enum IndexedValueType { - INDEXED_VALUE_TYPE_INVALID = 0; - INDEXED_VALUE_TYPE_STRING = 1; - INDEXED_VALUE_TYPE_KEYWORD = 2; - INDEXED_VALUE_TYPE_INT = 3; - INDEXED_VALUE_TYPE_DOUBLE = 4; - INDEXED_VALUE_TYPE_BOOL = 5; - INDEXED_VALUE_TYPE_DATETIME = 6; -} diff --git a/proto/public/uber/cadence/api/v1/workflow.proto b/proto/public/uber/cadence/api/v1/workflow.proto deleted file mode 100644 index 975ddff9e2a..00000000000 --- a/proto/public/uber/cadence/api/v1/workflow.proto +++ /dev/null @@ -1,233 +0,0 @@ -// Copyright (c) 2020 Uber Technologies, Inc. -// -// 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 uber.cadence.api.v1; - -option go_package = "github.com/uber/cadence/.gen/proto/api/v1;apiv1"; -option java_multiple_files = true; -option java_outer_classname = "ApiProto"; -option java_package = "com.uber.cadence.api.v1"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; -import "uber/cadence/api/v1/common.proto"; -import "uber/cadence/api/v1/tasklist.proto"; - -message WorkflowExecutionInfo { - WorkflowExecution workflow_execution = 1; - WorkflowType type = 2; - google.protobuf.Timestamp start_time = 3; - google.protobuf.Timestamp close_time = 4; - WorkflowExecutionCloseStatus close_status = 5; - int64 history_length = 6; - ParentExecutionInfo parent_execution_info = 7; - google.protobuf.Timestamp execution_time = 8; - Memo memo = 9; - SearchAttributes search_attributes = 10; - ResetPoints auto_reset_points = 11; - string task_list = 12; -} - -message WorkflowExecutionConfiguration { - TaskList task_list = 1; - google.protobuf.Duration execution_start_to_close_timeout = 2; - google.protobuf.Duration task_start_to_close_timeout = 3; -} - -message ParentExecutionInfo { - string domain_id = 1; - string domain_name = 2; - api.v1.WorkflowExecution workflow_execution = 3; - int64 initiated_id = 4; -} - -message ExternalExecutionInfo { - api.v1.WorkflowExecution workflow_execution = 1; - int64 initiated_id = 2; -} - -message PendingActivityInfo { - string activity_id = 1; - ActivityType activity_type = 2; - PendingActivityState state = 3; - Payload heartbeat_details = 4; - google.protobuf.Timestamp last_heartbeat_time = 5; - google.protobuf.Timestamp last_started_time = 6; - int32 attempt = 7; - int32 maximum_attempts = 8; - google.protobuf.Timestamp scheduled_time = 9; - google.protobuf.Timestamp expiration_time = 10; - Failure last_failure = 11; - string last_worker_identity = 12; -} - -message PendingChildExecutionInfo { - WorkflowExecution workflow_execution = 1; - string workflow_type_name = 2; - int64 initiated_id = 3; - ParentClosePolicy parent_close_policy = 4; -} - -message PendingDecisionInfo { - PendingDecisionState state = 1; - google.protobuf.Timestamp scheduled_time = 2; - google.protobuf.Timestamp started_time = 3; - int32 attempt = 4; - google.protobuf.Timestamp original_scheduled_time = 5; -} - -message ActivityLocalDispatchInfo { - string activity_id = 1; - google.protobuf.Timestamp scheduled_time = 2; - google.protobuf.Timestamp started_time = 3; - google.protobuf.Timestamp scheduled_time_of_this_attempt = 4; - bytes task_token = 5; -} - -message ResetPoints { - repeated ResetPointInfo points = 1; -} - -message ResetPointInfo { - string binary_checksum = 1; - string run_id = 2; - int64 first_decision_completed_id = 3; - google.protobuf.Timestamp created_time = 4; - google.protobuf.Timestamp expiring_time = 5; - bool resettable = 6; -} - -enum PendingActivityState { - PENDING_ACTIVITY_STATE_INVALID = 0; - PENDING_ACTIVITY_STATE_SCHEDULED = 1; - PENDING_ACTIVITY_STATE_STARTED = 2; - PENDING_ACTIVITY_STATE_CANCEL_REQUESTED = 3; -} - -enum PendingDecisionState { - PENDING_DECISION_STATE_INVALID = 0; - PENDING_DECISION_STATE_SCHEDULED = 1; - PENDING_DECISION_STATE_STARTED = 2; -} - -enum WorkflowIdReusePolicy { - WORKFLOW_ID_REUSE_POLICY_INVALID = 0; - - // Allow start a workflow execution using the same workflow ID, - // when workflow not running, and the last execution close state is in [terminated, cancelled, timeouted, failed]. - WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY = 1; - - // Allow start a workflow execution using the same workflow ID, when workflow not running. - WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE = 2; - - // Do not allow start a workflow execution using the same workflow ID at all. - WORKFLOW_ID_REUSE_POLICY_REJECT_DUPLICATE = 3; - - // If a workflow is running using the same workflow ID, terminate it and start a new one. - WORKFLOW_ID_REUSE_POLICY_TERMINATE_IF_RUNNING = 4; -} - -enum ParentClosePolicy { - PARENT_CLOSE_POLICY_INVALID = 0; - - // Abandon means not doing anything on the child workflow. - PARENT_CLOSE_POLICY_ABANDON = 1; - - // Cancel means requesting cancellation on the child workflow. - PARENT_CLOSE_POLICY_REQUEST_CANCEL = 2; - - // Terminate means terminating the child workflow. - PARENT_CLOSE_POLICY_TERMINATE = 3; -} - -enum WorkflowExecutionCloseStatus { - WORKFLOW_EXECUTION_CLOSE_STATUS_INVALID = 0; - WORKFLOW_EXECUTION_CLOSE_STATUS_COMPLETED = 1; - WORKFLOW_EXECUTION_CLOSE_STATUS_FAILED = 2; - WORKFLOW_EXECUTION_CLOSE_STATUS_CANCELED = 3; - WORKFLOW_EXECUTION_CLOSE_STATUS_TERMINATED = 4; - WORKFLOW_EXECUTION_CLOSE_STATUS_CONTINUED_AS_NEW = 5; - WORKFLOW_EXECUTION_CLOSE_STATUS_TIMED_OUT = 6; -} - -enum ContinueAsNewInitiator { - CONTINUE_AS_NEW_INITIATOR_INVALID = 0; - CONTINUE_AS_NEW_INITIATOR_DECIDER = 1; - CONTINUE_AS_NEW_INITIATOR_RETRY_POLICY = 2; - CONTINUE_AS_NEW_INITIATOR_CRON_SCHEDULE = 3; -} - -enum TimeoutType { - TIMEOUT_TYPE_INVALID = 0; - TIMEOUT_TYPE_START_TO_CLOSE = 1; - TIMEOUT_TYPE_SCHEDULE_TO_START = 2; - TIMEOUT_TYPE_SCHEDULE_TO_CLOSE = 3; - TIMEOUT_TYPE_HEARTBEAT = 4; -} - -enum DecisionTaskTimedOutCause { - DECISION_TASK_TIMED_OUT_CAUSE_INVALID = 0; - DECISION_TASK_TIMED_OUT_CAUSE_TIMEOUT = 1; - DECISION_TASK_TIMED_OUT_CAUSE_RESET = 2; -} - -enum DecisionTaskFailedCause { - DECISION_TASK_FAILED_CAUSE_INVALID = 0; - DECISION_TASK_FAILED_CAUSE_UNHANDLED_DECISION = 1; - DECISION_TASK_FAILED_CAUSE_BAD_SCHEDULE_ACTIVITY_ATTRIBUTES = 2; - DECISION_TASK_FAILED_CAUSE_BAD_REQUEST_CANCEL_ACTIVITY_ATTRIBUTES = 3; - DECISION_TASK_FAILED_CAUSE_BAD_START_TIMER_ATTRIBUTES = 4; - DECISION_TASK_FAILED_CAUSE_BAD_CANCEL_TIMER_ATTRIBUTES = 5; - DECISION_TASK_FAILED_CAUSE_BAD_RECORD_MARKER_ATTRIBUTES = 6; - DECISION_TASK_FAILED_CAUSE_BAD_COMPLETE_WORKFLOW_EXECUTION_ATTRIBUTES = 7; - DECISION_TASK_FAILED_CAUSE_BAD_FAIL_WORKFLOW_EXECUTION_ATTRIBUTES = 8; - DECISION_TASK_FAILED_CAUSE_BAD_CANCEL_WORKFLOW_EXECUTION_ATTRIBUTES = 9; - DECISION_TASK_FAILED_CAUSE_BAD_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_ATTRIBUTES = 10; - DECISION_TASK_FAILED_CAUSE_BAD_CONTINUE_AS_NEW_ATTRIBUTES = 11; - DECISION_TASK_FAILED_CAUSE_START_TIMER_DUPLICATE_ID = 12; - DECISION_TASK_FAILED_CAUSE_RESET_STICKY_TASK_LIST = 13; - DECISION_TASK_FAILED_CAUSE_WORKFLOW_WORKER_UNHANDLED_FAILURE = 14; - DECISION_TASK_FAILED_CAUSE_BAD_SIGNAL_WORKFLOW_EXECUTION_ATTRIBUTES = 15; - DECISION_TASK_FAILED_CAUSE_BAD_START_CHILD_EXECUTION_ATTRIBUTES = 16; - DECISION_TASK_FAILED_CAUSE_FORCE_CLOSE_DECISION = 17; - DECISION_TASK_FAILED_CAUSE_FAILOVER_CLOSE_DECISION = 18; - DECISION_TASK_FAILED_CAUSE_BAD_SIGNAL_INPUT_SIZE = 19; - DECISION_TASK_FAILED_CAUSE_RESET_WORKFLOW = 20; - DECISION_TASK_FAILED_CAUSE_BAD_BINARY = 21; - DECISION_TASK_FAILED_CAUSE_SCHEDULE_ACTIVITY_DUPLICATE_ID = 22; - DECISION_TASK_FAILED_CAUSE_BAD_SEARCH_ATTRIBUTES = 23; -} - -enum ChildWorkflowExecutionFailedCause { - CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_INVALID = 0; - CHILD_WORKFLOW_EXECUTION_FAILED_CAUSE_WORKFLOW_ALREADY_RUNNING = 1; -} - -enum CancelExternalWorkflowExecutionFailedCause { - CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_INVALID = 0; - CANCEL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_UNKNOWN_EXTERNAL_WORKFLOW_EXECUTION = 1; -} - -enum SignalExternalWorkflowExecutionFailedCause { - SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_INVALID = 0; - SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_UNKNOWN_EXTERNAL_WORKFLOW_EXECUTION = 1; -} \ No newline at end of file