Skip to content

EF-317: Upgrade C# driver to 3.10.0#326

Open
damieng wants to merge 1 commit into
mongodb:mainfrom
damieng:upgrade-csharp-driver
Open

EF-317: Upgrade C# driver to 3.10.0#326
damieng wants to merge 1 commit into
mongodb:mainfrom
damieng:upgrade-csharp-driver

Conversation

@damieng

@damieng damieng commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

Bumps MongoDB.Driver 3.9.0 → 3.10.0 (no src/ changes) and reconciles SpecificationTests with 3.10 behaviour without adopting native LeftJoin.

Test reconciliation

  • Updated tests whose queries now translate and return correct results under 3.10 (previously asserted ExpressionNotSupportedException).
  • Retargeted tests that remain unsupported but now throw a different exception.
  • Skipped tests exposing driver/provider issues, with ticket references:
    • CSHARP-6017 — uncorrelated Take/subquery join inner folded into the correlated $lookup sub-pipeline returns wrong results (6 tests).
    • CSHARP-6126 — mismatched-type equality returns spurious matches (2 tests).
    • EF-352 — shadow property read via EF.Property in a client-side join projection materialises as null (1 test).

Result

All SpecificationTests green across EF8/EF9/EF10 (bar the documented skips). FunctionalTests and UnitTests unaffected.

Bump MongoDB.Driver 3.9.0 -> 3.10.0 (Versions.props). No src changes.

Reconcile SpecificationTests with 3.10 behaviour without adopting native
LeftJoin:
- Update tests whose queries now translate and return correct results under
  3.10 (previously asserted ExpressionNotSupportedException).
- Retarget tests that remain unsupported but now throw a different exception.
- Skip tests exposing driver/provider issues, referencing tickets:
  - CSHARP-6017: uncorrelated Take/subquery join inner folded into the
    correlated $lookup sub-pipeline returns wrong results (6 tests).
  - CSHARP-6126: mismatched-type equality returns spurious matches (2 tests).
  - EF-352: shadow property read via EF.Property in a client-side join
    projection materialises as null (1 test).

All SpecificationTests green across EF8/EF9/EF10 (bar the skips above).
@damieng
damieng marked this pull request as ready for review July 17, 2026 10:45
@damieng
damieng requested a review from a team as a code owner July 17, 2026 10:45
@damieng
damieng requested review from ajcvickers, Copilot and papafe July 17, 2026 10:45

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

Upgrades the MongoDB C# driver dependency to 3.10.0 and updates the EF Core SpecificationTests baselines/expectations to match the driver’s updated LINQ translation and exception behavior, while documenting/skipping known driver/provider issues.

Changes:

  • Bump MongoDB.Driver default version from 3.9.0 to 3.10.0 via Versions.props.
  • Update several Northwind SpecificationTests to assert newly-translatable queries and their updated MQL baselines under driver 3.10.
  • Add/adjust skips for known incorrect-results scenarios attributed to the driver/provider (e.g., CSHARP-6017, CSHARP-6126, EF-352).

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
Versions.props Updates the default pinned MongoDB C# driver version to 3.10.0.
tests/MongoDB.EntityFrameworkCore.SpecificationTests/Query/NorthwindWhereQueryMongoTest.cs Skips mismatched-type equality tests due to driver 3.10 incorrect-results behavior (CSHARP-6126).
tests/MongoDB.EntityFrameworkCore.SpecificationTests/Query/NorthwindQueryFiltersQueryMongoTest.cs Re-enables tests that now translate under 3.10 and updates expected MQL baselines.
tests/MongoDB.EntityFrameworkCore.SpecificationTests/Query/NorthwindNavigationsQueryMongoTest.cs Adjusts expectations for an unsupported navigation scenario under EF10/driver 3.10 (now throws a different exception).
tests/MongoDB.EntityFrameworkCore.SpecificationTests/Query/NorthwindMiscellaneousQueryMongoTest.cs Updates expected translation behavior/MQL for several queries under 3.10.
tests/MongoDB.EntityFrameworkCore.SpecificationTests/Query/NorthwindJoinQueryMongoTest.cs Updates join/subquery-related tests to reflect new 3.10 translation behavior and adds targeted skips for known incorrect results (CSHARP-6017, EF-352).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

);
#else
await Assert.ThrowsAnyAsync<Exception>(() => base.Included_many_to_one_query(async));
await base.Included_many_to_one_query(async);
);
#else
await Assert.ThrowsAnyAsync<Exception>(() => base.Included_many_to_one_query2(async));
await base.Included_many_to_one_query2(async);
"Expression not supported",
(await Assert.ThrowsAsync<MongoDB.Driver.Linq.ExpressionNotSupportedException>(() =>
base.Select_Where_Navigation_Deep(async))).Message);
await Assert.ThrowsAnyAsync<Exception>(() => base.Select_Where_Navigation_Deep(async));
"Expression not supported",
(await Assert.ThrowsAsync<MongoDB.Driver.Linq.ExpressionNotSupportedException>(() =>
base.Comparing_collection_navigation_to_null_complex(async))).Message);
await Assert.ThrowsAnyAsync<Exception>(() => base.Comparing_collection_navigation_to_null_complex(async));
@codeowners-service-app

Copy link
Copy Markdown

Assigned mongoKart for team dbx-csharp-dotnet because papafe is out of office.

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.

2 participants