-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Update HostFactoryResolver to account for lack of application name with new host pattern #59743
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
…th new host pattern Based on dotnet/efcore#26198 The fix should go here, rather than in EF Core, because then anybody using this code will get the fixed behavior. I have tested this locally and it fixes https://github.com/dotnet/efcore/issues/26177. However tests should be added to this repo.
Tagging subscribers to this area: @eerhardt, @maryamariyan Issue DetailsBased on dotnet/efcore#26198 The fix should go here, rather than in EF Core, because then anybody using this code will get the fixed behavior. I have tested this locally and it fixes https://github.com/dotnet/efcore/issues/26177. However tests should be added to this repo.
|
@davidfowl You're probably the best person to add tests here. |
…ate pattern EF-side tests for dotnet/runtime#59743 These will fail until the new source package for HostFactoryResolver is available. I have tested locally that they work once this is done.
I have added tests on the EF side of this: dotnet/efcore#26204. Testing should still be done here. |
=> arg.Equals("--applicationName", StringComparison.OrdinalIgnoreCase) || | ||
arg.Equals("/applicationName", StringComparison.OrdinalIgnoreCase); | ||
|
||
args = args.Any(arg => IsApplicationNameArg(arg)) || assembly.FullName is null |
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.
When is assembly.FullName
null?
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.
When you're writing unit tests 😄
@ajcvickers thanks for initiating the fix here. Seems like it needs unit test to go with it. Are you planning on adding the test for this? If you'd prefer, I could take over the PR from here, let me know thanks. |
@maryamariyan I was hoping @davidfowl would do it, since he made the change that broke things. Or am I expecting too much from a partner architect? |
Entirely, but we have a slew of wonderful tests here https://github.com/dotnet/runtime/blob/main/src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/HostFactoryResolverTests.cs 😄 |
Closing this PR in favor of #60053 |
…ate pattern EF-side tests for dotnet/runtime#59743 These will fail until the new source package for HostFactoryResolver is available. I have tested locally that they work once this is done.
Based on dotnet/efcore#26198
The fix should go here, rather than in EF Core, because then anybody using this code will get the fixed behavior. I have tested this locally and it fixes https://github.com/dotnet/efcore/issues/26177. However tests should be added to this repo.