-
Notifications
You must be signed in to change notification settings - Fork 53
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
Implement CallHttp Polling Replay Logic #346
Conversation
545604f
to
ea39df4
Compare
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?
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:
|
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:
asynchronousPatternEnabled
property toDurableHttpRequest
, which is expected by the extension and enable polling logicdefaultHttpAsyncRequestSleepTimeMillseconds
from 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 newCallHttpAction
s when polling is enabledCallHttpWithPollingTask
is returned, else a normalAtomicTask
is returnedCallHttpWithPollingTask
'strySetValue
:Some questions/concerns:
Location
header to determine whether to poll, and theRetry-After
header 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.asynchronousPatternEnabled
true 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
?