Uh oh!
There was an error while loading. Please reload this page.
HostFactoryResolver - Increase default timeout and add env var option - #61688
Conversation
ghost
commented
Nov 16, 2021
Tagging subscribers to this area: @eerhardt, @maryamariyan Issue Detailsnull
|
safern
left a comment
There was a problem hiding this comment.
We need packaging changes. See: 39ecea6#diff-c7518d66e82e24aa3bb3bcf33bfa8717242e02d446983237f6ae56602785fde6R12 for an example.
Make sure that the package is created locally when building all configurations leg.
eerhardt
commented
Nov 16, 2021
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. |
safern
commented
Nov 16, 2021
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. |
ericstj
commented
Nov 16, 2021
Looks like this happens automatically for this package. |
ericstj
commented
Nov 16, 2021
Or perhaps that's the default unless you specify |
Uh oh!
There was an error while loading. Please reload this page.
…opLevelStatementsTestsTimeout/TopLevelStatementsTestsTimeout.csproj
safern
commented
Nov 17, 2021
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
WebApplicationBuilderfor hosting andWebApplicationFactory<T>for testing, may fail to build and throw anInvalidOperationExceptionwith 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_SECONDSin 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