-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
HostFactoryResolver - Increase default timeout and add env var option #61688
Conversation
Tagging subscribers to this area: @eerhardt, @maryamariyan Issue Detailsnull
|
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.
We need packaging changes. See: 39ecea6#diff-c7518d66e82e24aa3bb3bcf33bfa8717242e02d446983237f6ae56602785fde6R12 for an example.
Make sure that the package is created locally when building all configurations leg.
I'm not sure if it matters, but this package isn't a traditional library package.
Hopefully that doesn't change how we service this package, but I just wanted to call that out. |
Thanks, @eerhardt for calling that out. I'm not sure how we build source packages, but I believe we still need the I would still bump the servicing version even though it doesn't land on NuGet.org as that helps reason about versions even for internal consumption, i.e aspnet transport packages also get that patch version bumped. |
Looks like this happens automatically for this package. |
Or perhaps that's the default unless you specify |
...stFactoryResolver/tests/TopLevelStatementsTestsTimeout/TopLevelStatementsTestsTimeout.csproj
Outdated
Show resolved
Hide resolved
…opLevelStatementsTestsTimeout/TopLevelStatementsTestsTimeout.csproj
Tests are definitely unrelated. I will open issues for them. |
Customer Impact
When customer has debugger attached or when using tools like EF migration, host startup path using
WebApplicationBuilder
for hosting andWebApplicationFactory<T>
for testing, may fail to build and throw anInvalidOperationException
with the message “Unable to build IHost.”, because the default timeout is only 5 seconds.We are proposing to use a higher timeout (5 minute) to be used so that when an application is taking longer to build, we could allow startup code to complete, and the host can start successfully. Check comment here for more detail.
Increasing the timeout should not have a negative impact on experience.
We also added an environment variable option called
DOTNET_HOST_FACTORY_RESOLVER_DEFAULT_TIMEOUT_IN_SECONDS
in case user needs to set their own custom timeout.See issue: #60891
Testing
Check PR #61621
Risk
Very low.
Regression
No, new 6.0 feature/code flow for discovering a host
cherry pick of #61621