Skip to content

[release/9.0] Fix config source gen binding value types to null configuration values#107670

Merged
artl93 merged 2 commits intorelease/9.0from
backport/pr-107654-to-release/9.0
Sep 11, 2024
Merged

[release/9.0] Fix config source gen binding value types to null configuration values#107670
artl93 merged 2 commits intorelease/9.0from
backport/pr-107654-to-release/9.0

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions bot commented Sep 11, 2024

Backport of #107654 to release/9.0

/cc @tarekgh

Customer Impact

[Select one or both of the boxes. Describe how this issue impacts customers, citing the expected and actual behaviors and scope of the issue. If customer-reported, provide the issue number.]

Users utilizing the configuration source generator and binding properties of parsable types (e.g., Integers, Floats, Doubles, Enums, etc.) may encounter exceptions if the configuration contains null or empty values. This issue could present a challenge for those migrating from the reflection-based runtime configuration binding to the source generator. While a workaround is to manually edit the configuration file to remove empty or null entries, this may not always be practical in various environments, and users may still face the issue if they're unaware of it.

Regression

  • Yes
  • No

[If yes, specify when the regression was introduced. Provide the PR or commit if known.]

Testing

[How was the fix verified? How was the issue missed previously? What tests were added?]
Manually tested and confirmed the fix. Passed all regression tests. Added more tests for broken cases.

Risk

The impact is low, as the fix specifically targets the broken case without affecting other scenarios. Most of the changes in this PR are related to test files, with the actual fix being small and narrowly scoped.

[High/Medium/Low. Justify the indication by mentioning how risks were measured and addressed.]

IMPORTANT: If this backport is for a servicing release, please verify that:

  • The PR target branch is release/X.0-staging, not release/X.0.

  • If the change touches code that ships in a NuGet package, you have added the necessary package authoring and gotten it explicitly reviewed.

@dotnet-policy-service
Copy link
Copy Markdown
Contributor

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

@tarekgh
Copy link
Copy Markdown
Member

tarekgh commented Sep 11, 2024

CC @artl93 @ericstj

@artl93 artl93 added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Sep 11, 2024
@artl93 artl93 merged commit 9bf6440 into release/9.0 Sep 11, 2024
@jkotas jkotas deleted the backport/pr-107654-to-release/9.0 branch September 18, 2024 21:31
@github-actions github-actions bot locked and limited conversation to collaborators Oct 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-Extensions-Configuration Servicing-approved Approved for servicing release source-generator Indicates an issue with a source generator feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants