Repository navigation
Merge branch 'release/11.0-preview7' => 'main' - #38709
Merged
Merged
Conversation
) Fixes #33826 Co-authored-by: AndriySvyryd <[email protected]>
* Backflow from https://github.com/dotnet/dotnet / 7bcb900 build 324583 Diff: https://github.com/dotnet/dotnet/compare/dadfb24164945e42d8fda33324ddf87b99b7686d..7bcb9009c40399c9073e7db938250486229cc85d From: dotnet/dotnet@dadfb24 To: dotnet/dotnet@7bcb900 [[ commit created by automation ]] * Update dependencies from build 324583 Updated Dependencies: Microsoft.DotNet.Arcade.Sdk, Microsoft.DotNet.Build.Tasks.Templating, Microsoft.DotNet.Helix.Sdk (Version 11.0.0-beta.26365.101 -> 11.0.0-beta.26376.106) Microsoft.Extensions.Caching.Memory, Microsoft.Extensions.Configuration, Microsoft.Extensions.Configuration.EnvironmentVariables, Microsoft.Extensions.Configuration.Json, Microsoft.Extensions.DependencyInjection, Microsoft.Extensions.DependencyModel, Microsoft.Extensions.HostFactoryResolver.Sources, Microsoft.Extensions.Logging, Microsoft.NETCore.App.Ref, Microsoft.NETCore.Platforms, System.Formats.Asn1, System.Runtime.Caching, System.Text.Encodings.Web, System.Text.Json (Version 11.0.0-preview.7.26365.101 -> 11.0.0-preview.7.26376.106) [[ commit created by automation ]] * Fix union model validator tests for new union shape Co-authored-by: wtgodbe <[email protected]> * Update union model validator tests for .NET 11 preview behavior Co-authored-by: wtgodbe <[email protected]> * Update dependencies from build 324662 Updated Dependencies: Microsoft.DotNet.Arcade.Sdk, Microsoft.DotNet.Build.Tasks.Templating, Microsoft.DotNet.Helix.Sdk (Version 11.0.0-beta.26376.106 -> 11.0.0-beta.26377.110) Microsoft.Extensions.Caching.Memory, Microsoft.Extensions.Configuration, Microsoft.Extensions.Configuration.EnvironmentVariables, Microsoft.Extensions.Configuration.Json, Microsoft.Extensions.DependencyInjection, Microsoft.Extensions.DependencyModel, Microsoft.Extensions.HostFactoryResolver.Sources, Microsoft.Extensions.Logging, Microsoft.NETCore.App.Ref, Microsoft.NETCore.Platforms, System.Formats.Asn1, System.Runtime.Caching, System.Text.Encodings.Web, System.Text.Json (Version 11.0.0-preview.7.26376.106 -> 11.0.0-preview.7.26377.110) [[ commit created by automation ]] * Update dependencies from build 324774 Updated Dependencies: Microsoft.DotNet.Arcade.Sdk, Microsoft.DotNet.Build.Tasks.Templating, Microsoft.DotNet.Helix.Sdk (Version 11.0.0-beta.26377.110 -> 11.0.0-beta.26378.106) Microsoft.Extensions.Caching.Memory, Microsoft.Extensions.Configuration, Microsoft.Extensions.Configuration.EnvironmentVariables, Microsoft.Extensions.Configuration.Json, Microsoft.Extensions.DependencyInjection, Microsoft.Extensions.DependencyModel, Microsoft.Extensions.HostFactoryResolver.Sources, Microsoft.Extensions.Logging, Microsoft.NETCore.App.Ref, Microsoft.NETCore.Platforms, System.Formats.Asn1, System.Runtime.Caching, System.Text.Encodings.Web, System.Text.Json (Version 11.0.0-preview.7.26377.110 -> 11.0.0-preview.7.26378.106) [[ commit created by automation ]] * Revert "Update union model validator tests for .NET 11 preview behavior" This reverts commit 22b6fc6. * Revert "Fix union model validator tests for new union shape" This reverts commit 26b6058. * Fix union type detection after C# union types became value types The C# preview "union" language feature now compiles union declarations (e.g. union UnionEntity(int);) as value types (structs implementing System.Runtime.CompilerServices.IUnion), rather than reference types. This broke the existing detection of union types mapped as entity or complex types added in #38398: - SharedTypeExtensions.IsValidEntityType required IsClass: true, so EntityType's constructor now threw a generic ArgumentException ("must be a non-interface reference type") as soon as a union type was added to the model, before ModelValidator ever got a chance to detect it and produce the specific UnionTypeNotSupported message. - ConstructorBindingConvention (an IModelFinalizingConvention that runs during FinalizeModel, before ModelValidator.Validate) attempted to bind a constructor for union types used as complex properties, throwing "No suitable constructor was found" before the model validator's union check was reached. Fix: - IsValidEntityType now also accepts union types (mirroring IsValidComplexType, which already allowed them), so union entity types can still be added to the model and are rejected later, with the intended friendly error message, by ModelValidator. - ConstructorBindingConvention now skips constructor binding for union entity/complex types, since they can never have a meaningful constructor binding, allowing model finalization to proceed to ModelValidator.Validate where the specific union error is thrown. Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: wtgodbe <[email protected]> Co-authored-by: Will Godbe <[email protected]> Co-authored-by: Copilot <[email protected]>
wtgodbe
approved these changes
Jul 29, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This merge syncs release/11.0-preview7 into main, bringing updated .NET 11 preview tooling plus several EF Core query pipeline and test updates (notably around GroupBy composition and split-query concurrency behavior).
Changes:
- Add detection/exception for split-query concurrent modifications that produce orphaned child rows, plus provider-specific test adjustments.
- Fix/enable additional GroupBy patterns composed over “single-result subqueries” (e.g.
g.First()), including navigation usage and new SQL baselines. - Update SDK/Arcade/tooling infrastructure (global.json, Arcade versions, build scripts) and add initial union-type plumbing/validation in the model validator path.
Reviewed changes
Copilot reviewed 32 out of 33 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| test/EFCore.Tests/Infrastructure/ModelValidatorTest.cs | Updates union-type test shape and uses non-generic Entity(Type) mapping. |
| test/EFCore.SqlServer.FunctionalTests/Query/NorthwindGroupByQuerySqlServerTest.cs | Adds SQL baselines for new GroupBy/nav-composition scenarios. |
| test/EFCore.SqlServer.FunctionalTests/Query/AdHocQuerySplittingQuerySqlServerTest.cs | Overrides concurrency regression tests to avoid nondeterministic SQL baselines. |
| test/EFCore.Sqlite.FunctionalTests/Query/AdHocQuerySplittingQuerySqliteTest.cs | No-ops split-query concurrency regression tests (SQLite snapshot semantics). |
| test/EFCore.Specification.Tests/Query/NorthwindGroupByQueryTestBase.cs | Adds new GroupBy test cases covering navigation access/composition after First(). |
| test/EFCore.Relational.Specification.Tests/Query/AdHocQuerySplittingQueryTestBase.cs | Adds split-query concurrency regression tests for orphan child-row detection (#33826). |
| test/EFCore.InMemory.FunctionalTests/Query/NorthwindGroupByQueryInMemoryTest.cs | Skips new GroupBy tests consistently with existing InMemory limitations (Issue#31209). |
| src/Shared/SharedTypeExtensions.cs | Allows union types to pass entity-type validity checks; adds IsUnion() helper. |
| src/EFCore/Query/Internal/NavigationExpandingExpressionVisitor.cs | Preserves selector structure for GroupBy + cardinality-reducing composition so navigation expansion still works. |
| src/EFCore/Metadata/Conventions/ConstructorBindingConvention.cs | Avoids attempting constructor binding for union types. |
| src/EFCore.Relational/Query/SqlExpressions/SelectExpression.cs | Refactors and exposes single-result subquery lowering so projections can be composed over without translation failure. |
| src/EFCore.Relational/Query/Internal/SplitQueryResultCoordinator.cs | Adds verification step to detect leftover (orphan) child rows at the end of split-query materialization. |
| src/EFCore.Relational/Query/Internal/SplitQueryingEnumerable.cs | Invokes orphan-check verification when finishing enumeration. |
| src/EFCore.Relational/Query/Internal/RelationalProjectionBindingExpressionVisitor.cs | Lowers single-result subqueries on-demand when composed over, caching per projection slot. |
| src/EFCore.Relational/Query/Internal/GroupBySplitQueryingEnumerable.cs | Invokes orphan-check verification when finishing GroupBy split-query enumeration. |
| src/EFCore.Relational/Properties/RelationalStrings.resx | Adds a new user-facing resource string for split-query concurrent modification. |
| src/EFCore.Relational/Properties/RelationalStrings.Designer.cs | Generated accessor for the new resource string. |
| src/EFCore.Relational/EFCore.Relational.baseline.json | API baseline update for the new public exception/resource. |
| src/EFCore.Relational/DbQueryConcurrencyException.cs | Introduces a public exception type for split-query correlation failures under concurrent modification. |
| global.json | Updates pinned .NET SDK/tool versions. |
| eng/Version.Details.xml | Updates dotnet/dotnet dependency SHAs/versions. |
| eng/Version.Details.props | Updates centralized dependency version properties. |
| eng/common/tools.sh | Adds pipeline logger support, retry logic, and new flags; adjusts warning handling. |
| eng/common/tools.ps1 | PowerShell equivalents for pipeline logger support, retry logic, and new flags. |
| eng/common/sdk-task.sh | Adds --norestore, makes restore default-on, and avoids repo toolset side effects. |
| eng/common/sdk-task.ps1 | Adds -norestore, makes restore default-on, and avoids repo toolset side effects. |
| eng/common/native/init-os-and-arch.sh | Improves FreeBSD/PowerPC arch detection. |
| eng/common/cross/toolchain.cmake | Adds FreeBSD toolchain selection for ppc64le. |
| eng/common/cross/build-rootfs.sh | Adjusts Alpine version/package selection by arch (riscv64/loongarch64). |
| eng/common/core-templates/job/onelocbuild.yml | Adds WIF/Entra token path for ceapex feeds (internal builds), with PAT fallback. |
| eng/common/core-templates/job/helix-job-monitor.yml | Adds opt-in reporting using fully qualified test names. |
| eng/common/build.sh | Adds pipeline logger and flag to avoid masking exit codes on CI failure. |
| eng/common/build.ps1 | Adds flag to avoid masking exit codes on CI failure. |
Files not reviewed (1)
- src/EFCore.Relational/Properties/RelationalStrings.Designer.cs: Generated file
wtgodbe
approved these changes
Jul 30, 2026
Contributor
API review baseline changes for
|
This was referenced Jul 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.