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: migrate the redis command keys to scan #18825

Merged
merged 1 commit into from
Jun 29, 2023

Conversation

chlins
Copy link
Member

@chlins chlins commented Jun 17, 2023

Refine the cache interface, migrate the Keys to Scan, change the redis underlying keys command to scan.

Thank you for contributing to Harbor!

Comprehensive Summary of your change

Issue being fixed

Fixes #(issue)

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.

@chlins chlins added the release-note/update Update or Fix label Jun 17, 2023
@chlins chlins requested a review from a team as a code owner June 17, 2023 12:57
@codecov
Copy link

codecov bot commented Jun 17, 2023

Codecov Report

Merging #18825 (d091ea1) into main (d36ca80) will increase coverage by 0.02%.
The diff coverage is 76.92%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #18825      +/-   ##
==========================================
+ Coverage   67.38%   67.40%   +0.02%     
==========================================
  Files         981      981              
  Lines      106901   106925      +24     
  Branches     2678     2678              
==========================================
+ Hits        72030    72078      +48     
+ Misses      30998    30980      -18     
+ Partials     3873     3867       -6     
Flag Coverage Δ
unittests 67.40% <76.92%> (+0.02%) ⬆️

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

Impacted Files Coverage Δ
src/lib/cache/cache.go 92.68% <ø> (-7.32%) ⬇️
src/pkg/cached/project_metadata/redis/manager.go 46.37% <0.00%> (ø)
src/pkg/cached/base_manager.go 40.00% <36.36%> (-2.86%) ⬇️
src/lib/cache/redis/redis.go 69.91% <77.77%> (+0.54%) ⬆️
src/lib/cache/memory/memory.go 89.65% <100.00%> (+6.09%) ⬆️
src/pkg/task/dao/execution.go 61.35% <100.00%> (+0.53%) ⬆️

... and 10 files with indirect coverage changes

@chlins chlins force-pushed the refactor/filter-keys-from-cache branch 10 times, most recently from 868b3ac to 38ce645 Compare June 20, 2023 05:25
src/lib/cache/memory/memory.go Show resolved Hide resolved
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

Refine the cache interface, migrate the Keys to Scan, change the redis
underlying keys command to scan.

Signed-off-by: chlins <chenyuzh@vmware.com>
@chlins chlins force-pushed the refactor/filter-keys-from-cache branch from 38ce645 to d091ea1 Compare June 29, 2023 02:12
@chlins chlins merged commit 02a1c41 into goharbor:main Jun 29, 2023
WilfredAlmeida pushed a commit to WilfredAlmeida/harbor that referenced this pull request Jul 8, 2023
Refine the cache interface, migrate the Keys to Scan, change the redis
underlying keys command to scan.

Signed-off-by: chlins <chenyuzh@vmware.com>
Signed-off-by: Wilfred Almeida <60785452+WilfredAlmeida@users.noreply.github.com>
WilfredAlmeida pushed a commit to WilfredAlmeida/harbor that referenced this pull request Jul 8, 2023
Refine the cache interface, migrate the Keys to Scan, change the redis
underlying keys command to scan.

Signed-off-by: chlins <chenyuzh@vmware.com>
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.

5 participants