-
Notifications
You must be signed in to change notification settings - Fork 455
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
Support for HttpContext.RequestAborted in the HttpTrigger cancellation token #8903
Comments
Subscribing to topic - this is also a problem with python worker - cancelled http requests can wait for a quite long time and execute long after client drops the connection which can lead ineffectiveness in utilising resources. |
It is super exciting to see this issue being addressed and getting this regression closed! Do you have an ETA for when this will get rolled out to the SDK? I am also throwing my support behind the idea of linking this to the existing FunctionContext.CancellationToken (from what I gathered from the draft PR, that is the current proposal?). That is the most intuitive approach from a developer standpoint, especially since I imagine a lot of developers already assume that is how this works (I know I did until today!). |
I think you're commenting about CancellationToken support in the dotnet worker? This is already supported today, that feature went out last year (code). You should be able to bind to the CancellationToken directly or use it via FunctionContext. The focus of this issue/PR is to also take into account the the For |
Got it, that clears things up thank you! Very much looking forward to this going in! |
@liliankasem Do you know when this will be out? |
Not 100% sure but probably end of April, or whenever |
@liliankasem Do you know what the status of the rollout here is? What SDK versions do I need to take advantage of this if I'm using out-of-process mode? |
What problem would the feature you're requesting solve? Please describe.
Using Http triggers in Azure Functions is a common use case. Having longer running functions is also quite normal. Therefore I'm actually quite surprised that cancelling a request (fx. in Postman) affect the function running. IMHO that is what developers would expect (at least it's what I did, and what the author did here)
Describe the solution you'd like
Something like what's described here - when the client cancels the http request the Azure Function should be notified through the cancellation token by default
Describe alternatives you've considered
Manually handling the linking of the host cancellation token and HttpContext.RequestAborted as described here
Additional context
None
The text was updated successfully, but these errors were encountered: