0
Fork 0
mirror of https://github.com/project-zot/zot.git synced 2024-12-30 22:34:13 -05:00
zot/pkg/cli
Andrei Aaron 43160dcc43 Update to graphql 1.17.13
We encountered some problems with using the existing folder structure,
but it looks like running the tooling with the latest versions works after
we regenerated the project using 'gql init' and refactoring to separate
the login previously in resolvers.go.

- the autogenerated code is now under the gql_generated folder
- the file resolvers.go now contains only the code which is not
rewritten by the gqlgen framework
- the file schema.resolvers.go is rewritten when gqlgen runs,
and we'll only keep there the actual resolvers matching query names
Changes we observed to schema.resolvers.go when gqlgen runs include
reordering methods, and renaming function parameters to match the
names used in schema.graphql
- we now have a gqlgen.yaml config file which governs the behavior of
gqlgen (can be tweaked to restructure the folder structure of the
generated code in the future)

Looks like the new graphql server has better validation
1 Returns 422 instead of 200 for missing query string - had to update tests
2 Correctly uncovered an error in a test for a bad `%` in query string.

As as result of 2, a `masked` bug was found in the way we check if images are
signed with Notary, the signatures were reasched for with the media type
of the image manifest itself instead of the media type for notation.
Fixed this bug, and improved error messages.
This bug would have also been reproducible with main branch if the bad `%`
in the test would have fixed.

Updated the linter to ignore some issues with the code which is
always rewritten when running:
`go run github.com/99designs/gqlgen@v0.17.13 generate`

Add a workflow to test gqlgen works and has no uncommitted changes

Signed-off-by: Andrei Aaron <andaaron@cisco.com>
2022-07-18 12:55:40 -07:00
..
cli.go Manage builds with different combinations of extensions 2022-06-30 09:53:52 -07:00
client.go Manage builds with different combinations of extensions 2022-06-30 09:53:52 -07:00
client_elevated_test.go Manage builds with different combinations of extensions 2022-06-30 09:53:52 -07:00
client_test.go Manage builds with different combinations of extensions 2022-06-30 09:53:52 -07:00
config_cmd.go Manage builds with different combinations of extensions 2022-06-30 09:53:52 -07:00
config_cmd_test.go Manage builds with different combinations of extensions 2022-06-30 09:53:52 -07:00
config_reloader.go lint: Move out config reloader context from controller struct 2022-03-24 10:50:01 -07:00
config_reloader_test.go sync: support reloading sync config when the config file changes 2022-03-18 11:24:11 -07:00
cve_cmd.go Manage builds with different combinations of extensions 2022-06-30 09:53:52 -07:00
cve_cmd_test.go Update to graphql 1.17.13 2022-07-18 12:55:40 -07:00
extensions_test.go Fix data race on trivydb download in tests. 2022-07-14 09:31:15 -07:00
image_cmd.go Manage builds with different combinations of extensions 2022-06-30 09:53:52 -07:00
image_cmd_test.go Manage builds with different combinations of extensions 2022-06-30 09:53:52 -07:00
minimal.go Manage builds with different combinations of extensions 2022-06-30 09:53:52 -07:00
repo_cmd.go Manage builds with different combinations of extensions 2022-06-30 09:53:52 -07:00
root.go ext: use distribution spec route prefix for extension api 2022-05-22 16:35:16 -07:00
root_test.go Report unknown keys when parsing configuration files 2022-05-16 14:13:31 -07:00
searcher.go Manage builds with different combinations of extensions 2022-06-30 09:53:52 -07:00
service.go Manage builds with different combinations of extensions 2022-06-30 09:53:52 -07:00
stress_test.go Leave zot repositories in a consistent state after zot hits fd limit closes #359 2022-03-31 13:25:15 -07:00