clean up project metadata for tag retention policy after deletion (#22174)
Build Package Workflow / BUILD_PACKAGE (push) Has been cancelled Details
Code scanning - action / CodeQL-Build (push) Has been cancelled Details

Signed-off-by: my036811 <miner.yang@broadcom.com>
This commit is contained in:
miner 2025-07-18 18:52:33 +08:00 committed by GitHub
parent ebdfb547ba
commit 0f67947c87
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -260,6 +260,10 @@ func (r *retentionAPI) DeleteRetention(ctx context.Context, params operation.Del
if err = r.retentionCtl.DeleteRetention(ctx, params.ID); err != nil {
return r.SendError(ctx, err)
}
// delete retention data in project_metadata
if err := r.proMetaMgr.Delete(ctx, p.Scope.Reference, "retention_id"); err != nil {
return r.SendError(ctx, err)
}
return operation.NewDeleteRetentionOK()
}