Fix breaking API changes for FluentAssertions v8 and EF Core v9 Dependabot upgrades#504
Merged
Chris0Jeky merged 1 commit intomainfrom Mar 29, 2026
Merged
Fix breaking API changes for FluentAssertions v8 and EF Core v9 Dependabot upgrades#504Chris0Jeky merged 1 commit intomainfrom
Chris0Jeky merged 1 commit intomainfrom
Conversation
FluentAssertions v8 renamed BeLessOrEqualTo/BeGreaterOrEqualTo to BeLessThanOrEqualTo/BeGreaterThanOrEqualTo, and removed Execute.Assertion (replaced with a direct XunitException throw in the catch block). EF Core v9 added ExecuteDeleteAsync to EntityFrameworkQueryableExtensions alongside the existing RelationalQueryableExtensions, causing an ambiguous call in KnowledgeChunkRepository. Resolve by calling RelationalQueryableExtensions explicitly.
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Chris0Jeky
added a commit
that referenced
this pull request
Mar 29, 2026
… rename EF Core 8→9 must be done as a single coordinated bump: Microsoft.EntityFrameworkCore, Microsoft.EntityFrameworkCore.Sqlite, and Microsoft.EntityFrameworkCore.Design all need to be at the same major version. The three separate Dependabot PRs (#494, #495, #496) each caused version conflicts or runtime failures when applied individually. Also fixes the remaining BeLessOrEqualTo → BeLessThanOrEqualTo rename missed in PR #504 (midRangePayload variable in OpsCliApiTests.cs had a different prefix so replace_all didn't catch it).
4 tasks
Chris0Jeky
added a commit
that referenced
this pull request
Mar 29, 2026
… rename EF Core 8→9 must be done as a single coordinated bump: Microsoft.EntityFrameworkCore, Microsoft.EntityFrameworkCore.Sqlite, and Microsoft.EntityFrameworkCore.Design all need to be at the same major version. The three separate Dependabot PRs (#494, #495, #496) each caused version conflicts or runtime failures when applied individually. Also fixes the remaining BeLessOrEqualTo → BeLessThanOrEqualTo rename missed in PR #504 (midRangePayload variable in OpsCliApiTests.cs had a different prefix so replace_all didn't catch it).
Chris0Jeky
added a commit
that referenced
this pull request
Mar 29, 2026
…rename (#507) * Upgrade EF Core packages to 9.0.14 and fix remaining FluentAssertions rename EF Core 8→9 must be done as a single coordinated bump: Microsoft.EntityFrameworkCore, Microsoft.EntityFrameworkCore.Sqlite, and Microsoft.EntityFrameworkCore.Design all need to be at the same major version. The three separate Dependabot PRs (#494, #495, #496) each caused version conflicts or runtime failures when applied individually. Also fixes the remaining BeLessOrEqualTo → BeLessThanOrEqualTo rename missed in PR #504 (midRangePayload variable in OpsCliApiTests.cs had a different prefix so replace_all didn't catch it). * Fix KnowledgeChunkRepository: revert to extension method syntax for EF Core 9 In EF Core 9, RelationalQueryableExtensions.ExecuteDeleteAsync no longer accepts a CancellationToken, so the explicit 2-arg static call fails. Reverting to extension method syntax resolves unambiguously to EntityFrameworkQueryableExtensions (which does accept CancellationToken) since there is no ambiguity when all EF Core packages are at the same v9 version. * Suppress all logging providers in CLI to fix CliJsonContractTests EF Core 9.0.14 emits warnings to stdout via the default console logging provider, breaking JSON parsing in callers. Replace the per-category filter with ClearProviders() so CLI stdout is always clean JSON. * Fix EF Core 9 PendingModelChangesWarning by regenerating snapshot EF Core 9 introduces a PendingModelChangesWarning that throws when the migration snapshot does not match the current model fingerprint format. Bump EF Tools to 9.0.14 and add an empty migration to regenerate the snapshot in the EF Core 9 format, clearing the false-positive warning. * Suppress PendingModelChangesWarning in DbContext after EF Core 9 upgrade EF Core 9 throws PendingModelChangesWarning during Migrate() when the snapshot fingerprint format changed from EF Core 8. EF tooling confirms no actual model changes are pending. Suppress the warning per the EF Core docs recommendation to prevent startup crashes.
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.
Summary
Compatibility fixes to unblock Dependabot dependency upgrade PRs:
BeLessOrEqualTo→BeLessThanOrEqualTo,BeGreaterOrEqualTo→BeGreaterThanOrEqualTo, and removesExecute.Assertion(replaced withthrow new XunitException)ExecuteDeleteAsynctoEntityFrameworkQueryableExtensionsalongside the existingRelationalQueryableExtensions, creating an ambiguous call inKnowledgeChunkRepository.DeleteByDocumentIdAsync. Fixed by callingRelationalQueryableExtensions.ExecuteDeleteAsyncexplicitly.Affected Dependabot PRs
Test plan
@dependabot rebaseon PRs deps(nuget): Bump FluentAssertions from 6.12.0 to 8.9.0 #491, deps(nuget): Bump Microsoft.EntityFrameworkCore from 8.0.0 to 9.0.14 #494, deps(nuget): Bump Microsoft.EntityFrameworkCore.Design from 8.0.0 to 9.0.14 #495, deps(nuget): Bump Microsoft.EntityFrameworkCore.Sqlite from 8.0.0 to 9.0.14 #496 to pick up these fixes