Skip to content

Commit

Permalink
fix issue 6575
Browse files Browse the repository at this point in the history
Signed-off-by: Lyndon-Li <[email protected]>
  • Loading branch information
Lyndon-Li committed Aug 2, 2023
1 parent 7135f16 commit 3648aab
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelogs/unreleased/6587-Lyndon-Li
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix issue 6575, flush the repo after delete the snapshot, otherwise, the changes(deleting repo snapshot) cannot be committed to the repo.
7 changes: 6 additions & 1 deletion pkg/repository/provider/unified_repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const (
repoOpDescMaintain = "repo maintenance"
repoOpDescForget = "forget"

repoConnectDesc = "unfied repo"
repoConnectDesc = "unified repo"
)

// NewUnifiedRepoProvider creates the service provider for Unified Repo
Expand Down Expand Up @@ -302,6 +302,11 @@ func (urp *unifiedRepoProvider) Forget(ctx context.Context, snapshotID string, p
return errors.Wrap(err, "error to delete manifest")
}

err = bkRepo.Flush(ctx)
if err != nil {
return errors.Wrap(err, "error to flush repo")
}

log.Debug("Forget snapshot complete")

return nil
Expand Down

0 comments on commit 3648aab

Please sign in to comment.