Repository navigation
Conversation
Collaborator
|
This is not going to be accepted because legacy clients are not supported. |
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.
Problem
TableController<TEntity>.QueryAsyncreturnsPagedResult.NextLinkas a query string only (for example$skip=50&$top=50). Datasync v6 clients and earlier resolvenextLinkagainst the host root and sendX-ZUMO-OPTIONS: nextLink=pathto say so. With a query-onlynextLink, those clients request the wrong URL, so paging fails once a result set exceedsPageSize.Change
IsLegacyClient(HttpRequest), which returnstruewhen theX-ZUMO-OPTIONSheader containsnextLink=path(case-insensitive).QueryAsynccomputes this once and passes it toBuildPagedResult, which passes it toCreateNextLink.CreateNextLinkreturns the host-relative path with no leading slash, followed by the query string, for exampletables/<table>?$skip=50&$top=50. Other clients keep the query-only format.Testing
dotnet test tests/CommunityToolkit.Datasync.Server.Test --filter "FullyQualifiedName~Query_LegacyClient_NextLinkIsRelativePath"passes on the fix. On the base source, with the same test file, it fails withAssert.StartsWith() Failure.dotnet test tests/CommunityToolkit.Datasync.Server.Test --filter "FullyQualifiedName!~Live"passes: 561 of 561.dotnet test tests/CommunityToolkit.Datasync.Server.Testexits with code 2. The live PostgreSQL tests fail withDockerUnavailableExceptionbecause Docker is not running here. Those tests are not exercised by this change. CI needs to confirm the full suite.Regression test: fails on base twice (/Assert.StartsWith() Failure/), passes on fix twice (
dotnet test tests/CommunityToolkit.Datasync.Server.Test --filter "FullyQualifiedName~Query_LegacyClient_NextLinkIsRelativePath")Fixes #629