fix: Adding fix for inconsistent behavior when deleting retention policy.
Issue being fixed
Fixes #(https://github.com/goharbor/harbor/issues/21783)
Adding implementation of deleting retention policy value from the project table that's referenced by retention policy ref field
Please indicate you've done the following:
- [x] Well Written Title and Summary of the PR
- [x] 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"
- [x] Accepted the DCO. Commits without the DCO will delay acceptance.
- [x] Made sure tests are passing and test coverage is added if needed.
- [x] Considered the docs impact and opened a new docs issue or PR with docs changes if needed in website repository.
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 46.57%. Comparing base (c8c11b4) to head (bfb0aff).
:warning: Report is 568 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #22014 +/- ##
==========================================
+ Coverage 45.36% 46.57% +1.21%
==========================================
Files 244 253 +9
Lines 13333 14238 +905
Branches 2719 2925 +206
==========================================
+ Hits 6049 6632 +583
- Misses 6983 7252 +269
- Partials 301 354 +53
| Flag | Coverage Δ | |
|---|---|---|
| unittests | 46.57% <ø> (+1.21%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more. see 178 files with indirect coverage changes
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
@miledxz DCO, is required
@miledxz DCO, is required
Hi @Vad1mo thanks for the fast feedback, I have added DCO, now I have to fix test here, https://github.com/goharbor/harbor/actions/runs/15144959414/job/42578306914?pr=22014#step:7:2557
but to make sure this test passes locally I have to run migrations and use Postgres database, do you know maybe how could I setup that properly ? I have tried locally but could not run migrations for some reason, I think I'm missing something
gentle ping for @bupd
Thanks for the help in advance !
@miledxz Instead of creating a new function named delete retentionid we should just use the update function in projectMetadat dao and remove the retentionID from the project.
This PR is being marked stale due to a period of inactivty. If this PR is still relevant, please comment or remove the stale label. Otherwise, this PR will close in 30 days.
/label never-stale