-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expand long running timer functionality to WaitForExternalEvent #1550
Conversation
Internally WaitForExternalEvent with a timeout uses a timer. In v2.3.0 we added support for long-running timers, we just didn't remove the now unecessary validation from the WaitForExternalEvent API. This PR validates the scenario with a test and removes this validation. Note that initially this PR attempted to expand this functionality to RetryOptions in CallActivity/SubOrchestrationWithRetry, but unfortunately the timer used by that retry is lower level than the Durable Functions layer, meaning we can't use our long-running support. Addresses #1538
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks mostly good to me, assuming the CI is passing!
I left some suggestions to improve readability and maintainability moving forward, mostly around adding more comments. Please review them when you get the chance ⚡
src/WebJobs.Extensions.DurableTask/ContextImplementations/DurableOrchestrationContext.cs
Show resolved
Hide resolved
src/WebJobs.Extensions.DurableTask/Listener/OutOfProcOrchestrationShim.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Found a small typo, but it's non-blocking.
|
||
private bool ValidOutOfProcTimer(DateTime fireAt, out string errorMessage) | ||
// We now have built in long-timer support for C#, but in some scenarios, such as out-of-proc, | ||
// we may still need to enforce this limitations until the solution works there as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this -> these
Internally WaitForExternalEvent with a timeout uses a timer. In v2.3.0
we added support for long-running timers, we just didn't remove the
now unecessary validation from the WaitForExternalEvent API. This PR
validates the scenario with a test and removes this validation.
Note that initially this PR attempted to expand this functionality to
RetryOptions in CallActivity/SubOrchestrationWithRetry, but
unfortunately the timer used by that retry is lower level than the
Durable Functions layer, meaning we can't use our long-running support.
Addresses #1538