Skip to content

Merge branch 'release/11.0-preview7' => 'main' - #38709

Merged
AndriySvyryd merged 4 commits into
mainfrom
release/11.0-preview7
Jul 30, 2026
Merged

AndriySvyryd merged 4 commits into
mainfrom
release/11.0-preview7

Conversation

@AndriySvyryd

Copy link
Copy Markdown
Member

No description provided.

ducmerida and others added 3 commits July 22, 2026 13:18
* 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]>
Copilot AI review requested due to automatic review settings July 29, 2026 00:23
@AndriySvyryd
AndriySvyryd requested review from a team and wtgodbe as code owners July 29, 2026 00:23
@AndriySvyryd
AndriySvyryd enabled auto-merge July 29, 2026 00:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

Comment thread eng/common/tools.sh Resolved
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 11.0-preview7 milestone Jul 29, 2026
Copilot AI review requested due to automatic review settings July 30, 2026 00:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 32 out of 33 changed files in this pull request and generated no new comments.

Files not reviewed (1)
  • src/EFCore.Relational/Properties/RelationalStrings.Designer.cs: Generated file

@AndriySvyryd
AndriySvyryd requested a review from wtgodbe July 30, 2026 22:45
@AndriySvyryd
AndriySvyryd merged commit 39b5015 into main Jul 30, 2026
32 checks passed
@github-actions github-actions Bot added the api-review This PR or issue is introducing public API changes that need to be reviewed label Jul 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

API review baseline changes for src/EFCore.Relational/EFCore.Relational.baseline.json

Show diff

The diff below was generated by ApiChief between the base and the PR.

+ class Microsoft.EntityFrameworkCore.DbQueryConcurrencyException : System.Exception
+ DbQueryConcurrencyException();
+ [Obsolete] DbQueryConcurrencyException(SerializationInfo info, StreamingContext context);
+ DbQueryConcurrencyException(string message);
+ DbQueryConcurrencyException(string message, Exception? innerException);
  static class Microsoft.EntityFrameworkCore.Diagnostics.RelationalStrings
+ static string SplitQueryConcurrentModification { get; }

@AndriySvyryd AndriySvyryd removed the api-review This PR or issue is introducing public API changes that need to be reviewed label Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants