-
Notifications
You must be signed in to change notification settings - Fork 186
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
Restore default request service feature after middleware completes #2686
base: main
Are you sure you want to change the base?
Conversation
@danielmarbach do you mind rebasing main so we can run the CI? Thanks! |
3b2f7f3
to
99dc2a5
Compare
Done FYI I have previously already set
|
/azp run dotnet-worker.public |
Azure Pipelines successfully started running 1 pipeline(s). |
@danielmarbach have you validated what was stated above? The scope here should not lead to middleware outside of this context. If you've observed that, can you share a repro? The disposal here doesn't hurt, but will also be a no-op, as the feature is initialized with an externally provided service provider. |
Like I mentioned above, I reviewed the function code to troubleshoot an issue we saw with a client code. During that review, I stumbled over this code and was thinking that the way this is structured it could lead to the context scope leaking. I wrote a quick test to verify that, which failed, and then added a potential fix for it. I'm not attached to this code. If you feel it is not worth pulling this in that's totally fine for me but I'm also not investing more time into it either ;) |
Issue describing the changes in this PR
During a review of a problem one of my client faces I dug deeper into the middleware and was wondering why the request service feature is not restored after the pipeline executed. This implementation seems to be more correct and avoids the context scope to leak into other middlewares
Pull request checklist
release_notes.md
Additional information
Additional PR information