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/8.0-rc2] Ensure Bind can handle null from GetSection #92477

Merged
merged 3 commits into from
Sep 22, 2023

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Sep 22, 2023

Backport of #92384 to release/8.0-rc2

/cc @ericstj

Customer Impact

NullReferenceException when an IConfiguration instance returns null from GetSection. No implementations in the product do this, and the interface is not annotated to return null, however we received a customer report of this regression from mocking the interface. When using moq to mock an interface it will return null for unspecified cases.

Testing

Tested customer reported case manually using Moq. Added automated test for both runtime binder and source gen to catch this behavior.

Risk

Very low - we are only adding back a null check that was removed from a previous change in RC2.

IConfiguration instances may return a null value from GetSection.
We were not handling this and would throw a NullReferenceException.
@ghost
Copy link

ghost commented Sep 22, 2023

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 #92384 to release/8.0-rc2

/cc @ericstj

Customer Impact

Testing

Risk

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.

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

area-Extensions-Configuration

Milestone: -

@ericstj ericstj added the Servicing-consider Issue for next servicing release review label Sep 22, 2023
@tarekgh tarekgh added this to the 8.0.0 milestone Sep 22, 2023
@carlossanlop
Copy link
Member

Thanks for marking the 8.0 as no-merge @ericstj.

Can you please send the email to Tactics requesting approval, @tarekgh? Today EOD is the deadline for merging RC2 changes.

@artl93
Copy link
Contributor

artl93 commented Sep 22, 2023

M2 approved.

@carlossanlop carlossanlop added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Sep 22, 2023
@carlossanlop
Copy link
Member

Approved by Tactics via email.

@carlossanlop carlossanlop merged commit 974edf9 into release/8.0-rc2 Sep 22, 2023
108 of 111 checks passed
@carlossanlop carlossanlop deleted the backport/pr-92384-to-release/8.0-rc2 branch September 22, 2023 17:25
@ericstj
Copy link
Member

ericstj commented Sep 22, 2023

Thank you @carlossanlop

@radical radical mentioned this pull request Sep 26, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Oct 23, 2023
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