Skip to content

fix(retention): use resolved retention ID when deleting rules - #1081

Open
yash-pakhale-07 wants to merge 1 commit into
goharbor:mainfrom
yash-pakhale-07:fix/tag-retention-delete-project-id
Open

fix(retention): use resolved retention ID when deleting rules#1081
yash-pakhale-07 wants to merge 1 commit into
goharbor:mainfrom
yash-pakhale-07:fix/tag-retention-delete-project-id

Conversation

@yash-pakhale-07

@yash-pakhale-07 yash-pakhale-07 commented Aug 12, 2026

Copy link
Copy Markdown

Description

This PR fixes the tag retention deletion flow when a project is specified using --project-id.

The CLI already resolves the retention policy ID, but the resolved ID was discarded and DeleteRetention() was called with the project name. The API layer then performed another project-name-based lookup.

This change passes the resolved retention ID directly through the deletion flow.

Fixes #1080

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Documentation update
  • Chore / maintenance

Changes

  • Pass the resolved retentionID to api.DeleteRetention().
  • Update DeleteRetention() to accept the retention ID directly.
  • Remove the redundant GetRetentionId() lookup from the API deletion path.
  • Keep project-name and project-ID deletion flows consistent.

Signed-off-by: yash-pakhale-07 <yashpakhale7@gmail.com>
@yash-pakhale-07
yash-pakhale-07 force-pushed the fix/tag-retention-delete-project-id branch from 35eb05e to 30ee067 Compare August 12, 2026 04:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug]: tag retention delete fails with --project-id

1 participant