Skip to content

Commit b83b84a

Browse files
committed
topics: add and use operobsgen
report if the NUMAResourcesOperator object exposes the ObservedGeneration in status, so we can consume the value in the e2e tests and have more robust runs. Signed-off-by: Francesco Romani <fromani@redhat.com>
1 parent 05e102d commit b83b84a

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

internal/api/features/_topics.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"nganns",
2222
"metrics",
2323
"nrtcrdanns",
24-
"netpols"
24+
"netpols",
25+
"operobsgen"
2526
]
2627
}

test/e2e/serial/tests/configuration.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
"encoding/json"
2222
"fmt"
2323
"reflect"
24+
"slices"
2425
"sort"
2526
"strconv"
2627
"strings"
@@ -1521,10 +1522,18 @@ func isNROOperAvailableAt(nropStatus *nropv1.NUMAResourcesOperatorStatus, gen in
15211522
if cond.Status != metav1.ConditionTrue {
15221523
return false
15231524
}
1525+
// TODO: until all the version reports ObservedGeneration
1526+
if serialconfig.Config != nil && !slices.Contains(serialconfig.Config.ClusterTopics.Active, "operobsgen") {
1527+
return true
1528+
}
15241529
return cond.ObservedGeneration == gen
15251530
}
15261531

15271532
func isNROOperUpToDate(nrop *nropv1.NUMAResourcesOperator) bool {
1533+
// TODO: until all the version reports ObservedGeneration
1534+
if serialconfig.Config != nil && !slices.Contains(serialconfig.Config.ClusterTopics.Active, "operobsgen") {
1535+
return true
1536+
}
15281537
return isNROOperAvailableAt(&nrop.Status, nrop.Generation)
15291538
}
15301539

0 commit comments

Comments
 (0)