Skip to content

Fix breaking API changes for FluentAssertions v8 and EF Core v9 Dependabot upgrades#504

Merged
Chris0Jeky merged 1 commit intomainfrom
fix/dependabot-compat
Mar 29, 2026
Merged

Fix breaking API changes for FluentAssertions v8 and EF Core v9 Dependabot upgrades#504
Chris0Jeky merged 1 commit intomainfrom
fix/dependabot-compat

Conversation

@Chris0Jeky
Copy link
Copy Markdown
Owner

Summary

Compatibility fixes to unblock Dependabot dependency upgrade PRs:

  • FluentAssertions v8: Renames BeLessOrEqualToBeLessThanOrEqualTo, BeGreaterOrEqualToBeGreaterThanOrEqualTo, and removes Execute.Assertion (replaced with throw new XunitException)
  • EF Core v9: Adds ExecuteDeleteAsync to EntityFrameworkQueryableExtensions alongside the existing RelationalQueryableExtensions, creating an ambiguous call in KnowledgeChunkRepository.DeleteByDocumentIdAsync. Fixed by calling RelationalQueryableExtensions.ExecuteDeleteAsync explicitly.

Affected Dependabot PRs

Test plan

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.
@gemini-code-assist
Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@Chris0Jeky Chris0Jeky merged commit e302c9c into main Mar 29, 2026
18 checks passed
@github-project-automation github-project-automation bot moved this from Pending to Done in Taskdeck Execution Mar 29, 2026
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

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant