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: skip to delete scan reports if the digest still referenced #19110

Merged
merged 1 commit into from
Aug 7, 2023

Conversation

chlins
Copy link
Member

@chlins chlins commented Aug 7, 2023

Avoid to delete the scan reports in case the artifact deleted but still referenced by the other artifacts.

Thank you for contributing to Harbor!

Comprehensive Summary of your change

Issue being fixed

Fixes #19105

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 Aug 7, 2023

Codecov Report

Merging #19110 (9d84836) into main (403b616) will decrease coverage by 22.56%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##             main   #19110       +/-   ##
===========================================
- Coverage   67.40%   44.84%   -22.56%     
===========================================
  Files         992      244      -748     
  Lines      108770    13405    -95365     
  Branches     2751     2751               
===========================================
- Hits        73315     6012    -67303     
+ Misses      31517     7087    -24430     
+ Partials     3938      306     -3632     
Flag Coverage Δ
unittests 44.84% <ø> (-22.56%) ⬇️

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

see 752 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

…her artifacts

Avoid to delete the scan reports in case the artifact deleted but still
referenced by the other artifacts.

Signed-off-by: chlins <chenyuzh@vmware.com>
@chlins chlins force-pushed the fix/delete-scan-report branch from 05dd208 to 9d84836 Compare August 7, 2023 04:07
@chlins chlins merged commit a036e4a into goharbor:main Aug 7, 2023
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.

Avoid delete scan_report when there is an artifact associate with it
5 participants