Skip to content

Skip DeleteSnapshot when ProviderSnapshotID is empty#9795

Draft
kaovilai wants to merge 1 commit into
velero-io:mainfrom
kaovilai:fix/9429-skip-empty-provider-snapshot-id
Draft

Skip DeleteSnapshot when ProviderSnapshotID is empty#9795
kaovilai wants to merge 1 commit into
velero-io:mainfrom
kaovilai:fix/9429-skip-empty-provider-snapshot-id

Conversation

@kaovilai

Copy link
Copy Markdown
Member

Skip DeleteSnapshot when ProviderSnapshotID is empty

When CreateSnapshot fails (e.g. quota limit), the snapshot is recorded with an empty ProviderSnapshotID. During backup deletion, velero was calling DeleteSnapshot("") which produces unnecessary 404 API calls.

Skip the DeleteSnapshot call when ProviderSnapshotID is empty and log a warning instead.

Does your change fix a particular issue?

Fixes #9429

Please indicate you've done the following:

Note

Responses generated with Claude

When CreateSnapshot fails (e.g. quota limit), the snapshot is recorded
with an empty ProviderSnapshotID. During backup deletion, velero was
calling DeleteSnapshot("") which produces unnecessary 404 API calls.

Skip the DeleteSnapshot call when ProviderSnapshotID is empty and log
a warning instead.

Fixes velero-io#9429

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
@codecov

codecov Bot commented May 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
pkg/controller/backup_deletion_controller.go 66.66% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

velero doesn't correctly handle an empty ProviderSnapshotID

1 participant