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

refactor(metadb): change backend serialization to protobuf #1842

Merged
merged 1 commit into from
Oct 30, 2023

Conversation

laurentiuNiculae
Copy link
Contributor

What type of PR is this?

Which issue does this PR fix:

What does this PR do / Why do we need it:

If an issue # is not available please add repro steps and logs showing the issue:

Testing done on this change:

Automation added to e2e:

Will this break upgrades or downgrades?

Does this PR introduce any user-facing change?:


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@laurentiuNiculae laurentiuNiculae changed the title Protobuff metadb [WIP]: Protobuff metadb Sep 21, 2023
@laurentiuNiculae laurentiuNiculae force-pushed the protobuff-metadb branch 4 times, most recently from 52b5b32 to 8761abb Compare October 6, 2023 14:08
@laurentiuNiculae laurentiuNiculae marked this pull request as ready for review October 6, 2023 14:08
@laurentiuNiculae laurentiuNiculae force-pushed the protobuff-metadb branch 2 times, most recently from 6e604de to 97b37b8 Compare October 6, 2023 15:57
Copy link
Contributor

@andaaron andaaron left a comment

Choose a reason for hiding this comment

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

My partial review.

Makefile Show resolved Hide resolved
errors/errors.go Outdated Show resolved Hide resolved
pkg/api/controller.go Outdated Show resolved Hide resolved
pkg/common/oci.go Outdated Show resolved Hide resolved
@laurentiuNiculae laurentiuNiculae force-pushed the protobuff-metadb branch 6 times, most recently from 414ce16 to 058f79a Compare October 13, 2023 10:52
pkg/meta/types/types.go Outdated Show resolved Hide resolved
pkg/meta/types/types.go Outdated Show resolved Hide resolved
pkg/meta/types/types.go Outdated Show resolved Hide resolved
pkg/meta/types/types.go Outdated Show resolved Hide resolved
pkg/meta/types/types.go Outdated Show resolved Hide resolved
pkg/meta/boltdb/proto_boltdb.go Outdated Show resolved Hide resolved
pkg/meta/types/types.go Outdated Show resolved Hide resolved
pkg/meta/types/types.go Outdated Show resolved Hide resolved
pkg/meta/types/types.go Outdated Show resolved Hide resolved
pkg/meta/types/types.go Outdated Show resolved Hide resolved
@laurentiuNiculae laurentiuNiculae force-pushed the protobuff-metadb branch 2 times, most recently from cb7fe4d to e199e83 Compare October 13, 2023 12:21
@codecov
Copy link

codecov bot commented Oct 13, 2023

Codecov Report

Merging #1842 (bf8e5a5) into main (f34af3c) will decrease coverage by 2.06%.
The diff coverage is 85.52%.

@@            Coverage Diff             @@
##             main    #1842      +/-   ##
==========================================
- Coverage   91.93%   89.88%   -2.06%     
==========================================
  Files         155      158       +3     
  Lines       26807    26978     +171     
==========================================
- Hits        24646    24249     -397     
- Misses       1600     2009     +409     
- Partials      561      720     +159     
Files Coverage Δ
errors/errors.go 100.00% <ø> (ø)
pkg/api/routes.go 94.50% <100.00%> (ø)
pkg/common/common.go 95.38% <100.00%> (+0.14%) ⬆️
pkg/extensions/imagetrust/image_trust.go 90.84% <100.00%> (-0.24%) ⬇️
pkg/extensions/imagetrust/image_trust_disabled.go 100.00% <ø> (ø)
pkg/extensions/search/convert/oci.go 94.00% <ø> (-0.83%) ⬇️
pkg/extensions/search/cve/scan.go 100.00% <100.00%> (ø)
pkg/extensions/sync/references/cosign.go 97.03% <100.00%> (+2.55%) ⬆️
pkg/extensions/sync/references/oci.go 91.66% <100.00%> (+1.84%) ⬆️
pkg/extensions/sync/references/referrers_tag.go 89.52% <100.00%> (-3.58%) ⬇️
... and 22 more

... and 3 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

pkg/api/controller_test.go Outdated Show resolved Hide resolved
pkg/extensions/imagetrust/image_trust.go Outdated Show resolved Hide resolved
pkg/extensions/imagetrust/image_trust_disabled.go Outdated Show resolved Hide resolved
pkg/test/oci-utils/repo.go Outdated Show resolved Hide resolved
pkg/test/mocks/repo_db_mock.go Outdated Show resolved Hide resolved
pkg/extensions/search/resolver.go Outdated Show resolved Hide resolved
pkg/extensions/search/resolver.go Outdated Show resolved Hide resolved
pkg/extensions/search/resolver.go Outdated Show resolved Hide resolved
pkg/extensions/search/convert/metadb.go Show resolved Hide resolved
pkg/meta/dynamodb/dynamodb.go Outdated Show resolved Hide resolved
pkg/meta/proto/meta.proto Outdated Show resolved Hide resolved
@laurentiuNiculae laurentiuNiculae force-pushed the protobuff-metadb branch 3 times, most recently from 3cf330b to 7f28bee Compare October 17, 2023 12:02
@laurentiuNiculae laurentiuNiculae force-pushed the protobuff-metadb branch 6 times, most recently from 50dccdf to 209da66 Compare October 24, 2023 15:23
Makefile Show resolved Hide resolved
Makefile Show resolved Hide resolved
.github/workflows/golangci-lint.yaml Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
pkg/meta/proto/config.proto Outdated Show resolved Hide resolved
pkg/meta/proto_go/config.pb.go Outdated Show resolved Hide resolved
pkg/meta/proto/config.proto Outdated Show resolved Hide resolved
pkg/test/deprecated/deprecated.go Show resolved Hide resolved
@laurentiuNiculae laurentiuNiculae force-pushed the protobuff-metadb branch 4 times, most recently from e3ca46b to 771a996 Compare October 26, 2023 15:15
.github/workflows/golangci-lint.yaml Outdated Show resolved Hide resolved
.gitignore Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
codecov.yml Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
@laurentiuNiculae laurentiuNiculae force-pushed the protobuff-metadb branch 3 times, most recently from b78db62 to 5801e14 Compare October 30, 2023 10:11
errors/errors.go Outdated Show resolved Hide resolved
Use protocol buffers and update the metadb interface to better suit our search needs

Signed-off-by: Ramkumar Chinchani <[email protected]>
Signed-off-by: Laurentiu Niculae <[email protected]>
Copy link
Contributor

@rchincha rchincha left a comment

Choose a reason for hiding this comment

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

lgtm

@rchincha rchincha merged commit 56ad9e6 into project-zot:main Oct 30, 2023
32 of 34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Refactor][Investigate]: MetaDB: Use protobuf for data encoding instead of json
4 participants