-
Notifications
You must be signed in to change notification settings - Fork 91
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
feat(repodb): add pagination for ImageListForDigest and implement FilterTags #1102
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1102 +/- ##
==========================================
+ Coverage 89.21% 89.23% +0.01%
==========================================
Files 88 88
Lines 18105 18265 +160
==========================================
+ Hits 16152 16298 +146
- Misses 1494 1502 +8
- Partials 459 465 +6
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
fe058ab
to
b1c8b65
Compare
…terTags ImageListForDigest can now return paginated results, directly from DB. It uses FilterTags, a new method to filter tags (obviously) based on the criteria provided in the filter function. Pagination of tags is now slightly different, it shows all results if no limit and offset are provided. Signed-off-by: Alex Stan <alexandrustan96@yahoo.ro> bug(tests): cli tests for digests expecting wrong size Signed-off-by: Andrei Aaron <aaaron@luxoft.com> (cherry picked from commit 369216d) fix(repodb): do not include repo metadata in search results if no matching tags are identified Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
This lgtm. |
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.
I think all meaningful changes are good. Just some name changes to fix left
…sed correctly The filter function was called only once per manifest digest. The function is supposed to also take into consideration repometa, but only the first repometa-manifestmeta pair was processed. Also increase code coverage. Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
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.
lgtm
ImageListForDigest can now return paginated results, directly from DB. It uses FilterTags, a new method to filter tags (obviously) based on the criteria provided in the filter function.
Pagination of tags is now slightly different, it shows all results if no limit and offset are provided.
Signed-off-by: Alex Stan alexandrustan96@yahoo.ro
bug(tests): cli tests for digests expecting wrong size
Signed-off-by: Andrei Aaron aaaron@luxoft.com
(cherry picked from commit 369216d)
Signed-off-by: Andrei Aaron aaaron@luxoft.com
What type of PR is this?
feature
Which issue does this PR fix:
The call ImageListForDigest was not returning paginated results, actually it was not returning data from RepoDB, it was using the layout.
What does this PR do / Why do we need it:
FilterTags is a new RepoDB API used to return the images from RepoDB matching an arbitrary function sent as parameter to FilterTags.
This will also be used in other calls from subsequent PRs.
Will this break upgrades or downgrades?
No
Does this PR introduce any user-facing change?:
The ImageListForDigest GraphQL API changes to return only the entries for a specific page of images.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.