-
Notifications
You must be signed in to change notification settings - Fork 55
Implement CallHttp Polling Replay Logic #346
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
Conversation
545604f to
ea39df4
Compare
davidmrdavid
left a comment
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.
This looks great, but don't have a polling test yet, right?
davidmrdavid
left a comment
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.
It's looking good to me, we just need a test :-)
|
@hossam-nasr: once this PR is ready for a re-review, please request another review from me through the UI. Thanks! |
rename property name fix tests fix typo don't change public types simplify check add clarifying comment simplify callhttptask avoid exporting moment types
add more unit tests fix and update unit tests
fix tests avoid moment add header unit tests
dea8c4d to
022988f
Compare
|
I think this PR is ready for another review now. After discussing with @davidmrdavid, these were the decisions that we made that I updated this PR with:
|
davidmrdavid
left a comment
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.
tiny optimization. Other than that - 🚢 it.
Resolves #284 . This PR:
asynchronousPatternEnabledproperty toDurableHttpRequest, which is expected by the extension and enable polling logicdefaultHttpAsyncRequestSleepTimeMillsecondsfrom the extension payload, which specifies the default period to wait between polling requests (Extension PR: Send Default Async HTTP Request Sleep Time in OOProc Payload azure-functions-durable-extension#2142)CompoundTask, theCallHttpWithPollingTask, which implements the logic for creating timers and newCallHttpActions when polling is enabledCallHttpWithPollingTaskis returned, else a normalAtomicTaskis returnedCallHttpWithPollingTask'strySetValue:Some questions/concerns:
Locationheader to determine whether to poll, and theRetry-Afterheader to determine the timeout between polling requests. Currently they are case insensitive, but I'm not sure if we should be more lenient about this. As far as I could tell, extension code was also case insensitive, but I might be wrong.asynchronousPatternEnabledtrue by default? On the one hand, technically this isn't a new feature, but rather a bug in the previous implementation, and polling should've worked out of the box, so it makes sense to make it true by default (it is also true by default on the extension side), but on the other hand, if some customers were returning some 202 response code without intending to poll, they would now get unexpected behavior.defaultHttpAsyncRequestSleepTimeMillseconds?