-
Notifications
You must be signed in to change notification settings - Fork 11k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[GraphQL/MovePackage] Paginate by version #17697
Open
amnn
wants to merge
1
commit into
amnn/gql-pkg-cp-page
Choose a base branch
from
amnn/gql-pkg-v-page
base: amnn/gql-pkg-cp-page
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains 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
amnn
requested review from
wlmyng,
stefan-mysten,
emmazzz and
suiwombat
as code owners
May 13, 2024 15:47
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Ignored Deployments
|
wlmyng
approved these changes
May 13, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reasoning for keeping this and paginate by checkpoint separate makes sense to me. also neat trick on the system package versioning by joining to objects_history table
amnn
force-pushed
the
amnn/gql-pkg-cp-page
branch
from
May 14, 2024 11:15
d1c9a77
to
e7eb5e6
Compare
amnn
force-pushed
the
amnn/gql-pkg-cp-page
branch
from
May 14, 2024 11:51
e7eb5e6
to
948e083
Compare
## Description Introduce two new queries: `Query.packageVersions` and `MovePackage.versions` for iterating over all the different versions of a given package. This kind of query is useful for understanding package history. These were introduced as a separate query, instead of having a single query for iterating over packages that could optionally take a checkpoint bounds or version bounds because of how system packages interact with the `packages` table: Because system packages are updated in-place, they only have one row in the `packages` table. This makes sense for paginating packages in bulk (e.g. by checkpoint) where the primary aim is to get a snapshot of the packages available at a certain point in time, but doesn't work for answering package version queries for system packages, and it prevents us from creating a combined query. A combined query would also allow someone to create a filter that bounds checkpoints and versions, but doesn't bound the package itself (or would require us to prevent that combination), which is complicated to implement efficiently and not particularly useful. ## Test plan New E2E tests: ``` sui$ cargo nextest run -p sui-graphql-e2e-tests \ --features pg_integration \ -- packages/versioning ``` + Testing against a read replica to make sure system package tests work well, and performance is reasonable.
amnn
force-pushed
the
amnn/gql-pkg-cp-page
branch
from
May 15, 2024 10:13
948e083
to
eaecde5
Compare
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.
Description
Introduce two new queries:
Query.packageVersions
andMovePackage.versions
for iterating over all the different versions of a given package.This kind of query is useful for understanding package history.
These were introduced as a separate query, instead of having a single query for iterating over packages that could optionally take a checkpoint bounds or version bounds because of how system packages interact with the
packages
table:Because system packages are updated in-place, they only have one row in the
packages
table. This makes sense for paginating packages in bulk (e.g. by checkpoint) where the primary aim is to get a snapshot of the packages available at a certain point in time, but doesn't work for answering package version queries for system packages, and it prevents us from creating a combined query. A combined query would also allow someone to create a filter that bounds checkpoints and versions, but doesn't bound the package itself (or would require us to prevent that combination), which is complicated to implement efficiently and not particularly useful.Test plan
New E2E tests:
& Testing against a read replica to make sure system package tests work well, and performance is reasonable.
Stack
objects_version
table. #17542objects_version
table. #17543Release notes
Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.
For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.
Query.packageVersions
andMovePackage.versions
for paginating over the versions of a particular package.