-
Notifications
You must be signed in to change notification settings - Fork 46
Add tracing-uiplugin component #541
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
IshwarKanse
wants to merge
1
commit into
openshift-eng:main
Choose a base branch
from
IshwarKanse:coo
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
pkg/components/clusterobservabilityoperator/tracinguiplugin/OWNERS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| reviewers: | ||
| - IshwarKanse | ||
| approvers: | ||
| - IshwarKanse |
15 changes: 15 additions & 0 deletions
15
pkg/components/clusterobservabilityoperator/tracinguiplugin/capabilities.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| package tracinguiplugin | ||
|
|
||
| import ( | ||
| v1 "github.com/openshift-eng/ci-test-mapping/pkg/api/types/v1" | ||
| "github.com/openshift-eng/ci-test-mapping/pkg/util" | ||
| ) | ||
|
|
||
| func identifyCapabilities(test *v1.TestInfo) []string { | ||
| capabilities := util.DefaultCapabilities(test) | ||
|
|
||
| // Extract [Capability:XXX] tags from test name | ||
| capabilities = append(capabilities, util.ExtractTestField(test.Name, "Capability")...) | ||
|
|
||
| return capabilities | ||
| } |
63 changes: 63 additions & 0 deletions
63
pkg/components/clusterobservabilityoperator/tracinguiplugin/component.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| package tracinguiplugin | ||
|
|
||
| import ( | ||
| v1 "github.com/openshift-eng/ci-test-mapping/pkg/api/types/v1" | ||
| "github.com/openshift-eng/ci-test-mapping/pkg/config" | ||
| ) | ||
|
|
||
| type Component struct { | ||
| *config.Component | ||
| } | ||
|
|
||
| var ClusterObservabilityOperatorComponent = Component{ | ||
| Component: &config.Component{ | ||
| Name: "tracing-uiplugin", | ||
| Operators: []string{"cluster-observability-operator"}, | ||
| DefaultJiraProject: "COO", | ||
| DefaultJiraComponent: "tracing-uiplugin", | ||
| Matchers: []config.ComponentMatcher{ | ||
| { | ||
| Suite: "tracing-uiplugin", | ||
| }, | ||
| }, | ||
| }, | ||
| } | ||
|
|
||
| func (c *Component) IdentifyTest(test *v1.TestInfo) (*v1.TestOwnership, error) { | ||
| if matcher := c.FindMatch(test); matcher != nil { | ||
| jira := matcher.JiraComponent | ||
| if jira == "" { | ||
| jira = c.DefaultJiraComponent | ||
| } | ||
| return &v1.TestOwnership{ | ||
| Name: test.Name, | ||
| Component: c.Name, | ||
| JIRAComponent: jira, | ||
| Priority: matcher.Priority, | ||
| Capabilities: append(matcher.Capabilities, identifyCapabilities(test)...), | ||
| }, nil | ||
| } | ||
|
|
||
| return nil, nil | ||
| } | ||
|
|
||
| func (c *Component) StableID(test *v1.TestInfo) string { | ||
| // Look up the stable name for our test in our renamed tests map. | ||
| if stableName, ok := c.TestRenames[test.Name]; ok { | ||
| return stableName | ||
| } | ||
| return test.Name | ||
| } | ||
|
|
||
| func (c *Component) JiraComponents() (components []string) { | ||
| components = []string{c.DefaultJiraComponent} | ||
| for _, m := range c.Matchers { | ||
| components = append(components, m.JiraComponent) | ||
| } | ||
|
|
||
| return components | ||
| } | ||
|
|
||
| func (c *Component) ListNamespaces() []string { | ||
| return c.Namespaces | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably need to review what you need here. I don't think there is full support for Jira projects other than OCPBUGS currently for CR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the feedback @neisw! I did some investigation using Claude Code of both the ci-test-mapping and Sippy codebases to understand the limitations.
What I Found
I found only one limitation for non-OCPBUGS Jira projects:
Triage Auto-Commenting (
sippy/pkg/api/componentreadiness/triage.go:140-141)What Works
I verified that all core Component Readiness features properly support non-OCPBUGS projects:
✅ Test Data Storage -
sippy/pkg/apis/sippy/v1/types.go:95-96✅ Variant Mappings -
sippy/pkg/componentreadiness/jiraautomator/jiraautomator.go:636✅ Jira Automation - Not applicable to COO
regression_tracking: enabled: falseinconfig/views.yamljiraautomator.go:546defaults to OCPBUGS for row-based components, this code path isn't used for COO since automation is disabled✅ Dashboard Configuration -
sippy/config/views.yamlLayeredProduct: lp-interop-coo, not by Jira project✅ Queries and Filtering -
sippy/pkg/api/componentreadiness/query/querygenerators.go✅ Frontend Bug Filing -
sippy-ng/src/bugs/FileBug.jsjiraComponentIDandjiraComponentNameas generic propsThe system is properly architected to support multiple Jira projects - the data model, queries, and dashboards all handle it correctly.
My Plan
We can keep the COO project since:
Does this work, or are there other concerns we should address?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @IshwarKanse, I double checked with the team and our code and unfortunately there is still a dependency that components be defined in OCPBUGS project. We do understand that this is a limitation for teams who do not typically work within the OCPBUGS project and are trying to utilize CR. For the near term you will need to define a component within OCPBUGS and associate your suite with it for CR to display the results properly.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @neisw for the clarification! I've reviewed the code and understand the limitation.
You're right - both ci-test-mapping (
pkg/jira/ocpbugs.go:19) and Sippy (pkg/dataloader/jiraloader/jiraloader.go:122) hardcode the OCPBUGS project ID when loading component IDs.I also found that bug filing is hardcoded to OCPBUGS (
pkg/sippyserver/server.go:1675), so filing bugs from Sippy UI won't work for COO components.What Works vs What Doesn't
The core dashboard functionality works because
jira_component_idisn't used for filtering (there's even a TODO atquerygenerators.go:311noting it appears unused).Our Situation
We can't create a component in OCPBUGS since COO is a layered product with its own Jira project and it has many components. I noticed other layered products (CNV, ODF, Quay) work around this by creating components in OCPBUGS, but we'd prefer to keep proper Jira alignment as all the bugs being reported against COO components will mix with the bugs in OCPBUGS jira project.
We're OK accepting these limitations (no Sippy bug filing, no triage commenting) in exchange for proper COO Jira project alignment. Our teams will file bugs directly in COO Jira.
That said, if you'd prefer we follow the existing pattern for consistency, we can remove
DefaultJiraProject: "COO"and create the components in OCPBUGS instead. Let me know your preference and I'll update the PR accordingly. Thank you for your time looking into this.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately neither the dashboard or statistics work with this configuration currently. We know Sippy/CR are very OCP centric and have longer term goals to abstract many of the assumptions that have been built in. But currently you can see that when we fail to identify a test / component mapping we return an error and do not update the mappings until the issue is corrected.
Sippy queries the tests and joins with the component mappings via querygenerators
If we don't have a test mapped to an OCPBUGs component then that test will not be returned in the results currently. If you run through the ci-test-mappings jira-verify command you can see the failure:
ERRO[0000] unknown component "tracing-uiplugin" not found in jiraSo unfortunately, in the near term, if you are looking to use CR you need a component defined in OCPBUGS that you can map your tests too. You don't have to use OCPBUGS, you views will not be blocking OCP or require regression manangment, etc. But just to get the view working you will need components that can be pulled from OCPBUGS for the time being.
I do appreciate your investigation, flexibility and communication on how you would prefer to use the tooling. For now though OCP remains our primary focus and until we can prioritize redesign we have to request flexibility from team outside of OCP that want to make use of the tooling.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@neisw Thank you for your response, I went ahead and raised a request to add our components to the OCPBUGS project. https://issues.redhat.com/browse/DPP-18951 Once that is completed, I'll update this PR to remove the defaultproject COO and then this will match what our rest of the layered product teams have implemented.