Skip to content
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

Opt: refector tag list pagination support (stage 1) #4360

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

njucjc
Copy link

@njucjc njucjc commented May 21, 2024

Stage 1 for this PR

  • Use storagedriver.WithStartAfterHint to optimize the current tags list API implementation. When specifying paging parameters, there is no need to load all tags in the repository into memory.

Signed-off-by: njucjc <njucjc@gmail.com>
@github-actions github-actions bot added area/storage area/proxy Related to registry as a pull-through cache area/api labels May 21, 2024
@@ -563,9 +563,11 @@ func TestTagsAPI(t *testing.T) {
queryParams: url.Values{"last": []string{"does-not-exist"}, "n": []string{"3"}},
expectedStatusCode: http.StatusOK,
expectedBody: tagsAPIResponse{Name: imageName.Name(), Tags: []string{
"jyi7b",
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because jyi7b > does-not-exist > asj9e, so I think the expectedBody should be changed to [jyi7b, kb0j5, sb71y ].

@njucjc
Copy link
Author

njucjc commented May 21, 2024

@milosgajdos PTAL

@milosgajdos
Copy link
Member

As agreed in the other PR we'll have a look at this once the new spec is released. Appreciate the work though! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api area/proxy Related to registry as a pull-through cache area/storage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants