Skip to content
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

fixing dryioc IServiceProvider scoping issues #8170

Merged
merged 4 commits into from
Apr 15, 2022
Merged

fixing dryioc IServiceProvider scoping issues #8170

merged 4 commits into from
Apr 15, 2022

Conversation

brettsam
Copy link
Member

Fixes #7874
Fixes #8073

/cc @NickCraver @liliankasem @fabiocav @mathewc @safihamid

Draft for now; want to follow up with some more unit tests for different scoping behaviors.

fabiocav
fabiocav previously approved these changes Feb 25, 2022
@fabiocav
Copy link
Member

@NickCraver , it would be good to run perf tests on this change to see how this helps with the issues you've found in the past. @brettsam was looking at this primarily to address the scoping issue, but I spent some time with him to share the approach I had mentioned to you in the past, which enables us to remove the problematic call to UseInstance that was causing the copies and perf hit, so the hope is that this changes addresses/helps with both issues, but if you could confirm with a perf run, that would be great!

mathewc
mathewc previously approved these changes Feb 28, 2022
safihamid
safihamid previously approved these changes Feb 28, 2022
Copy link
Contributor

@safihamid safihamid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@brettsam brettsam dismissed stale reviews from safihamid, mathewc, and fabiocav via c851f39 February 28, 2022 21:20
@NickCraver
Copy link
Member

@fabiocav sorry sinus & migraine are winning today and I'm only checking in on laptop - I plan to profile this thing where my setup is first thing tomorrow AM!

@brettsam
Copy link
Member Author

there's still some breaks here that i'll fix tomorrow -- so hold off until i at least get a green run, @NickCraver

@NickCraver
Copy link
Member

@brettsam ACK - I have current dev comparisons down, ready for a run at this soon as you say ready!

@brettsam
Copy link
Member Author

brettsam commented Mar 1, 2022

@NickCraver -- all green! should be ready now!

@brettsam brettsam marked this pull request as ready for review March 1, 2022 16:56
@brettsam brettsam merged commit 65ee46a into dev Apr 15, 2022
@brettsam brettsam deleted the brettsam/dryioc branch April 15, 2022 16:42
@NickCraver
Copy link
Member

This one closed out #8073 automatically, but since it only addresses a portion of the performance problem I recommend we leave that issue open - thoughts?

@brettsam
Copy link
Member Author

Yep! re-opened it. Sorry about that!

@brettsam
Copy link
Member Author

/backport to v3.x

@github-actions
Copy link
Contributor

@github-actions
Copy link
Contributor

@brettsam backporting to v3.x failed, the patch most likely resulted in conflicts:

$ git am --3way --ignore-whitespace --keep-non-patch changes.patch

Applying: fixing dryioc IServiceProvider scoping issues
Using index info to reconstruct a base tree...
M	src/WebJobs.Script.WebHost/DependencyInjection/DryIoc/Container.cs
M	src/WebJobs.Script.WebHost/DependencyInjection/ScopedResolver.cs
Falling back to patching base and 3-way merge...
Auto-merging src/WebJobs.Script.WebHost/DependencyInjection/ScopedResolver.cs
CONFLICT (content): Merge conflict in src/WebJobs.Script.WebHost/DependencyInjection/ScopedResolver.cs
Auto-merging src/WebJobs.Script.WebHost/DependencyInjection/DryIoc/Container.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 fixing dryioc IServiceProvider scoping issues
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128

Please backport manually!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Performance Area: Dependency Injection The scoped IServiceProvider is passed to AddSingleton in Host V4
6 participants