Skip to content

Commit

Permalink
Move metadata from execution info to execution config
Browse files Browse the repository at this point in the history
  • Loading branch information
cretz committed Apr 3, 2024
1 parent 3839519 commit 6974c39
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 25 deletions.
2 changes: 1 addition & 1 deletion buf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ breaking:
- google
# Uncomment this after https://github.com/temporalio/api/pull/362 is merged
- temporal/api/operatorservice/v1/request_response.proto
# Uncomment this after user metadata is merged
# Remove this after user metadata is merged
- temporal/api/sdk/v1/workflow_metadata.proto
lint:
use:
Expand Down
22 changes: 11 additions & 11 deletions openapi/openapiv2.json
Original file line number Diff line number Diff line change
Expand Up @@ -2480,7 +2480,7 @@
},
"userMetadata": {
"$ref": "#/definitions/v1UserMetadata",
"description": "Metadata on the workflow if it is started. This is carried over to the WorkflowExecutionInfo\nfor use by user interfaces to display the fixed as-of-start summary and description of the\nworkflow."
"description": "Metadata on the workflow if it is started. This is carried over to the WorkflowExecutionInfo\nfor use by user interfaces to display the fixed as-of-start summary and details of the\nworkflow."
}
}
},
Expand Down Expand Up @@ -2646,7 +2646,7 @@
},
"userMetadata": {
"$ref": "#/definitions/v1UserMetadata",
"description": "Metadata on the workflow if it is started. This is carried over to the WorkflowExecutionInfo\nfor use by user interfaces to display the fixed as-of-start summary and description of the\nworkflow."
"description": "Metadata on the workflow if it is started. This is carried over to the WorkflowExecutionInfo\nfor use by user interfaces to display the fixed as-of-start summary and details of the\nworkflow."
}
}
},
Expand Down Expand Up @@ -3813,7 +3813,7 @@
},
"userMetadata": {
"$ref": "#/definitions/v1UserMetadata",
"description": "Metadata on the command. This is carried over to the event if there is an associated event.\nMost commands won't have this information, and how this information is used is dependent upon\nthe interface that reads it.\n\nCurrent well-known uses:\n * start_child_workflow_execution_command_attributes - populates\n temporal.api.workflow.v1.WorkflowExecutionInfo.user_metadata where the summary and details\n are used by user interfaces to show fixed as-of-start workflow summary and description.\n * start_timer_command_attributes - populates temporal.api.history.v1.HistoryEvent for timer\n started where the summary is used to identify the timer."
"description": "Metadata on the command. This is sometimes carried over to the history event if one is\ncreated as a result of the command. Most commands won't have this information, and how this\ninformation is used is dependent upon the interface that reads it.\n\nCurrent well-known uses:\n * start_child_workflow_execution_command_attributes - populates\n temporal.api.workflow.v1.WorkflowExecutionInfo.user_metadata where the summary and details\n are used by user interfaces to show fixed as-of-start workflow summary and details.\n * start_timer_command_attributes - populates temporal.api.history.v1.HistoryEvent for timer\n started where the summary is used to identify the timer."
},
"scheduleActivityTaskCommandAttributes": {
"$ref": "#/definitions/v1ScheduleActivityTaskCommandAttributes"
Expand Down Expand Up @@ -4575,7 +4575,7 @@
},
"userMetadata": {
"$ref": "#/definitions/v1UserMetadata",
"description": "Metadata on the event. This is often carried over from commands and client calls. Most events\nwon't have this information, and how this information is used is dependent upon the interface\nthat reads it.\n\nCurrent well-known uses:\n * timer_started_event_attributes - summary represents an identifier for the timer for use by\n user interfaces."
"description": "Metadata on the event. This is often carried over from commands and client calls. Most events\nwon't have this information, and how this information is used is dependent upon the interface\nthat reads it.\n\nCurrent well-known uses:\n * workflow_execution_started_event_attributes - summary and details from start workflow.\n * timer_started_event_attributes - summary represents an identifier for the timer for use by\n user interfaces."
},
"workflowExecutionStartedEventAttributes": {
"$ref": "#/definitions/v1WorkflowExecutionStartedEventAttributes"
Expand Down Expand Up @@ -5279,7 +5279,7 @@
},
"userMetadata": {
"$ref": "#/definitions/v1UserMetadata",
"description": "Metadata on the workflow if it is started. This is carried over to the WorkflowExecutionInfo\nfor use by user interfaces to display the fixed as-of-start summary and description of the\nworkflow."
"description": "Metadata on the workflow if it is started. This is carried over to the WorkflowExecutionInfo\nfor use by user interfaces to display the fixed as-of-start summary and details of the\nworkflow."
}
},
"description": "NewWorkflowExecutionInfo is a shared message that encapsulates all the\nrequired arguments to starting a workflow in different contexts."
Expand Down Expand Up @@ -7438,11 +7438,11 @@
"properties": {
"summary": {
"$ref": "#/definitions/v1Payload",
"description": "Short-form text that provides a summary. This payload should be a \"json/plain\"-encoded payload\nthat is a single JSON string. Formatting may not apply to this text when used in \"title\"\nsituations. The payload data section is limited to 400 bytes by default."
"description": "Short-form text that provides a summary. This payload should be a \"json/plain\"-encoded payload\nthat is a single JSON string for use in user interfaces. User interface formatting may not\napply to this text when used in \"title\" situations. The payload data section is limited to 400\nbytes by default."
},
"details": {
"$ref": "#/definitions/v1Payload",
"description": "Long-form text that provides details. This payload should be a \"json/plain\"-encoded payload\nthat is a single JSON string. Formatting may apply to this text in common use. The payload data\nsection is limited to 20000 bytes by default."
"description": "Long-form text that provides details. This payload should be a \"json/plain\"-encoded payload\nthat is a single JSON string for use in user interfaces. User interface formatting may apply to\nthis text in common use. The payload data section is limited to 20000 bytes by default."
}
},
"description": "Information a user can set, often for use by user interfaces."
Expand Down Expand Up @@ -7593,6 +7593,10 @@
},
"defaultWorkflowTaskTimeout": {
"type": "string"
},
"userMetadata": {
"$ref": "#/definitions/v1UserMetadata",
"description": "User metadata provided on start workflow."
}
}
},
Expand Down Expand Up @@ -7744,10 +7748,6 @@
"mostRecentWorkerVersionStamp": {
"$ref": "#/definitions/v1WorkerVersionStamp",
"title": "If set, the most recent worker version stamp that appeared in a workflow task completion"
},
"userMetadata": {
"$ref": "#/definitions/v1UserMetadata",
"description": "User metadata provided on start workflow."
}
}
},
Expand Down
24 changes: 13 additions & 11 deletions openapi/openapiv3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2985,6 +2985,7 @@ components:
that reads it.
Current well-known uses:
* workflow_execution_started_event_attributes - summary and details from start workflow.
* timer_started_event_attributes - summary represents an identifier for the timer for use by
user interfaces.
workflowExecutionStartedEventAttributes:
Expand Down Expand Up @@ -3442,7 +3443,7 @@ components:
- $ref: '#/components/schemas/UserMetadata'
description: |-
Metadata on the workflow if it is started. This is carried over to the WorkflowExecutionInfo
for use by user interfaces to display the fixed as-of-start summary and description of the
for use by user interfaces to display the fixed as-of-start summary and details of the
workflow.
description: |-
NewWorkflowExecutionInfo is a shared message that encapsulates all the
Expand Down Expand Up @@ -4780,7 +4781,7 @@ components:
- $ref: '#/components/schemas/UserMetadata'
description: |-
Metadata on the workflow if it is started. This is carried over to the WorkflowExecutionInfo
for use by user interfaces to display the fixed as-of-start summary and description of the
for use by user interfaces to display the fixed as-of-start summary and details of the
workflow.
SignalWithStartWorkflowExecutionResponse:
type: object
Expand Down Expand Up @@ -5085,7 +5086,7 @@ components:
- $ref: '#/components/schemas/UserMetadata'
description: |-
Metadata on the workflow if it is started. This is carried over to the WorkflowExecutionInfo
for use by user interfaces to display the fixed as-of-start summary and description of the
for use by user interfaces to display the fixed as-of-start summary and details of the
workflow.
StartWorkflowExecutionResponse:
type: object
Expand Down Expand Up @@ -5532,15 +5533,16 @@ components:
- $ref: '#/components/schemas/Payload'
description: |-
Short-form text that provides a summary. This payload should be a "json/plain"-encoded payload
that is a single JSON string. Formatting may not apply to this text when used in "title"
situations. The payload data section is limited to 400 bytes by default.
that is a single JSON string for use in user interfaces. User interface formatting may not
apply to this text when used in "title" situations. The payload data section is limited to 400
bytes by default.
details:
allOf:
- $ref: '#/components/schemas/Payload'
description: |-
Long-form text that provides details. This payload should be a "json/plain"-encoded payload
that is a single JSON string. Formatting may apply to this text in common use. The payload data
section is limited to 20000 bytes by default.
that is a single JSON string for use in user interfaces. User interface formatting may apply to
this text in common use. The payload data section is limited to 20000 bytes by default.
description: Information a user can set, often for use by user interfaces.
VersionInfo:
type: object
Expand Down Expand Up @@ -5672,6 +5674,10 @@ components:
defaultWorkflowTaskTimeout:
pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$
type: string
userMetadata:
allOf:
- $ref: '#/components/schemas/UserMetadata'
description: User metadata provided on start workflow.
WorkflowExecutionContinuedAsNewEventAttributes:
type: object
properties:
Expand Down Expand Up @@ -5805,10 +5811,6 @@ components:
allOf:
- $ref: '#/components/schemas/WorkerVersionStamp'
description: If set, the most recent worker version stamp that appeared in a workflow task completion
userMetadata:
allOf:
- $ref: '#/components/schemas/UserMetadata'
description: User metadata provided on start workflow.
WorkflowExecutionSignaledEventAttributes:
type: object
properties:
Expand Down
1 change: 1 addition & 0 deletions temporal/api/history/v1/message.proto
Original file line number Diff line number Diff line change
Expand Up @@ -782,6 +782,7 @@ message HistoryEvent {
// that reads it.
//
// Current well-known uses:
// * workflow_execution_started_event_attributes - summary and details from start workflow.
// * timer_started_event_attributes - summary represents an identifier for the timer for use by
// user interfaces.
temporal.api.sdk.v1.UserMetadata user_metadata = 301;
Expand Down
4 changes: 2 additions & 2 deletions temporal/api/workflow/v1/message.proto
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@ message WorkflowExecutionInfo {
int64 history_size_bytes = 15;
// If set, the most recent worker version stamp that appeared in a workflow task completion
temporal.api.common.v1.WorkerVersionStamp most_recent_worker_version_stamp = 16;
// User metadata provided on start workflow.
temporal.api.sdk.v1.UserMetadata user_metadata = 17;
}

message WorkflowExecutionConfig {
temporal.api.taskqueue.v1.TaskQueue task_queue = 1;
google.protobuf.Duration workflow_execution_timeout = 2;
google.protobuf.Duration workflow_run_timeout = 3;
google.protobuf.Duration default_workflow_task_timeout = 4;
// User metadata provided on start workflow.
temporal.api.sdk.v1.UserMetadata user_metadata = 5;
}

message PendingActivityInfo {
Expand Down

0 comments on commit 6974c39

Please sign in to comment.