Skip to content

Commit

Permalink
Fix proto documentation for next_retry_delay field (#426)
Browse files Browse the repository at this point in the history
  • Loading branch information
gow authored Jul 1, 2024
1 parent 23f0806 commit 80d141c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
4 changes: 2 additions & 2 deletions openapi/openapiv2.json
Original file line number Diff line number Diff line change
Expand Up @@ -3302,7 +3302,7 @@
},
"encodedAttributes": {
"$ref": "#/definitions/v1Payload",
"description": "Alternative way to supply `message` and `stack_trace` and possibly other attributes, used for encryption of\nerrors originating in user code which might contain sensitive information.\nThe `encoded_attributes` Payload could represent any serializable object, e.g. JSON object or a `Failure` proto\nmessage.\n\nSDK authors: \n- The SDK should provide a default `encodeFailureAttributes` and `decodeFailureAttributes` implementation that:\n - Uses a JSON object to represent `{ message, stack_trace }`.\n - Overwrites the original message with \"Encoded failure\" to indicate that more information could be extracted.\n - Overwrites the original stack_trace with an empty string.\n - The resulting JSON object is converted to Payload using the default PayloadConverter and should be processed\n by the user-provided PayloadCodec\n\n- If there's demand, we could allow overriding the default SDK implementation to encode other opaque Failure attributes."
"description": "Alternative way to supply `message` and `stack_trace` and possibly other attributes, used for encryption of\nerrors originating in user code which might contain sensitive information.\nThe `encoded_attributes` Payload could represent any serializable object, e.g. JSON object or a `Failure` proto\nmessage.\n\nSDK authors:\n- The SDK should provide a default `encodeFailureAttributes` and `decodeFailureAttributes` implementation that:\n - Uses a JSON object to represent `{ message, stack_trace }`.\n - Overwrites the original message with \"Encoded failure\" to indicate that more information could be extracted.\n - Overwrites the original stack_trace with an empty string.\n - The resulting JSON object is converted to Payload using the default PayloadConverter and should be processed\n by the user-provided PayloadCodec\n\n- If there's demand, we could allow overriding the default SDK implementation to encode other opaque Failure attributes."
},
"cause": {
"$ref": "#/definitions/apifailurev1Failure"
Expand Down Expand Up @@ -3725,7 +3725,7 @@
},
"nextRetryDelay": {
"type": "string",
"description": "next_retry_delay can be used by the client to override the activity\nretry interval calculated by the retry policy. Retry attempts will\nstill be subject to the maximum retries limit and total time limit\ndefined by the policy.\nATTENTION: this value will be ignored if set for failures produced by\nthe workflow."
"description": "next_retry_delay can be used by the client to override the activity\nretry interval calculated by the retry policy. Retry attempts will\nstill be subject to the maximum retries limit and total time limit\ndefined by the policy."
}
}
},
Expand Down
18 changes: 15 additions & 3 deletions openapi/openapiv3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2300,8 +2300,6 @@ components:
retry interval calculated by the retry policy. Retry attempts will
still be subject to the maximum retries limit and total time limit
defined by the policy.
ATTENTION: this value will be ignored if set for failures produced by
the workflow.
BackfillRequest:
type: object
properties:
Expand Down Expand Up @@ -3295,7 +3293,21 @@ components:
encodedAttributes:
allOf:
- $ref: '#/components/schemas/Payload'
description: "Alternative way to supply `message` and `stack_trace` and possibly other attributes, used for encryption of\n errors originating in user code which might contain sensitive information.\n The `encoded_attributes` Payload could represent any serializable object, e.g. JSON object or a `Failure` proto\n message.\n\n SDK authors: \n - The SDK should provide a default `encodeFailureAttributes` and `decodeFailureAttributes` implementation that:\n - Uses a JSON object to represent `{ message, stack_trace }`.\n - Overwrites the original message with \"Encoded failure\" to indicate that more information could be extracted.\n - Overwrites the original stack_trace with an empty string.\n - The resulting JSON object is converted to Payload using the default PayloadConverter and should be processed\n by the user-provided PayloadCodec\n\n - If there's demand, we could allow overriding the default SDK implementation to encode other opaque Failure attributes."
description: |-
Alternative way to supply `message` and `stack_trace` and possibly other attributes, used for encryption of
errors originating in user code which might contain sensitive information.
The `encoded_attributes` Payload could represent any serializable object, e.g. JSON object or a `Failure` proto
message.
SDK authors:
- The SDK should provide a default `encodeFailureAttributes` and `decodeFailureAttributes` implementation that:
- Uses a JSON object to represent `{ message, stack_trace }`.
- Overwrites the original message with "Encoded failure" to indicate that more information could be extracted.
- Overwrites the original stack_trace with an empty string.
- The resulting JSON object is converted to Payload using the default PayloadConverter and should be processed
by the user-provided PayloadCodec
- If there's demand, we could allow overriding the default SDK implementation to encode other opaque Failure attributes.
cause:
$ref: '#/components/schemas/Failure'
applicationFailureInfo:
Expand Down
4 changes: 1 addition & 3 deletions temporal/api/failure/v1/message.proto
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ message ApplicationFailureInfo {
// retry interval calculated by the retry policy. Retry attempts will
// still be subject to the maximum retries limit and total time limit
// defined by the policy.
// ATTENTION: this value will be ignored if set for failures produced by
// the workflow.
google.protobuf.Duration next_retry_delay = 4;
}

Expand Down Expand Up @@ -111,7 +109,7 @@ message Failure {
// The `encoded_attributes` Payload could represent any serializable object, e.g. JSON object or a `Failure` proto
// message.
//
// SDK authors:
// SDK authors:
// - The SDK should provide a default `encodeFailureAttributes` and `decodeFailureAttributes` implementation that:
// - Uses a JSON object to represent `{ message, stack_trace }`.
// - Overwrites the original message with "Encoded failure" to indicate that more information could be extracted.
Expand Down

0 comments on commit 80d141c

Please sign in to comment.