Skip to content

Commit cc8f48a

Browse files
committed
feat: add two node support to featuregate analyzer
added two node topology support for featuregate test analyzer to match and query sippy for two node test history Signed-off-by: ehila <[email protected]>
1 parent 2b09f87 commit cc8f48a

File tree

1 file changed

+54
-6
lines changed

1 file changed

+54
-6
lines changed

tools/codegen/cmd/featuregate-test-analyzer.go

Lines changed: 54 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -368,14 +368,14 @@ var (
368368
Topology: "ha",
369369
NetworkStack: "dual",
370370
},
371+
{
372+
Cloud: "aws",
373+
Architecture: "amd64",
374+
Topology: "single-node",
375+
},
371376

372377
// TODO restore these once we run TechPreview jobs that contain them
373378
//{
374-
// Cloud: "aws",
375-
// Architecture: "amd64",
376-
// Topology: "single-node",
377-
//},
378-
//{
379379
// Cloud: "metal-ipi",
380380
// Architecture: "amd64",
381381
// Topology: "single-node",
@@ -394,6 +394,42 @@ var (
394394
Architecture: "amd64",
395395
Topology: "ha",
396396
},
397+
{
398+
Cloud: "metal",
399+
Architecture: "amd64",
400+
Topology: "two-node-arbiter",
401+
NetworkStack: "ipv4",
402+
},
403+
{
404+
Cloud: "metal",
405+
Architecture: "amd64",
406+
Topology: "two-node-arbiter",
407+
NetworkStack: "ipv6",
408+
},
409+
{
410+
Cloud: "metal",
411+
Architecture: "amd64",
412+
Topology: "two-node-arbiter",
413+
NetworkStack: "dual",
414+
},
415+
{
416+
Cloud: "metal",
417+
Architecture: "amd64",
418+
Topology: "two-node-fencing",
419+
NetworkStack: "ipv4",
420+
},
421+
{
422+
Cloud: "metal",
423+
Architecture: "amd64",
424+
Topology: "two-node-fencing",
425+
NetworkStack: "ipv6",
426+
},
427+
{
428+
Cloud: "metal",
429+
Architecture: "amd64",
430+
Topology: "two-node-fencing",
431+
NetworkStack: "dual",
432+
},
397433
}
398434

399435
nonHypershiftPlatforms = regexp.MustCompile("(?i)nutanix|metal|vsphere|openstack|azure|gcp")
@@ -503,8 +539,9 @@ func filterVariants(featureGate string, variantsList ...[]JobVariant) []JobVaria
503539
for _, variant := range variants {
504540
normalizedCloud := strings.ReplaceAll(strings.ToLower(variant.Cloud), "-ipi", "") // The feature gate probably won't include the install type, but some cloud variants do
505541
normalizedArchitecture := strings.ToLower(variant.Architecture)
542+
normalizedTopology := strings.ToLower(variant.Topology)
506543

507-
if strings.Contains(normalizedFeatureGate, normalizedCloud) || strings.Contains(normalizedFeatureGate, normalizedArchitecture) {
544+
if strings.Contains(normalizedFeatureGate, normalizedCloud) || strings.Contains(normalizedFeatureGate, normalizedArchitecture) || matchTwoNodeFeatureGates(normalizedFeatureGate, normalizedTopology) {
508545
filteredVariants = append(filteredVariants, variant)
509546
}
510547
}
@@ -680,3 +717,14 @@ func listTestResultForVariant(featureGate string, jobVariant JobVariant) (*Testi
680717

681718
return jobVariantResults, nil
682719
}
720+
721+
// Check for Arbiter and DualReplica or Fencing featureGates as these have special topologies
722+
func matchTwoNodeFeatureGates(featureGate string, topology string) bool {
723+
if strings.Contains(featureGate, "arbiter") && strings.Contains(topology, "arbiter") {
724+
return true
725+
}
726+
if (strings.Contains(featureGate, "dualreplica") || strings.Contains(featureGate, "fencing")) && strings.Contains(topology, "fencing") {
727+
return true
728+
}
729+
return false
730+
}

0 commit comments

Comments
 (0)