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

fix: add checkpoint when enqueue scan tasks for scan all #18680

Merged
merged 1 commit into from
Jun 5, 2023

Conversation

chlins
Copy link
Member

@chlins chlins commented May 16, 2023

Fix the scanAll cannot be stopped in case of large number of artifacts, add the checkpoint before submit scan tasks, mark the scanAll stopped flag in the redis.

Fixes: #18044

Thank you for contributing to Harbor!

Comprehensive Summary of your change

Issue being fixed

Fixes #18044

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 requested a review from a team as a code owner May 16, 2023 06:06
@chlins chlins added the release-note/update Update or Fix label May 16, 2023
@codecov
Copy link

codecov bot commented May 16, 2023

Codecov Report

Merging #18680 (f0c6912) into main (9d28d1f) will decrease coverage by 22.56%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##             main   #18680       +/-   ##
===========================================
- Coverage   67.34%   44.78%   -22.56%     
===========================================
  Files         980      235      -745     
  Lines      106829    13067    -93762     
  Branches     2665     2665               
===========================================
- Hits        71943     5852    -66091     
+ Misses      31019     6921    -24098     
+ Partials     3867      294     -3573     
Flag Coverage Δ
unittests 44.78% <ø> (-22.56%) ⬇️

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

see 748 files with indirect coverage changes

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 force-pushed the fix/stop-scanall branch 2 times, most recently from 84b3a7c to 285155a Compare June 2, 2023 00:53
Fix the scanAll cannot be stopped in case of large number of artifacts,
add the checkpoint before submit scan tasks, mark the scanAll stopped
flag in the redis.

Fixes: goharbor#18044

Signed-off-by: chlins <[email protected]>
@chlins chlins force-pushed the fix/stop-scanall branch from 285155a to f0c6912 Compare June 5, 2023 06:24
@chlins chlins merged commit fbeeaa7 into goharbor:main Jun 5, 2023
WilfredAlmeida pushed a commit to WilfredAlmeida/harbor that referenced this pull request Jul 8, 2023
)

Fix the scanAll cannot be stopped in case of large number of artifacts,
add the checkpoint before submit scan tasks, mark the scanAll stopped
flag in the redis.

Fixes: goharbor#18044

Signed-off-by: chlins <[email protected]>
Signed-off-by: Wilfred Almeida <[email protected]>
WilfredAlmeida pushed a commit to WilfredAlmeida/harbor that referenced this pull request Jul 8, 2023
)

Fix the scanAll cannot be stopped in case of large number of artifacts,
add the checkpoint before submit scan tasks, mark the scanAll stopped
flag in the redis.

Fixes: goharbor#18044

Signed-off-by: chlins <[email protected]>
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.

Stop ScanAll not work in case of lots of artifacts.
4 participants