Skip to content

[release/8.0-staging] Support IValidatableObject for nested model types in options source gen #94062

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

Merged
merged 2 commits into from
Oct 30, 2023

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Oct 26, 2023

Backport of #93952 to release/8.0-staging

/cc @tarekgh

Customer Impact

Customers who employ nested options objects and rely on the IValidateObject interface may notice that nested object validation is skipped when using the source generator. This omission can lead to unexpected behavior in the affected application. This issue has been reported by a partner team.

Testing

The changes have successfully passed all regression tests, and we have additionally introduced new tests that cover the specific scenario affected by these changes.

Risk

This fix is narrowly scoped to a one-line change, targeting only the scenario that was failing.

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.

@ghost ghost added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Oct 26, 2023
@tarekgh tarekgh self-assigned this Oct 26, 2023
@tarekgh tarekgh added area-Extensions-Options source-generator Indicates an issue with a source generator feature and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Oct 26, 2023
@ghost
Copy link

ghost commented Oct 26, 2023

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

Issue Details

Backport of #93952 to release/8.0-staging

/cc @tarekgh

Customer Impact

Customers who employ nested options objects and rely on the IValidateObject interface may notice that nested object validation is skipped when using the source generator. This omission can lead to unexpected behavior in the affected application. This issue has been reported by a partner team.

Testing

The changes have successfully passed all regression tests, and we have additionally introduced new tests that cover the specific scenario affected by these changes.

Risk

This fix is narrowly scoped to a one-line change, targeting only the scenario that was failing.

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: tarekgh
Labels:

area-Extensions-Options, source-generator

Milestone: -

@tarekgh tarekgh added this to the 8.0.1 milestone Oct 26, 2023
@tarekgh tarekgh added the Servicing-consider Issue for next servicing release review label Oct 26, 2023
@tarekgh
Copy link
Member

tarekgh commented Oct 26, 2023

@ericstj @carlossanlop could you please help review the package authoring part?

@tarekgh
Copy link
Member

tarekgh commented Oct 26, 2023

@geeknoid this is the options source gen fix porting to 8.0 servicing release. no real change than what you have approved in the original PR #93952.

@@ -4,6 +4,8 @@
<TargetFrameworks>$(NetCoreAppCurrent);$(NetCoreAppPrevious);$(NetCoreAppMinimum);netstandard2.1;netstandard2.0;$(NetFrameworkMinimum)</TargetFrameworks>
<EnableDefaultItems>true</EnableDefaultItems>
<IsPackable>true</IsPackable>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<ServicingVersion>1</ServicingVersion>
Copy link
Member

Choose a reason for hiding this comment

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

LGTM 👍 cc @carlossanlop

Copy link
Contributor

Choose a reason for hiding this comment

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

Congrats @tarekgh, you're the first one to service an 8.0 package :)

@tarekgh tarekgh added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Oct 30, 2023
@tarekgh
Copy link
Member

tarekgh commented Oct 30, 2023

This is approved offline by email.

@tarekgh tarekgh merged commit b62c8ff into release/8.0-staging Oct 30, 2023
@akoeplinger akoeplinger deleted the backport/pr-93952-to-release/8.0-staging branch November 14, 2023 13:53
@github-actions github-actions bot locked and limited conversation to collaborators Dec 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Extensions-Options 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.

4 participants