diff --git a/buf.yaml b/buf.yaml index 8ae454f1..b8a9f283 100644 --- a/buf.yaml +++ b/buf.yaml @@ -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: diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index befb7635..88146dfb 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -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." } } }, @@ -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." } } }, @@ -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" @@ -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" @@ -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." @@ -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." @@ -7593,6 +7593,10 @@ }, "defaultWorkflowTaskTimeout": { "type": "string" + }, + "userMetadata": { + "$ref": "#/definitions/v1UserMetadata", + "description": "User metadata provided on start workflow." } } }, @@ -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." } } }, diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index 72d2972a..9c44e064 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -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: @@ -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 @@ -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 @@ -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 @@ -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 @@ -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: @@ -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: diff --git a/temporal/api/history/v1/message.proto b/temporal/api/history/v1/message.proto index 874b1e51..1355efb3 100644 --- a/temporal/api/history/v1/message.proto +++ b/temporal/api/history/v1/message.proto @@ -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; diff --git a/temporal/api/workflow/v1/message.proto b/temporal/api/workflow/v1/message.proto index 004ba4e5..786ee98a 100644 --- a/temporal/api/workflow/v1/message.proto +++ b/temporal/api/workflow/v1/message.proto @@ -59,8 +59,6 @@ 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 { @@ -68,6 +66,8 @@ message WorkflowExecutionConfig { 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 {