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: clean up scan executions and reports after deleting artifact #18693

Merged
merged 1 commit into from
May 31, 2023

Conversation

chlins
Copy link
Member

@chlins chlins commented May 18, 2023

Cleanup the associated resources(scan executions and scan reports) after deletion of artifact.

Fixes: #18634

Thank you for contributing to Harbor!

Comprehensive Summary of your change

Issue being fixed

Fixes #18634

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.

@codecov
Copy link

codecov bot commented May 18, 2023

Codecov Report

Merging #18693 (33de2de) into main (e19ec96) will decrease coverage by 0.02%.
The diff coverage is 66.66%.

❗ Current head 33de2de differs from pull request most recent head 572774a. Consider uploading reports for the commit 572774a to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #18693      +/-   ##
==========================================
- Coverage   67.36%   67.35%   -0.02%     
==========================================
  Files         980      980              
  Lines      106750   106774      +24     
  Branches     2665     2665              
==========================================
+ Hits        71916    71917       +1     
- Misses      30966    30994      +28     
+ Partials     3868     3863       -5     
Flag Coverage Δ
unittests 67.35% <66.66%> (-0.02%) ⬇️

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

Impacted Files Coverage Δ
src/controller/artifact/controller.go 61.77% <ø> (ø)
src/controller/event/handler/internal/artifact.go 76.33% <66.66%> (-1.60%) ⬇️

... and 11 files with indirect coverage changes

@chlins chlins force-pushed the fix/on-delete-artifact branch 2 times, most recently from c80fa45 to 33de2de Compare May 31, 2023 05:52
Cleanup the associated resources(scan executions and scan reports) after
deletion of artifact.

Fixes: goharbor#18634

Signed-off-by: chlins <chenyuzh@vmware.com>
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 a98711c into goharbor:main May 31, 2023
WilfredAlmeida pushed a commit to WilfredAlmeida/harbor that referenced this pull request Jul 8, 2023
…harbor#18693)

Cleanup the associated resources(scan executions and scan reports) after
deletion of artifact.

Fixes: goharbor#18634

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
…harbor#18693)

Cleanup the associated resources(scan executions and scan reports) after
deletion of artifact.

Fixes: goharbor#18634

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.

The exec/task/scan report not be cleaned after artifact deleted
5 participants