Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions buf.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,3 @@ deps:
repository: googleapis
commit: 28151c0d0a1641bf938a7672c500e01d
digest: shake256:49215edf8ef57f7863004539deff8834cfb2195113f0b890dd1f67815d9353e28e668019165b9d872395871eeafcbab3ccfdb2b5f11734d3cca95be9e8d139de
- remote: buf.build
owner: grpc-ecosystem
repository: grpc-gateway
commit: 048ae6ff94ca4476b3225904b1078fad
digest: shake256:e5250bf2d999516c02206d757502b902e406f35c099d0e869dc3e4f923f6870fe0805a9974c27df0695462937eae90cd4d9db90bb9a03489412560baa74a87b6
97 changes: 97 additions & 0 deletions openapi/openapiv2.json
Original file line number Diff line number Diff line change
Expand Up @@ -14420,6 +14420,64 @@
],
"default": "NAMESPACE_STATE_UNSPECIFIED"
},
"v1NewActivityExecutionInfo": {
"type": "object",
"properties": {
"activityId": {
"type": "string",
"description": "Identifier for this activity. Must be unique among activities in the same namespace."
},
"activityType": {
"$ref": "#/definitions/v1ActivityType",
"description": "The type of the activity to execute."
},
"taskQueue": {
"$ref": "#/definitions/v1TaskQueue",
"description": "Task queue to schedule the activity on."
},
"input": {
"$ref": "#/definitions/v1Payloads",
"description": "Serialized arguments to the activity."
},
"scheduleToCloseTimeout": {
"type": "string",
"description": "Indicates how long the caller is willing to wait for an activity completion. Limits how long\nretries will be attempted. Either this or `start_to_close_timeout` must be specified.\n"
},
"scheduleToStartTimeout": {
"type": "string",
"description": "Limits time an activity task can stay in a task queue before a worker picks it up. This\ntimeout is always non retryable, as all a retry would achieve is to put it back into the same\nqueue. Defaults to `schedule_to_close_timeout` if not specified.\n"
},
"startToCloseTimeout": {
"type": "string",
"description": "Maximum time an activity is allowed to execute after being picked up by a worker. This\ntimeout is always retryable. Either this or `schedule_to_close_timeout` must be\nspecified.\n"
},
"heartbeatTimeout": {
"type": "string",
"description": "Maximum permitted time between successful worker heartbeats."
},
"retryPolicy": {
"$ref": "#/definitions/v1RetryPolicy",
"description": "The retry policy for the activity. Will never exceed `schedule_to_close_timeout`."
},
"header": {
"$ref": "#/definitions/v1Header",
"description": "Header for context propagation and tracing purposes."
},
"searchAttributes": {
"$ref": "#/definitions/v1SearchAttributes",
"description": "Search attributes for indexing."
},
"userMetadata": {
"$ref": "#/definitions/v1UserMetadata",
"description": "Metadata for use by user interfaces to display the fixed as-of-start summary and details of the activity."
},
"priority": {
"$ref": "#/definitions/v1Priority",
"description": "Priority metadata."
}
},
"description": "NewActivityExecutionInfo is a shared message that encapsulates all the\nrequired arguments to starting a standalone activity in different contexts."
},
"v1NewWorkflowExecutionInfo": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -15931,6 +15989,10 @@
"startWorkflow": {
"$ref": "#/definitions/v1NewWorkflowExecutionInfo",
"description": "All fields of NewWorkflowExecutionInfo are valid except for:\n- workflow_id_reuse_policy\n- cron_schedule\nThe workflow id of the started workflow may not match this exactly,\nit may have a timestamp appended for uniqueness."
},
"startActivity": {
"$ref": "#/definitions/v1NewActivityExecutionInfo",
"description": "All fields of NewActivityExecutionInfo are valid except for:\n- activity_id (will be set by the server)\nThe activity id of the started activity may not match this exactly,\nit may have a timestamp appended for uniqueness."
}
}
},
Expand All @@ -15954,9 +16016,32 @@
"startWorkflowStatus": {
"$ref": "#/definitions/v1WorkflowExecutionStatus",
"description": "If the action was start_workflow, this field will reflect an\neventually-consistent view of the started workflow's status."
},
"startActivityResultActivityId": {
"type": "string",
"title": "If action was start_activity:"
},
"startActivityResultRunId": {
"type": "string"
},
"startActivityStatus": {
"$ref": "#/definitions/v1WorkflowExecutionStatus",
"description": "Uses WorkflowExecutionStatus (not ActivityExecutionStatus) because the\nstatus values are semantically identical and keeps completion handling uniform."
}
}
},
"v1ScheduleActivityExecution": {
"type": "object",
"properties": {
"activityId": {
"type": "string"
},
"runId": {
"type": "string"
}
},
"description": "Identifies a running activity started by a schedule."
},
"v1ScheduleInfo": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -16021,6 +16106,14 @@
"invalidScheduleError": {
"type": "string",
"description": "Deprecated."
},
"runningActivities": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/v1ScheduleActivityExecution"
},
"description": "Currently-running activities started by this schedule (when action is start_activity).\nOnly populated for activity schedule actions."
}
}
},
Expand Down Expand Up @@ -16053,6 +16146,10 @@
"$ref": "#/definitions/v1WorkflowType",
"title": "From action:\nAction is a oneof field, but we need to encode this in JSON and oneof fields don't work\nwell with JSON. If action is start_workflow, this is set:"
},
"activityType": {
"$ref": "#/definitions/v1ActivityType",
"description": "Set if the schedule action is start_activity."
},
"notes": {
"type": "string",
"title": "From state:"
Expand Down
122 changes: 122 additions & 0 deletions openapi/openapiv3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11345,6 +11345,80 @@ components:
- REPLICATION_STATE_HANDOVER
type: string
format: enum
NewActivityExecutionInfo:
type: object
properties:
activityId:
type: string
description: Identifier for this activity. Must be unique among activities in the same namespace.
activityType:
allOf:
- $ref: '#/components/schemas/ActivityType'
description: The type of the activity to execute.
taskQueue:
allOf:
- $ref: '#/components/schemas/TaskQueue'
description: Task queue to schedule the activity on.
input:
allOf:
- $ref: '#/components/schemas/Payloads'
description: Serialized arguments to the activity.
scheduleToCloseTimeout:
pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$
type: string
description: |-
Indicates how long the caller is willing to wait for an activity completion. Limits how long
retries will be attempted. Either this or `start_to_close_timeout` must be specified.

(-- api-linter: core::0140::prepositions=disabled
aip.dev/not-precedent: "to" is used to indicate interval. --)
scheduleToStartTimeout:
pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$
type: string
description: |-
Limits time an activity task can stay in a task queue before a worker picks it up. This
timeout is always non retryable, as all a retry would achieve is to put it back into the same
queue. Defaults to `schedule_to_close_timeout` if not specified.

(-- api-linter: core::0140::prepositions=disabled
aip.dev/not-precedent: "to" is used to indicate interval. --)
startToCloseTimeout:
pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$
type: string
description: |-
Maximum time an activity is allowed to execute after being picked up by a worker. This
timeout is always retryable. Either this or `schedule_to_close_timeout` must be
specified.

(-- api-linter: core::0140::prepositions=disabled
aip.dev/not-precedent: "to" is used to indicate interval. --)
heartbeatTimeout:
pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$
type: string
description: Maximum permitted time between successful worker heartbeats.
retryPolicy:
allOf:
- $ref: '#/components/schemas/RetryPolicy'
description: The retry policy for the activity. Will never exceed `schedule_to_close_timeout`.
header:
allOf:
- $ref: '#/components/schemas/Header'
description: Header for context propagation and tracing purposes.
searchAttributes:
allOf:
- $ref: '#/components/schemas/SearchAttributes'
description: Search attributes for indexing.
userMetadata:
allOf:
- $ref: '#/components/schemas/UserMetadata'
description: Metadata for use by user interfaces to display the fixed as-of-start summary and details of the activity.
priority:
allOf:
- $ref: '#/components/schemas/Priority'
description: Priority metadata.
description: |-
NewActivityExecutionInfo is a shared message that encapsulates all the
required arguments to starting a standalone activity in different contexts.
NewWorkflowExecutionInfo:
type: object
properties:
Expand Down Expand Up @@ -13367,6 +13441,14 @@ components:
- cron_schedule
The workflow id of the started workflow may not match this exactly,
it may have a timestamp appended for uniqueness.
startActivity:
allOf:
- $ref: '#/components/schemas/NewActivityExecutionInfo'
description: |-
All fields of NewActivityExecutionInfo are valid except for:
- activity_id (will be set by the server)
The activity id of the started activity may not match this exactly,
it may have a timestamp appended for uniqueness.
ScheduleActionResult:
type: object
properties:
Expand Down Expand Up @@ -13398,6 +13480,35 @@ components:
If the action was start_workflow, this field will reflect an
eventually-consistent view of the started workflow's status.
format: enum
startActivityResultActivityId:
type: string
description: 'If action was start_activity:'
startActivityResultRunId:
type: string
startActivityStatus:
enum:
- WORKFLOW_EXECUTION_STATUS_UNSPECIFIED
- WORKFLOW_EXECUTION_STATUS_RUNNING
- WORKFLOW_EXECUTION_STATUS_COMPLETED
- WORKFLOW_EXECUTION_STATUS_FAILED
- WORKFLOW_EXECUTION_STATUS_CANCELED
- WORKFLOW_EXECUTION_STATUS_TERMINATED
- WORKFLOW_EXECUTION_STATUS_CONTINUED_AS_NEW
- WORKFLOW_EXECUTION_STATUS_TIMED_OUT
- WORKFLOW_EXECUTION_STATUS_PAUSED
type: string
description: |-
Uses WorkflowExecutionStatus (not ActivityExecutionStatus) because the
status values are semantically identical and keeps completion handling uniform.
format: enum
ScheduleActivityExecution:
type: object
properties:
activityId:
type: string
runId:
type: string
description: Identifies a running activity started by a schedule.
ScheduleInfo:
type: object
properties:
Expand Down Expand Up @@ -13450,6 +13561,13 @@ components:
invalidScheduleError:
type: string
description: Deprecated.
runningActivities:
type: array
items:
$ref: '#/components/schemas/ScheduleActivityExecution'
description: |-
Currently-running activities started by this schedule (when action is start_activity).
Only populated for activity schedule actions.
ScheduleListEntry:
type: object
properties:
Expand Down Expand Up @@ -13478,6 +13596,10 @@ components:
From action:
Action is a oneof field, but we need to encode this in JSON and oneof fields don't work
well with JSON. If action is start_workflow, this is set:
activityType:
allOf:
- $ref: '#/components/schemas/ActivityType'
description: Set if the schedule action is start_activity.
notes:
type: string
description: 'From state:'
Expand Down
57 changes: 57 additions & 0 deletions temporal/api/activity/v1/message.proto
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,63 @@ message ActivityExecutionInfo {
string canceled_reason = 32;
}

// NewActivityExecutionInfo is a shared message that encapsulates all the
// required arguments to starting a standalone activity in different contexts.
message NewActivityExecutionInfo {
// Identifier for this activity. Must be unique among activities in the same namespace.
string activity_id = 1;

// The type of the activity to execute.
temporal.api.common.v1.ActivityType activity_type = 2;

// Task queue to schedule the activity on.
temporal.api.taskqueue.v1.TaskQueue task_queue = 3;

// Serialized arguments to the activity.
temporal.api.common.v1.Payloads input = 4;

// Indicates how long the caller is willing to wait for an activity completion. Limits how long
// retries will be attempted. Either this or `start_to_close_timeout` must be specified.
//
// (-- api-linter: core::0140::prepositions=disabled
// aip.dev/not-precedent: "to" is used to indicate interval. --)
google.protobuf.Duration schedule_to_close_timeout = 5;

// Limits time an activity task can stay in a task queue before a worker picks it up. This
// timeout is always non retryable, as all a retry would achieve is to put it back into the same
// queue. Defaults to `schedule_to_close_timeout` if not specified.
//
// (-- api-linter: core::0140::prepositions=disabled
// aip.dev/not-precedent: "to" is used to indicate interval. --)
google.protobuf.Duration schedule_to_start_timeout = 6;

// Maximum time an activity is allowed to execute after being picked up by a worker. This
// timeout is always retryable. Either this or `schedule_to_close_timeout` must be
// specified.
//
// (-- api-linter: core::0140::prepositions=disabled
// aip.dev/not-precedent: "to" is used to indicate interval. --)
google.protobuf.Duration start_to_close_timeout = 7;

// Maximum permitted time between successful worker heartbeats.
google.protobuf.Duration heartbeat_timeout = 8;

// The retry policy for the activity. Will never exceed `schedule_to_close_timeout`.
temporal.api.common.v1.RetryPolicy retry_policy = 9;

// Header for context propagation and tracing purposes.
temporal.api.common.v1.Header header = 10;

// Search attributes for indexing.
temporal.api.common.v1.SearchAttributes search_attributes = 11;

// Metadata for use by user interfaces to display the fixed as-of-start summary and details of the activity.
temporal.api.sdk.v1.UserMetadata user_metadata = 12;

// Priority metadata.
temporal.api.common.v1.Priority priority = 13;
}

// Limited activity information returned in the list response.
// When adding fields here, ensure that it is also present in ActivityExecutionInfo (note that it
// may already be present in ActivityExecutionInfo but not at the top-level).
Expand Down
Loading
Loading