ilm: Expect objects with only free versions when scanning (#21112)

This commit is contained in:
Krishnan Parthasarathi
2025-04-08 08:41:24 -07:00
committed by GitHub
parent 0bd8f06b62
commit d0cada583f
4 changed files with 18 additions and 0 deletions

View File

@@ -146,6 +146,9 @@ loop:
// Eval will return a lifecycle event for each object in objs
func (e *Evaluator) Eval(objs []ObjectOpts) ([]Event, error) {
if len(objs) == 0 {
return nil, nil
}
if len(objs) != objs[0].NumVersions {
return nil, fmt.Errorf("number of versions mismatch, expected %d, got %d", objs[0].NumVersions, len(objs))
}