Delete details snapshot (#3914)

Check for a populated StreamStoreID and fallback to the DetailsID if necessary.

---

#### Does this PR need a docs update or release note?

- [ ]  Yes, it's included
- [ ] 🕐 Yes, but in a later PR
- [x]  No

#### Type of change

- [ ] 🌻 Feature
- [x] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [ ] 🤖 Supportability/Tests
- [ ] 💻 CI/Deployment
- [ ] 🧹 Tech Debt/Cleanup

#### Issue(s)

* closes #3913

#### Test Plan

- [x] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E
This commit is contained in:
ashmrtn 2023-07-26 15:15:37 -07:00 committed by GitHub
parent 0c25c568c1
commit 046a471077
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -616,8 +616,13 @@ func deleteBackup(
}
}
if len(b.DetailsID) > 0 {
if err := kw.DeleteSnapshot(ctx, b.DetailsID); err != nil {
ssid := b.StreamStoreID
if len(ssid) == 0 {
ssid = b.DetailsID
}
if len(ssid) > 0 {
if err := kw.DeleteSnapshot(ctx, ssid); err != nil {
return err
}
}