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

perf: optimize the trigger retention API #19533

Merged
merged 1 commit into from
Nov 9, 2023

Conversation

chlins
Copy link
Member

@chlins chlins commented Nov 6, 2023

Enhance the API for triggering retention by optimizing it from synchronous to asynchronous to solve the problem of slow response in the case of a large number of tasks.

Thank you for contributing to Harbor!

Comprehensive Summary of your change

Issue being fixed

Fixes #18504

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 area/tag-retention Issues relating to the tag retention policies features release-note/enhancement Label to mark PR to be added under release notes as enhancement labels Nov 6, 2023
@chlins chlins requested a review from a team as a code owner November 6, 2023 02:08
@chlins chlins force-pushed the enhance/trigger-retention-api branch from 27f550f to e3cc094 Compare November 6, 2023 02:08
Copy link

codecov bot commented Nov 6, 2023

Codecov Report

Merging #19533 (9c9f440) into main (b7116ff) will increase coverage by 0.02%.
The diff coverage is 41.17%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #19533      +/-   ##
==========================================
+ Coverage   67.53%   67.55%   +0.02%     
==========================================
  Files         990      990              
  Lines      108998   109021      +23     
  Branches     2719     2719              
==========================================
+ Hits        73612    73653      +41     
+ Misses      31424    31402      -22     
- Partials     3962     3966       +4     
Flag Coverage Δ
unittests 67.55% <41.17%> (+0.02%) ⬆️

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

Files Coverage Δ
src/controller/retention/controller.go 47.01% <41.17%> (+0.45%) ⬆️

... and 8 files with indirect coverage changes

@chlins chlins force-pushed the enhance/trigger-retention-api branch 2 times, most recently from df85ca5 to f5dbbe2 Compare November 9, 2023 03:30
@chlins chlins enabled auto-merge (squash) November 9, 2023 03:30
@chlins chlins force-pushed the enhance/trigger-retention-api branch from f5dbbe2 to 0ad3a8d Compare November 9, 2023 05:56
Enhance the API for triggering retention by optimizing it from synchronous to asynchronous to solve the problem of slow response in the case of a large number of tasks.

Signed-off-by: chlins <[email protected]>
@chlins chlins force-pushed the enhance/trigger-retention-api branch from 0ad3a8d to 9c9f440 Compare November 9, 2023 07:04
@chlins chlins merged commit f6d5bf2 into goharbor:main Nov 9, 2023
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/tag-retention Issues relating to the tag retention policies features release-note/enhancement Label to mark PR to be added under release notes as enhancement target/2.10.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Trigger tag retention API should be non-blocking
5 participants