feat: better define step retry delay and step timeout types#3191
Merged
sidharthachatterjee merged 1 commit intocloudflare:mainfrom Nov 29, 2024
Merged
Conversation
Previously, both types were specified as a string, which is not intended behaviour. We only allow for a specific formatted string - same as WorkflowSleepDuration. I've added WorkflowTimeoutDuration and WorkflowDelayDuration for better DX in the types by reducing confusion (otherwise you would see a WorkflowSleepDuration in a timeout) - also gives us flexibility if we need to seperate them later. While you could think that this could be a breaking change in the types, we already validate it at runtime.
vickykont
approved these changes
Nov 29, 2024
Contributor
vickykont
left a comment
There was a problem hiding this comment.
Looks good to me, but it might be best if someone that understands these types and what might introduce breaking changes approves.
Contributor
|
This is a breaking change. However, what makes it "breaking" is that the new types are actually accurate to what the implementation requires/anything that doesn't match these types (updated in this PR) actually fail. So we should merge this. I'll merge. Thanks folks! |
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.
Previously, both types were specified as a string, which is not intended behavior. We only allow for a specific formatted string - same as
WorkflowSleepDuration.I've added
WorkflowTimeoutDurationandWorkflowDelayDurationfor better DX in the types by reducing confusion (otherwise you would see aWorkflowSleepDurationin a timeout field) - also gives us flexibility if we need to separate them later.While this could be a breaking change in the types, we already validate it at runtime, so there are no worries here.