From 80d141c15d8fad22c658e933f1a6e979e0878c74 Mon Sep 17 00:00:00 2001 From: Chetan Gowda Date: Sun, 30 Jun 2024 21:55:18 -0700 Subject: [PATCH] Fix proto documentation for next_retry_delay field (#426) --- openapi/openapiv2.json | 4 ++-- openapi/openapiv3.yaml | 18 +++++++++++++++--- temporal/api/failure/v1/message.proto | 4 +--- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index fab6eaab..a5da3a6b 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -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" @@ -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." } } }, diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index ac29c5f0..6cf7b102 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -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: @@ -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: diff --git a/temporal/api/failure/v1/message.proto b/temporal/api/failure/v1/message.proto index 9b7a35e6..bd8eeaeb 100644 --- a/temporal/api/failure/v1/message.proto +++ b/temporal/api/failure/v1/message.proto @@ -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; } @@ -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.