BUG: Inconsistent behavior in Harbor after deleting a retention policy.
Description
When deleting a retention policy using harbor-cli, the retention ID remains associated with the project metadata even after the policy is deleted. This leads to inconsistent behavior from the Harbor API when handling projects with deleted retention policies.
Steps to Reproduce
- Create a project
asdfghj using harbor-cli. (used the API: createProject)
- Add a tag retention rule to the project. (used the API: createRetention)
- Delete the retention policy using
harbor-cli. (used the API: deleteRetention)
- Fetch project details using the Harbor API. (used the API: getProject)
Expected Behavior
- The retention ID should be removed from the project metadata after the retention policy is deleted.
Actual Behavior
- The API response for fetching project details still includes the retention ID of the deleted policy.
- This causes errors when handling projects with deleted retention policies as the retention ID references a non-existent policy.
Possible Cause
- The retention policy ID is not being properly disassociated from the project metadata after deletion.
BUG: Inconsistent behavior in Harbor after deleting a retention policy.
Description
When deleting a retention policy using
harbor-cli, the retention ID remains associated with the project metadata even after the policy is deleted. This leads to inconsistent behavior from the Harbor API when handling projects with deleted retention policies.Steps to Reproduce
asdfghjusingharbor-cli. (used the API: createProject)harbor-cli. (used the API: deleteRetention)Expected Behavior
Actual Behavior
Possible Cause