This repository was archived by the owner on Sep 30, 2024. It is now read-only.
insights: admin UI graphql paging fix - #47808
Merged
Merged
Conversation
coury-clark
approved these changes
Feb 17, 2023
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
The underlying paging controls made the assumption that any sort field is both non-null and unique. This caused problems because we were allowing sorting by fields that can be null (queue position) and state which is not unique.
This change simplifies the paging cursor so that it will only contain the backfill id then builds the where clause using that instead of the relying on the underlying paging controller.
There does still remain the possibility that if a series were shared between multiple insights and thus shared the same backfill and that backfill fell at the border of a page, that paging could skip the additional instances of that backfill. I consider this low ok for now because at least one instance of the backfill will always appear and any action on that will apply to all items.
Test plan
Verify paging works for each sort option
verify search worked case insensitve