0
Fork 0
mirror of https://github.com/project-zot/zot.git synced 2025-04-08 02:54:41 -05:00
zot/pkg/cli
Andrei Aaron e8e7c343ad
feat(repodb): add pagination for ImageListForDigest and implement FilterTags (#1102)
* feat(repodb): add pagination for ImageListForDigest and implement FilterTags

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 369216df931a4053c18278a8d89f86d2e1e6a436)

fix(repodb): do not include repo metadata in search results if no matching tags are identified

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>

* fix(repodb): Fix an issue in FilterTags where repometa was not proceesed 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>

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
Co-authored-by: Alex Stan <alexandrustan96@yahoo.ro>
2023-01-18 00:31:54 +02:00
..
cli.go build(tags): remove redundant build tag ui_base (#857) 2022-10-10 15:05:55 +03:00
client.go fix: removed resty calls from sync (#1016) 2022-12-22 10:19:42 -08:00
client_elevated_test.go refactor: Cleanup/simplify testcases in /pkg/cli (#1103) 2023-01-16 21:52:50 -08:00
client_test.go refactor: Cleanup/simplify testcases in /pkg/cli (#1103) 2023-01-16 21:52:50 -08:00
config_cmd.go chore(lint): gci to separate zot from other imports (#870) 2022-10-20 09:39:20 -07:00
config_cmd_test.go chore(lint): gci to separate zot from other imports (#870) 2022-10-20 09:39:20 -07:00
config_reloader.go chore(lint): gci to separate zot from other imports (#870) 2022-10-20 09:39:20 -07:00
config_reloader_test.go chore(lint): gci to separate zot from other imports (#870) 2022-10-20 09:39:20 -07:00
cve_cmd.go fix(cli): do not show signatures and fix tls verification client side (#904) 2022-10-22 23:44:20 -07:00
cve_cmd_test.go refactor(tests): removed globals from digest test, removed some more hardcoded digests (#923) 2022-10-26 19:14:16 +03:00
discover.go fix(cli): do not show signatures and fix tls verification client side (#904) 2022-10-22 23:44:20 -07:00
extensions_test.go fix(config): warn if cve is used with remote storage driver (#1034) 2022-11-30 09:35:06 +02:00
image_cmd.go fix(cli): do not show signatures and fix tls verification client side (#904) 2022-10-22 23:44:20 -07:00
image_cmd_test.go feat(repodb): add pagination for ImageListForDigest and implement FilterTags (#1102) 2023-01-18 00:31:54 +02:00
minimal.go build(tags): remove redundant build tag ui_base (#857) 2022-10-10 15:05:55 +03:00
repo_cmd.go chore(lint): gci to separate zot from other imports (#870) 2022-10-20 09:39:20 -07:00
root.go fix(config): warn if cve is used with remote storage driver (#1034) 2022-11-30 09:35:06 +02:00
root_test.go refactor: Cleanup/simplify testcases in /pkg/cli (#1103) 2023-01-16 21:52:50 -08:00
searcher.go fix: added error message for missing CVEs (#1085) 2023-01-11 15:02:29 -08:00
service.go fix(cli): do not show signatures and fix tls verification client side (#904) 2022-10-22 23:44:20 -07:00
stress_test.go refactor: Cleanup/simplify testcases in /pkg/cli (#1103) 2023-01-16 21:52:50 -08:00