Skip to content

Commit a8c8d04

Browse files
committed
Add tracing-uiplugin Component for Distributed Tracing E2E Tests
Assisted by Claude Code
1 parent af8651e commit a8c8d04

File tree

5 files changed

+82
-1
lines changed

5 files changed

+82
-1
lines changed

config/openshift-eng.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ includeSuites:
2424
- Gitops-lp-interop
2525
- ACS-lp-interop
2626
- OADP-lp-interop
27-
- COO-lp-interop
27+
- tracing-uiplugin
2828
excludeSuites: []
2929
excludeTests:
3030
- "Build image%"
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
reviewers:
2+
- IshwarKanse
3+
approvers:
4+
- IshwarKanse
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package tracinguiplugin
2+
3+
import (
4+
v1 "github.com/openshift-eng/ci-test-mapping/pkg/api/types/v1"
5+
"github.com/openshift-eng/ci-test-mapping/pkg/util"
6+
)
7+
8+
func identifyCapabilities(test *v1.TestInfo) []string {
9+
capabilities := util.DefaultCapabilities(test)
10+
11+
return capabilities
12+
}
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
package tracinguiplugin
2+
3+
import (
4+
v1 "github.com/openshift-eng/ci-test-mapping/pkg/api/types/v1"
5+
"github.com/openshift-eng/ci-test-mapping/pkg/config"
6+
)
7+
8+
type Component struct {
9+
*config.Component
10+
}
11+
12+
var ClusterObservabilityOperatorComponent = Component{
13+
Component: &config.Component{
14+
Name: "tracing-uiplugin",
15+
Operators: []string{"cluster-observability-operator"},
16+
DefaultJiraProject: "COO",
17+
DefaultJiraComponent: "tracing-uiplugin",
18+
Matchers: []config.ComponentMatcher{
19+
{
20+
Suite: "tracing-uiplugin",
21+
},
22+
},
23+
},
24+
}
25+
26+
func (c *Component) IdentifyTest(test *v1.TestInfo) (*v1.TestOwnership, error) {
27+
if matcher := c.FindMatch(test); matcher != nil {
28+
jira := matcher.JiraComponent
29+
if jira == "" {
30+
jira = c.DefaultJiraComponent
31+
}
32+
return &v1.TestOwnership{
33+
Name: test.Name,
34+
Component: c.Name,
35+
JIRAComponent: jira,
36+
Priority: matcher.Priority,
37+
Capabilities: append(matcher.Capabilities, identifyCapabilities(test)...),
38+
}, nil
39+
}
40+
41+
return nil, nil
42+
}
43+
44+
func (c *Component) StableID(test *v1.TestInfo) string {
45+
// Look up the stable name for our test in our renamed tests map.
46+
if stableName, ok := c.TestRenames[test.Name]; ok {
47+
return stableName
48+
}
49+
return test.Name
50+
}
51+
52+
func (c *Component) JiraComponents() (components []string) {
53+
components = []string{c.DefaultJiraComponent}
54+
for _, m := range c.Matchers {
55+
components = append(components, m.JiraComponent)
56+
}
57+
58+
return components
59+
}
60+
61+
func (c *Component) ListNamespaces() []string {
62+
return c.Namespaces
63+
}

pkg/registry/registry.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ import (
3737
cloudnativeeventshardwareeventproxy "github.com/openshift-eng/ci-test-mapping/pkg/components/cloudnativeevents/hardwareeventproxy"
3838
"github.com/openshift-eng/ci-test-mapping/pkg/components/clusterautoscaler"
3939
"github.com/openshift-eng/ci-test-mapping/pkg/components/clusterloader"
40+
tracinguiplugin "github.com/openshift-eng/ci-test-mapping/pkg/components/clusterobservabilityoperator/tracinguiplugin"
4041
"github.com/openshift-eng/ci-test-mapping/pkg/components/clusterresourceoverrideadmissionoperator"
4142
"github.com/openshift-eng/ci-test-mapping/pkg/components/clusterversionoperator"
4243
"github.com/openshift-eng/ci-test-mapping/pkg/components/cnfcerttnf"
@@ -267,6 +268,7 @@ func NewComponentRegistry() *Registry {
267268
r.Register("Cloud Native Events / Hardware Event Proxy", &cloudnativeeventshardwareeventproxy.HardwareEventProxyComponent)
268269
r.Register("Cluster Autoscaler", &clusterautoscaler.ClusterAutoscalerComponent)
269270
r.Register("Cluster Loader", &clusterloader.ClusterLoaderComponent)
271+
r.Register("tracing-uiplugin", &tracinguiplugin.ClusterObservabilityOperatorComponent)
270272
r.Register("Cluster Resource Override Admission Operator", &clusterresourceoverrideadmissionoperator.ClusterResourceOverrideAdmissionOperatorComponent)
271273
r.Register("Cluster Version Operator", &clusterversionoperator.ClusterVersionOperatorComponent)
272274
r.Register("Console Metal3 Plugin", &consolemetal3plugin.ConsoleMetal3PluginComponent)

0 commit comments

Comments
 (0)