Skip to content

Commit

Permalink
working on comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ychebotarev committed Aug 21, 2024
1 parent 46ad359 commit 5b86617
Show file tree
Hide file tree
Showing 6 changed files with 106 additions and 71 deletions.
66 changes: 33 additions & 33 deletions openapi/openapiv2.json
Original file line number Diff line number Diff line change
Expand Up @@ -6140,7 +6140,7 @@
"title": "Identifies a specific activity within a namespace. ActivityExecution is expected to be\nglobally unique for running workflows.\nrun_id in workflow_execution can be empty,\nwhen run_id is empty the latest run of the workflow should be selected"
},
"activityOptionsUpdate": {
"$ref": "#/definitions/v1ActivityOptionsUpdate"
"$ref": "#/definitions/v1OptionsUpdate"
},
"identity": {
"type": "string"
Expand Down Expand Up @@ -6425,37 +6425,6 @@
}
}
},
"v1ActivityOptions": {
"type": "object",
"properties": {
"taskQueue": {
"$ref": "#/definitions/v1TaskQueue"
},
"timeouts": {
"$ref": "#/definitions/v1Timeouts"
},
"retryPolicy": {
"$ref": "#/definitions/v1RetryPolicy"
}
}
},
"v1ActivityOptionsUpdate": {
"type": "object",
"properties": {
"taskQueue": {
"type": "string"
},
"timeouts": {
"$ref": "#/definitions/v1Timeouts"
},
"retryPolicy": {
"$ref": "#/definitions/v1RetryPolicy"
},
"updateMask": {
"type": "string"
}
}
},
"v1ActivityPropertiesModifiedExternallyEventAttributes": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -7642,7 +7611,7 @@
"type": "object",
"properties": {
"activityOptions": {
"$ref": "#/definitions/v1ActivityOptions"
"$ref": "#/definitions/v1Options"
},
"activityState": {
"$ref": "#/definitions/v1ActivityState"
Expand Down Expand Up @@ -9253,6 +9222,37 @@
},
"description": "Nexus operation timed out."
},
"v1Options": {
"type": "object",
"properties": {
"taskQueue": {
"$ref": "#/definitions/v1TaskQueue"
},
"timeouts": {
"$ref": "#/definitions/v1Timeouts"
},
"retryPolicy": {
"$ref": "#/definitions/v1RetryPolicy"
}
}
},
"v1OptionsUpdate": {
"type": "object",
"properties": {
"taskQueue": {
"type": "string"
},
"timeouts": {
"$ref": "#/definitions/v1Timeouts"
},
"retryPolicy": {
"$ref": "#/definitions/v1RetryPolicy"
},
"updateMask": {
"type": "string"
}
}
},
"v1Outcome": {
"type": "object",
"properties": {
Expand Down
46 changes: 23 additions & 23 deletions openapi/openapiv3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4457,27 +4457,6 @@ components:
- RETRY_STATE_CANCEL_REQUESTED
type: string
format: enum
ActivityOptions:
type: object
properties:
taskQueue:
$ref: '#/components/schemas/TaskQueue'
timeouts:
$ref: '#/components/schemas/Timeouts'
retryPolicy:
$ref: '#/components/schemas/RetryPolicy'
ActivityOptionsUpdate:
type: object
properties:
taskQueue:
type: string
timeouts:
$ref: '#/components/schemas/Timeouts'
retryPolicy:
$ref: '#/components/schemas/RetryPolicy'
updateMask:
type: string
format: field-mask
ActivityPropertiesModifiedExternallyEventAttributes:
type: object
properties:
Expand Down Expand Up @@ -5429,7 +5408,7 @@ components:
type: object
properties:
activityOptions:
$ref: '#/components/schemas/ActivityOptions'
$ref: '#/components/schemas/Options'
activityState:
enum:
- ACTIVITY_STATE_UNSPECIFIED
Expand Down Expand Up @@ -6776,6 +6755,27 @@ components:
type: string
description: The request ID allocated at schedule time.
description: Nexus operation timed out.
Options:
type: object
properties:
taskQueue:
$ref: '#/components/schemas/TaskQueue'
timeouts:
$ref: '#/components/schemas/Timeouts'
retryPolicy:
$ref: '#/components/schemas/RetryPolicy'
OptionsUpdate:
type: object
properties:
taskQueue:
type: string
timeouts:
$ref: '#/components/schemas/Timeouts'
retryPolicy:
$ref: '#/components/schemas/RetryPolicy'
updateMask:
type: string
format: field-mask
Outcome:
type: object
properties:
Expand Down Expand Up @@ -8941,7 +8941,7 @@ components:
activityExecution:
$ref: '#/components/schemas/ActivityExecution'
activityOptionsUpdate:
$ref: '#/components/schemas/ActivityOptionsUpdate'
$ref: '#/components/schemas/OptionsUpdate'
identity:
type: string
UpdateActivityOptionsResponse:
Expand Down
4 changes: 2 additions & 2 deletions temporal/api/activity/v1/message.proto
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@ message Timeouts {
google.protobuf.Duration heartbeat_timeout = 4;
}

message ActivityOptions {
message Options {
temporal.api.taskqueue.v1.TaskQueue task_queue = 1;

temporal.api.activity.v1.Timeouts timeouts = 2;

temporal.api.common.v1.RetryPolicy retry_policy = 3;
}

message ActivityOptionsUpdate {
message OptionsUpdate {
string task_queue = 1;

temporal.api.activity.v1.Timeouts timeouts = 2;
Expand Down
44 changes: 44 additions & 0 deletions temporal/api/enums/v1/activity.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// 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.enums.v1;

option go_package = "go.temporal.io/api/enums/v1;enums";
option java_package = "io.temporal.api.enums.v1";
option java_multiple_files = true;
option java_outer_classname = "ActivityProto";
option ruby_package = "Temporalio::Api::Enums::V1";
option csharp_namespace = "Temporalio.Api.Enums.V1";


enum ActivityState {
ACTIVITY_STATE_UNSPECIFIED = 0;
ACTIVITY_STATE_SCHEDULED = 1;
ACTIVITY_STATE_STARTED = 2;
ACTIVITY_STATE_PAUSED = 3;
ACTIVITY_STATE_SUCCEEDED = 4;
ACTIVITY_STATE_FAILED = 5;
ACTIVITY_STATE_TIMED_OUT = 6;
}

10 changes: 0 additions & 10 deletions temporal/api/enums/v1/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,3 @@ enum NexusOperationCancellationState {
// The associated operation timed out - exceeded the user supplied schedule-to-close timeout.
NEXUS_OPERATION_CANCELLATION_STATE_TIMED_OUT = 5;
}

enum ActivityState {
ACTIVITY_STATE_UNSPECIFIED = 0;
ACTIVITY_STATE_SCHEDULED = 1;
ACTIVITY_STATE_STARTED = 2;
ACTIVITY_STATE_PAUSED = 3;
ACTIVITY_STATE_SUCCEEDED = 4;
ACTIVITY_STATE_FAILED = 5;
ACTIVITY_STATE_TIMED_OUT = 6;
}
7 changes: 4 additions & 3 deletions temporal/api/workflowservice/v1/request_response.proto
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,12 @@ option java_outer_classname = "RequestResponseProto";
option ruby_package = "Temporalio::Api::WorkflowService::V1";
option csharp_namespace = "Temporalio.Api.WorkflowService.V1";

import "temporal/api/enums/v1/activity.proto";
import "temporal/api/enums/v1/batch_operation.proto";
import "temporal/api/enums/v1/common.proto";
import "temporal/api/enums/v1/workflow.proto";
import "temporal/api/enums/v1/namespace.proto";
import "temporal/api/enums/v1/failed_cause.proto";
import "temporal/api/enums/v1/common.proto";
import "temporal/api/enums/v1/query.proto";
import "temporal/api/enums/v1/reset.proto";
import "temporal/api/enums/v1/task_queue.proto";
Expand Down Expand Up @@ -1658,7 +1659,7 @@ message UpdateActivityOptionsRequest {
string namespace = 1;
temporal.api.common.v1.ActivityExecution activity_execution = 2;

temporal.api.activity.v1.ActivityOptionsUpdate activity_options_update = 3;
temporal.api.activity.v1.OptionsUpdate activity_options_update = 3;
string identity = 4;
}

Expand All @@ -1673,7 +1674,7 @@ message DescribeActivityRequest {
}

message DescribeActivityResponse {
temporal.api.activity.v1.ActivityOptions activity_options = 1;
temporal.api.activity.v1.Options activity_options = 1;

temporal.api.enums.v1.ActivityState activity_state = 2;
}
Expand Down

0 comments on commit 5b86617

Please sign in to comment.