docs: clarify duration format for Zeebe command binding#5220
Open
nelson-parente wants to merge 3 commits into
Open
docs: clarify duration format for Zeebe command binding#5220nelson-parente wants to merge 3 commits into
nelson-parente wants to merge 3 commits into
Conversation
Signed-off-by: nelson.parente <nelson_parente@live.com.pt>
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the Zeebe command binding documentation to make duration formatting requirements explicit, helping users avoid confusing errors when providing ISO-8601 durations in binding payloads.
Changes:
- Adds a prominent “Duration format” alert in the Output binding section clarifying that Go
time.Durationstrings are required and ISO-8601 durations aren’t supported. - Updates the parameter descriptions for all affected duration fields (
timeToLive,requestTimeout,timeout,retryBackOff) to explicitly call out the required format.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+90
to
+92
| {{% alert title="Duration format" color="primary" %}} | ||
| All duration fields in Zeebe command binding operations must be specified as Go duration strings (e.g. `"30s"`, `"5m"`, `"1h30m"`). ISO-8601 durations (e.g. `"PT1M"`) are **not** supported and will result in an `Invalid duration` error. | ||
| {{% /alert %}} |
| - `withResult` - (optional, default: false) if set to true, the process will be instantiated and executed synchronously | ||
| - `requestTimeout` - (optional, only used if withResult=true) timeout the request will be closed if the process is not completed before the | ||
| requestTimeout. If requestTimeout = 0, uses the generic requestTimeout configured in the gateway. | ||
| - `requestTimeout` - (optional, only used if withResult=true) timeout after which the request will be closed if the process is not completed; must be a Go duration string (e.g. `"30s"`, `"5m"`, `"1h30m"`). If requestTimeout = 0, uses the generic requestTimeout configured in the gateway. |
| scope of the job will be returned | ||
| - `requestTimeout` - (optional) the request will be completed when at least one job is activated or after the requestTimeout. If the requestTimeout = 0, | ||
| a default timeout is used. If the requestTimeout < 0, long polling is disabled and the request is completed immediately, even when no job is activated. | ||
| - `requestTimeout` - (optional) the request will be completed when at least one job is activated or after the requestTimeout; must be a Go duration string (e.g. `"30s"`, `"5m"`, `"1h30m"`). If the requestTimeout = 0, a default timeout is used. If the requestTimeout < 0, long polling is disabled and the request is completed immediately, even when no job is activated. |
Comment on lines
+655
to
+657
| - `errorMessage ` - (optional) a message describing why the job failed this is particularly useful if a job runs out of retries and an | ||
| incident is raised, as it this message can help explain why an incident was raised | ||
| - `retryBackOff` - (optional) the back-off timeout for the next retry | ||
| - `retryBackOff` - (optional) the back-off duration before the next retry attempt; must be a Go duration string (e.g. `"30s"`, `"5m"`, `"1h30m"`) |
…s (Copilot review) Signed-off-by: Nelson Parente <nelson_parente@live.com.pt>
| - `withResult` - (optional, default: false) if set to true, the process will be instantiated and executed synchronously | ||
| - `requestTimeout` - (optional, only used if withResult=true) timeout the request will be closed if the process is not completed before the | ||
| requestTimeout. If requestTimeout = 0, uses the generic requestTimeout configured in the gateway. | ||
| - `requestTimeout` - (optional, only used if `withResult`=true) timeout after which the request will be closed if the process is not completed; must be a Go duration string (e.g. `"30s"`, `"5m"`, `"1h30m"`). If `requestTimeout` is `"0"`, uses the generic `requestTimeout` configured in the gateway. |
Comment on lines
655
to
656
| - `errorMessage` - (optional) a message describing why the job failed this is particularly useful if a job runs out of retries and an | ||
| incident is raised, as it this message can help explain why an incident was raised |
…pilot review) Signed-off-by: Nelson Parente <nelson_parente@live.com.pt>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
"30s","5m","1h30m") — ISO-8601 durations like"PT1M"are not supported.publish-message.timeToLive,create-instance.requestTimeout,activate-jobs.timeout,activate-jobs.requestTimeout, andfail-job.retryBackOff.Motivation
Users sending ISO-8601 durations or other ambiguous strings to Zeebe command binding fields were receiving a confusing
Invalid durationerror with no indication of the expected format. The code PR (dapr/components-contrib#4412) improves the error message; this PR ensures the docs are unambiguous so users can avoid the error entirely.Code: dapr/components-contrib#4412
Relates to: dapr/components-contrib#4093
Target
Dapr 1.19
Test plan