Repository navigation
Upgrade Marten to v9 - #10651
Open
jarlef wants to merge 1 commit into
Open
Upgrade Marten to v9#10651jarlef wants to merge 1 commit into
jarlef wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Offset paging still bypasses the async executable and uses synchronous count queries unsupported by Marten v9.
2 open issues
What changed in this PR
Upgrades Marten to v9 to address reported vulnerabilities and adapts Hot Chocolate’s Marten integration for asynchronous query execution.
Changes:
- Updates Marten to 9.51.0.
- Adds an async executable and integrates it with filtering and sorting.
- Adds integration coverage and updates SQL-capture test helpers.
| File | Description |
|---|---|
| src/HotChocolate/Marten/test/Data.Marten.Sorting.Tests/SortVisitorTestBase.cs | Captures SQL through executables. |
| src/HotChocolate/Marten/test/Data.Marten.Filters.Tests/IntegrationTests.cs | Tests async resolver execution paths. |
| src/HotChocolate/Marten/test/Data.Marten.Filters.Tests/FilterVisitorTestBase.cs | Captures SQL through executables. |
| src/HotChocolate/Marten/src/Data/Sorting/MartenQueryableSortProvider.cs | Wraps sorting query builders. |
| src/HotChocolate/Marten/src/Data/MartenQueryBuilder.cs | Adapts Marten results for async execution. |
| src/HotChocolate/Marten/src/Data/MartenQueryableExecutable.cs | Implements async query operations. |
| src/HotChocolate/Marten/src/Data/MartenEnumerableExtensions.cs | Exposes AsMartenExecutable(). |
| src/HotChocolate/Marten/src/Data/Filtering/MartenQueryableFilterProvider.cs | Wraps filtering query builders. |
| src/Directory.Packages.props | Updates the Marten dependency. |
Review effort: Balanced
| <PackageVersion Include="JsonPointer.Net" Version="5.0.0" /> | ||
| <PackageVersion Include="JsonSchema.Net" Version="7.3.4" /> | ||
| <PackageVersion Include="Marten" Version="8.37.4" /> | ||
| <PackageVersion Include="Marten" Version="9.51.0" /> |
| => await source.CountAsync(cancellationToken).ConfigureAwait(false); | ||
|
|
||
| public override async ValueTask<List<T>> ToListAsync(CancellationToken cancellationToken = default) | ||
| => [.. await source.ToListAsync(cancellationToken).ConfigureAwait(false)]; |
Member
|
We have already this on our list for HC 17 at the end of the year. |
Member
|
This branch has not been deployed
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.


Upgrade Marten to v9 since v8 has been flagged with critical vulnerabilitie
GHSA-rfx3-98h7-v3xp
GHSA-vmw2-qwm8-x84c
Since v9 has a breaking change where sync operations are no longer supported on the queryable a custom executable is needed. This wraps the marten queryable to ensure async operations are invoked.
https://martendb.io/migration-guide.html