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

[release/6.0] Undo breaking change in 6.0 in environment variable configuration prefix support #62916

Merged
merged 5 commits into from
Jan 7, 2022

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Dec 16, 2021

Backport of #62819 to release/6.0

/cc @maryamariyan

Customer Impact

Customer reported break from .NET 5.0 behavior.

Using the default configuration, the EnvironmentVariablesConfigurationProvider loads configuration from environment variable key-value pairs. For environment variables containing double underscores in the key name (e.g. A__B), the double underscores __ gets replaced by : (becoming A:B) by the environment variable configuration provider as the configuration key value.
Now, if we end up using AddEnvironmentVariables API with prefix value of MY:PREFIX: then we expect that a configuration key named MY_CONFIG to get properly populated with the value set by an environment variable set as MY__PREFIX__MY_CONFIG. This is a scenario that got regressed in .NET 6 by bugfix PR #42932.

We submitted a regression fix such that when using environment variable configuration, it brings back the support for prefix being normalized like it was in .NET 5.0.

The regression fix reverts changes made in https://github.com/dotnet/runtime/pull/42932/files while updating tests to reduce ambiguity of what the expected behavior should be.

Link to original pr fix: #42932
Link to new pr fix: #62819

Testing

Available in pr #62819
To mitigate and reduce ambiguity we updated tests and we also look to add more documentation as well.

Risk

Low risk, because it would revert changes back to match logic in 5.0 and before.

What is the risk from 6.0 to 6.0.2 with this change?
Low, because we did not fully advertise the 6.0 change already in any breaking change doc so the chances of someone relying on the 6.0 behavior is low.

@ghost
Copy link

ghost commented Dec 16, 2021

Tagging subscribers to this area: @dotnet/area-extensions-configuration
See info in area-owners.md if you want to be subscribed.

Issue Details

Backport of #62819 to release/6.0

/cc @maryamariyan

Customer Impact

Testing

Risk

Author: github-actions[bot]
Assignees: -
Labels:

area-Extensions-Configuration

Milestone: -

@eerhardt
Copy link
Member

eerhardt commented Jan 3, 2022

@maryamariyan - I think we need to add servicing changes here as well, so the Configuration.EnvironmentVariables package gets built in the release branch.

See the docs and here is an example.

@ericstj ericstj added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Jan 4, 2022
@ericstj
Copy link
Member

ericstj commented Jan 4, 2022

This was previously approved over email on 12/16

@ericstj ericstj added this to the 6.0.x milestone Jan 4, 2022
@eerhardt
Copy link
Member

eerhardt commented Jan 5, 2022

runtime (Libraries Test Run release coreclr windows x64 Debug) failure is unrelated. #62068.

@ericstj @safern @carlossanlop - can someone merge this?

@danmoseley danmoseley merged commit 8abc8fc into release/6.0 Jan 7, 2022
@danmoseley danmoseley deleted the backport/pr-62819-to-release/6.0 branch January 7, 2022 16:39
@ghost ghost locked as resolved and limited conversation to collaborators Feb 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants