Add back bz component#69
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: deads2k The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
43ba900 to
27dadfc
Compare
27dadfc to
0ff3699
Compare
| ) | ||
|
|
||
| func bugLink(bug bugsv1.Bug) string { | ||
| return fmt.Sprintf("<a target=\"_blank\" href=%s>%d</a> ", bug.Url, bug.ID) |
| Failures int `json:"failures"` | ||
| Flakes int `json:"flakes"` | ||
| PassPercentage float64 `json:"passPercentage"` | ||
| BugList []bugsv1.Bug `json:"BugList"` |
| for t := range failedTestNamesAcrossAllJobRuns { | ||
| if util.IgnoreTestRegex.MatchString(t) { | ||
| for testName := range failedTestNamesAcrossAllJobRuns { | ||
| if util.IgnoreTestRegex.MatchString(testName) { |
There was a problem hiding this comment.
can this be just util.IsTestIgnored() ?
There was a problem hiding this comment.
can this be just
util.IsTestIgnored()?
this shouldn't leak out. I tightened it up in the interim
| LastChangeTime time.Time `json:"last_change_time"` | ||
| Summary string `json:"summary"` | ||
| TargetRelease []string `json:"target_release"` | ||
| Component []string `json:"component"` |
There was a problem hiding this comment.
this is driven by the ci-seach api:
https://search.ci.openshift.org/v2/search?search=storage&type=bug
bugInfo": {
"id": 1867757,
"status": "VERIFIED",
"resolution": "",
"severity": "medium",
"priority": "unspecified",
"summary": "Rebase node-registrar sidebar with latest version",
"keywords": [ ],
"whiteboard": "",
"cf_internal_whiteboard": "",
"creator": "hekumar@redhat.com",
"component": [
"Storage"
],
"assigned_to": "hekumar@redhat.com",
"creation_time": "2020-08-10T17:07:59Z",
"last_change_time": "2020-08-25T01:42:05Z",
"cf_environment": "",
"target_release": [
"4.6.0"
]
}
There was a problem hiding this comment.
(which in turn is a more or less direct mapping of the BZ api)
| Status string `json:"status"` | ||
| LastChangeTime time.Time `json:"last_change_time"` | ||
| Summary string `json:"summary"` | ||
| TargetRelease []string `json:"target_release"` |
There was a problem hiding this comment.
wonder why is this an []string, can you have more than 1 target release?
There was a problem hiding this comment.
yes. the BZ api returns it as an array. though i haven't figured out how set more than one in the UI.
| // BugzillaBug matches the bugzilla API. We cannot change this and should consider writing a converter instead of having | ||
| // a serialization we don't own. | ||
| type BugzillaBug struct { | ||
| ID int64 `json:"id"` |
There was a problem hiding this comment.
in all bugzilla libs I saw the ID was an int :-)
| c.cache[testName] = []bugsv1.Bug{} | ||
| batchCount++ | ||
|
|
||
| if batchCount > 50 { |
There was a problem hiding this comment.
nit:
if batchCount <=50 { continue }
makes less nesting
| searchUrl := "https://search.ci.openshift.org/v2/search" | ||
| resp, err := http.PostForm(searchUrl, v) | ||
| if err != nil { | ||
| e := fmt.Errorf("error during bug search against %s: %s", searchUrl, err) |
|
@mfojtik I propose dealing with all those as followups. |
| Successes int `json:"successes"` | ||
| Failures int `json:"failures"` | ||
| TestPassPercentage float64 `json:"testPassPercentage"` | ||
| // TestResults holds the values for individual runs of this test sorted by..... |
There was a problem hiding this comment.
don't leave me in suspense......i assume they're storted by pass rate?
it's not really individual runs of the test, right? isn't it an array of tests, each entry being a testname and the totals/percentages(across all runs of that test) for that test name?
There was a problem hiding this comment.
don't leave me in suspense......i assume they're storted by pass rate?
it's not really individual runs of the test, right? isn't it an array of tests, each entry being a testname and the totals/percentages(across all runs of that test) for that test name?
I have no idea. Your API ;)
There was a problem hiding this comment.
I have no idea. Your API ;)
not any more..... anyway that's what it was last i knew.
| // TotalRuns is the number of runs this Job has run total. | ||
| TotalRuns int `json:"totalRuns"` | ||
|
|
||
| // Failures are a full list of the failures by this BZ component in the given job. |
There was a problem hiding this comment.
| // Failures are a full list of the failures by this BZ component in the given job. | |
| // Failures are a full list of the failures caused by this BZ component in the given job. |
| <a href="#TestImpactingComponents">Test Impacting Components</a> | ||
| <br/> | ||
| <a href="#TestImpactingComponents">Test Impacting Components</a> | | ||
| <a href="#BZToWorstJobImpact">Bugzilla Components to Worst Job Impact</a> |
There was a problem hiding this comment.
thank you, i was going to ask for you to fix that formatting :)
| s := fmt.Sprintf(` | ||
| <table class="table"> | ||
| <tr> | ||
| <th colspan=4 class="text-center"><a class="text-dark" title="Bugzilla components ranked by maximum fail percentage of any job." id="BZToWorstJobImpact" href="#BZToWorstJobImpact">Bugzilla Components to Worst Job Impact</a></th> |
There was a problem hiding this comment.
| <th colspan=4 class="text-center"><a class="text-dark" title="Bugzilla components ranked by maximum fail percentage of any job." id="BZToWorstJobImpact" href="#BZToWorstJobImpact">Bugzilla Components to Worst Job Impact</a></th> | |
| <th colspan=4 class="text-center"><a class="text-dark" title="Bugzilla components ranked by maximum fail percentage of any job." id="BZToWorstJobImpact" href="#BZToWorstJobImpact">Job Impacting BZ Components</a></th> |
There was a problem hiding this comment.
Bugzilla components ranked by maximum fail percentage of any job
suggestion:
Bugzilla components ranked by computing which job they contribute the most failure percentage to and then sorting the components by each one's worst job performance.
but i wonder if this would be clearer if you just showed which job was the top failing one for the component, in the top line results, and the expansion just showed "other jobs" or "all jobs"
| <th colspan=4 class="text-center"><a class="text-dark" title="Bugzilla components ranked by maximum fail percentage of any job." id="BZToWorstJobImpact" href="#BZToWorstJobImpact">Bugzilla Components to Worst Job Impact</a></th> | ||
| </tr> | ||
| <tr> | ||
| <th>Variant</th><th>Latest %d days</th><th/><th>Previous 7 days</th> |
There was a problem hiding this comment.
| <th>Variant</th><th>Latest %d days</th><th/><th>Previous 7 days</th> | |
| <th>Component</th><th>Latest %d days</th><th/><th>Previous 7 days</th> |
|
|
||
| prev := util.GetPrevBugzillaJobFailures(v.Name, failuresByBugzillaComponentPrev) | ||
| highestFailPercentage := v.JobsFailed[0].FailPercentage | ||
| lowestPassPercentage := 100 - highestFailPercentage |
There was a problem hiding this comment.
so ultimately the value you're presenting in the table is "the percentage of jobs which did not fail because of this component" right?
i appreciate it is aligned w/ how the other tables work but it also doesn't seem like the most intuitive value. Need to think about it.
There was a problem hiding this comment.
i appreciate it is aligned w/ how the other tables work but it also doesn't seem like the most intuitive value. Need to think about it
aligning to the other tables was the what I was going for. It was super confusing in the reverse and I knew what it was doing.
There was a problem hiding this comment.
hm, another confusing thing about this is that the top line value you're presenting isn't some aggregation of the percentage of failures this component is causing across all jobs. It's "here's the job where this component performs worst"
which i realize probably aligns with your intent (if a single component is tanking a single job, that's the thing you care about more than anything in the world, more so than another component that might be impacting all jobs but to a lesser degree....which is more or less what the "test impacting components" view is showing). But i'm pretty sure people won't understand it. I know i was confused when i started expanding jobs and trying to understand how the top line number made sense in light of the expanded jobs values.
your hover text sort of explains it. let me see if i can offer a suggestion on that to help.
| v.Name, | ||
| safeBZJob, | ||
| lowestPassPercentage, | ||
| prev.JobsFailed[0].TotalRuns, |
There was a problem hiding this comment.
something seems off about this value. i'm seeing pretty low values reported. if it were the number of failed runs the numbers would make sense, but as a "total" they don't make sense to me. let's discuss when you're free.
or maybe it's low because you just picked the first entry? should this be a sum of all the entries?
There was a problem hiding this comment.
also i don't thiink you mean to have prev here. should be the current week
| failingJob.JobName, | ||
| bzJobTuple, | ||
| 100.0-failingJob.FailPercentage, | ||
| failingJob.NumberOfJobRunsFailed, |
There was a problem hiding this comment.
since you inverted the percentage to be "passing" i think you should invert this to be successes(well, non-failures) also.
…mponent" Errorf Fixing a bug from 0ff3699 (add failures by BZ component, 2020-09-01, openshift#69) to avoid: $ go test ./... # github.com/openshift/sippy/pkg/testgridanalysis/testidentification pkg/testgridanalysis/testidentification/component.go:168:10: Errorf format %q reads arg openshift#1, but call has 0 args pkg/testgridanalysis/testidentification/component.go:176:10: Errorf format %q reads arg openshift#1, but call has 0 args ...
undoes the revert with a much cleaner interface