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

feat(project): introduce cache layer for project_metadata (#16891) #16892

Merged
merged 1 commit into from May 27, 2022

Conversation

chlins
Copy link
Member

@chlins chlins commented May 23, 2022

Implement cache layer for project_metadata and migrate metadata.Mgr to
pkg.ProjectMetaMgr.

Signed-off-by: chlins chenyuzh@vmware.com

Thank you for contributing to Harbor!

Comprehensive Summary of your change

Issue being fixed

Fixes #16891

Please indicate you've done the following:

  • Well Written Title and Summary of the PR
  • Label the PR as needed. "release-note/ignore-for-release, release-note/new-feature, release-note/update, release-note/enhancement, release-note/community, release-note/breaking-change, release-note/docs, release-note/infra, release-note/deprecation"
  • Accepted the DCO. Commits without the DCO will delay acceptance.
  • Made sure tests are passing and test coverage is added if needed.
  • Considered the docs impact and opened a new docs issue or PR with docs changes if needed in website repository.

…6891)

Implement cache layer for project_metadata and migrate metadata.Mgr to
pkg.ProjectMetaMgr.

Signed-off-by: chlins <chenyuzh@vmware.com>
@codecov
Copy link

codecov bot commented May 23, 2022

Codecov Report

Merging #16892 (f16cc4b) into main (5a4f6c6) will decrease coverage by 0.02%.
The diff coverage is 49.23%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #16892      +/-   ##
==========================================
- Coverage   67.22%   67.19%   -0.03%     
==========================================
  Files         966      967       +1     
  Lines       80133    80193      +60     
  Branches     2548     2548              
==========================================
+ Hits        53870    53888      +18     
- Misses      22592    22622      +30     
- Partials     3671     3683      +12     
Flag Coverage Δ
unittests 67.19% <49.23%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/pkg/cached/manager.go 100.00% <ø> (ø)
src/pkg/project/metadata/manager.go 3.57% <ø> (ø)
src/server/v2.0/handler/project.go 5.93% <0.00%> (ø)
src/server/v2.0/handler/retention.go 0.00% <0.00%> (ø)
src/pkg/cached/project_metadata/redis/manager.go 42.59% <42.59%> (ø)
src/controller/project/controller.go 34.45% <100.00%> (ø)
src/controller/project/metadata/controller.go 33.33% <100.00%> (ø)
src/controller/scanner/base_controller.go 37.50% <100.00%> (ø)
src/pkg/factory.go 100.00% <100.00%> (ø)
src/lib/cache/util.go 73.68% <0.00%> (-15.79%) ⬇️
... and 5 more

Copy link
Contributor

@wy65701436 wy65701436 left a comment

Choose a reason for hiding this comment

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

lgtm

@chlins chlins merged commit 136767d into goharbor:main May 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cache layer for project_metadata
3 participants