Skip to content

Add ConfigurationKeyNameAttribute to binder and updated tests.#50338

Merged
safern merged 16 commits into
dotnet:mainfrom
Coderrob:config-key-name
Apr 12, 2021
Merged

Add ConfigurationKeyNameAttribute to binder and updated tests.#50338
safern merged 16 commits into
dotnet:mainfrom
Coderrob:config-key-name

Conversation

@Coderrob

@Coderrob Coderrob commented Mar 28, 2021

Copy link
Copy Markdown
Contributor

API implementation of #36010

  • Add ConfigurationKeyName attribute to the Configuration Binder project
  • Update Configuration Binder to use key name from the new attribute in binding property values
  • Add test using ConfigurationKeyName attribute to map the configuration dictionary key

@ghost

ghost commented Mar 28, 2021

Copy link
Copy Markdown

Tagging subscribers to this area: @maryamariyan, @safern
See info in area-owners.md if you want to be subscribed.

Issue Details

API implementation of #36010

  • Add ConfigurationKeyNameAttribute to the Configuration Binder project
  • Update Configuration Binder to use key name from the new attribute in binding property values
  • Add test using new attribute to map DataMember[] to the configuration dictionary key
Author: Coderrob
Assignees: -
Labels:

area-Extensions-Configuration

Milestone: -

@davidfowl

Copy link
Copy Markdown
Member

cc @HaoK

@davidfowl

Copy link
Copy Markdown
Member

CreateDefaultBuilder_SecretsDoesReload failed.

cc @maryamariyan

@maryamariyan

Copy link
Copy Markdown
Contributor

CreateDefaultBuilder_SecretsDoesReload failed.

issue logged #48696

@HaoK

HaoK commented Mar 31, 2021

Copy link
Copy Markdown
Member

Unrelated to this PR, but config reload tests were among the flakiest of tests for us back in the day as well, the change notifications were never super reliable

@maryamariyan

maryamariyan commented Mar 31, 2021

Copy link
Copy Markdown
Contributor

Unrelated to this PR, but config reload tests were among the flakiest of tests for us back in the day as well, the change notifications were never super reliable

Thanks @HaoK I think that's relevant to the issue reported in #48696. I'll check to see how similar tests in configuration relying on change notification look like, in order to fixup that test

@Coderrob
Coderrob requested review from HaoK and maryamariyan March 31, 2021 04:36
@Coderrob

Copy link
Copy Markdown
Contributor Author

@safern @HaoK what are your opinions on providing a default value to the GetPropertyValue function? Yay or nay?

Previous behavior returned null or threw exception. Just nipped adding the default value to go back to how it was.

@HaoK

HaoK commented Mar 31, 2021

Copy link
Copy Markdown
Member

Previous behavior returned null or threw exception. Just nipped adding the default value to go back to how it was.

I would leave the existing behavior alone

@Coderrob
Coderrob requested review from HaoK and safern April 1, 2021 00:41
@Coderrob
Coderrob requested a review from safern April 5, 2021 22:47
@Coderrob
Coderrob requested a review from safern April 9, 2021 05:11
@Coderrob
Coderrob requested a review from safern April 11, 2021 22:27
@Coderrob

Copy link
Copy Markdown
Contributor Author

@safern the CreateDefaultBuilder_SecretsDoesReload error struck again. Do you have an easier way to tickle a new build?

@safern safern left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the good work here, @Coderrob!

@safern
safern merged commit 4936902 into dotnet:main Apr 12, 2021
@Coderrob
Coderrob deleted the config-key-name branch April 13, 2021 01:04
@Coderrob

Coderrob commented Apr 13, 2021

Copy link
Copy Markdown
Contributor Author

LGTM, thanks for the good work here, @Coderrob!

@safern Thank you for the help! Thank you to all involved in reviewing and approving the changes.

@ghost ghost locked as resolved and limited conversation to collaborators May 13, 2021
@karelz karelz added this to the 6.0.0 milestone May 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants