Mark snapshots missing backup as assist bases (#3618)
Loosen restrictions slightly by returning snapshots that are missing their bakcup or details models as assist bases that can be used by kopia assisted incrementals. --- #### 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) * #3525 #### Test Plan - [ ] 💪 Manual - [x] ⚡ Unit test - [ ] 💚 E2E
This commit is contained in:
parent
8996d3edab
commit
d415be6844
@ -192,6 +192,8 @@ func (b *baseFinder) findBasesInSet(
|
||||
Manifest: man,
|
||||
Reasons: []Reason{reason},
|
||||
})
|
||||
|
||||
logger.Ctx(ictx).Info("found incomplete backup")
|
||||
}
|
||||
|
||||
continue
|
||||
@ -203,6 +205,18 @@ func (b *baseFinder) findBasesInSet(
|
||||
// Safe to continue here as we'll just end up attempting to use an older
|
||||
// backup as the base.
|
||||
logger.CtxErr(ictx, err).Debug("searching for base backup")
|
||||
|
||||
if !foundIncomplete {
|
||||
foundIncomplete = true
|
||||
|
||||
kopiaAssistSnaps = append(kopiaAssistSnaps, ManifestEntry{
|
||||
Manifest: man,
|
||||
Reasons: []Reason{reason},
|
||||
})
|
||||
|
||||
logger.Ctx(ictx).Info("found incomplete backup")
|
||||
}
|
||||
|
||||
continue
|
||||
}
|
||||
|
||||
@ -216,6 +230,19 @@ func (b *baseFinder) findBasesInSet(
|
||||
"empty backup stream store ID",
|
||||
"search_backup_id", bup.ID)
|
||||
|
||||
if !foundIncomplete {
|
||||
foundIncomplete = true
|
||||
|
||||
kopiaAssistSnaps = append(kopiaAssistSnaps, ManifestEntry{
|
||||
Manifest: man,
|
||||
Reasons: []Reason{reason},
|
||||
})
|
||||
|
||||
logger.Ctx(ictx).Infow(
|
||||
"found incomplete backup",
|
||||
"search_backup_id", bup.ID)
|
||||
}
|
||||
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
@ -436,6 +436,7 @@ func (suite *BaseFinderUnitSuite) TestGetBases() {
|
||||
1: testUser1Mail,
|
||||
},
|
||||
expectedAssistManifestReasons: map[int][]Reason{
|
||||
0: testUser1Mail,
|
||||
1: testUser1Mail,
|
||||
},
|
||||
backupData: []backupInfo{
|
||||
@ -470,6 +471,7 @@ func (suite *BaseFinderUnitSuite) TestGetBases() {
|
||||
1: testUser1Mail,
|
||||
},
|
||||
expectedAssistManifestReasons: map[int][]Reason{
|
||||
0: testUser1Mail,
|
||||
1: testUser1Mail,
|
||||
},
|
||||
backupData: []backupInfo{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user