Skip to content

Use a ChainedConfigurationSource to share sources between WebApplicationBuilder and inner host #33082

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

Closed
halter73 opened this issue May 27, 2021 · 1 comment · Fixed by #34407
Assignees
Labels
area-minimal Includes minimal APIs, endpoint filters, parameter binding, request delegate generator etc feature-minimal-hosting
Milestone

Comments

@halter73
Copy link
Member

WebApplicationBuilder currently copies sources from its Configuration property in a _hostBuilder.ConfigureHostConfiguration( callback. This works well for sources that are configured by that point, but that means lower-level services like loggers that use the _hostBuilder's configuration don't observe sources that are added are removed after the ConfigureHostConfiguration runs.

As part of this, I think we should try to re-add app configuration during WebApplicationBuilder.Build() so we can allow users to change the environment after constructing the WebApplicationBuilder but before actually building it. See WebApplicationFunctionalTests.EnvironmentSpecificLoggingConfigurationSectionPassedToLoggerByDefault() for one of the broken scenarios.

@BrennanConroy BrennanConroy changed the title Use a ChainedConfigurationSource to share sources between WebApplicationBuilder an inner host Use a ChainedConfigurationSource to share sources between WebApplicationBuilder and inner host Jun 2, 2021
@BrennanConroy BrennanConroy added this to the Next sprint planning milestone Jun 2, 2021
@ghost
Copy link

ghost commented Jun 2, 2021

Thanks for contacting us.

We're moving this issue to the Next sprint planning milestone for future evaluation / consideration. We would like to keep this around to collect more feedback, which can help us with prioritizing this work. We will re-evaluate this issue, during our next planning meeting(s).
If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact issues.
To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.

@halter73 halter73 self-assigned this Jul 8, 2021
@halter73 halter73 modified the milestones: 6.0-preview7, 6.0-rc1 Jul 12, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Aug 15, 2021
@amcasey amcasey added area-minimal Includes minimal APIs, endpoint filters, parameter binding, request delegate generator etc and removed area-runtime labels Jun 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-minimal Includes minimal APIs, endpoint filters, parameter binding, request delegate generator etc feature-minimal-hosting
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants