Skip to content

Add back bz component#69

Merged
openshift-merge-robot merged 14 commits intoopenshift:masterfrom
deads2k:add-back-bz-component
Sep 3, 2020
Merged

Add back bz component#69
openshift-merge-robot merged 14 commits intoopenshift:masterfrom
deads2k:add-back-bz-component

Conversation

@deads2k
Copy link
Copy Markdown
Contributor

@deads2k deads2k commented Sep 2, 2020

undoes the revert with a much cleaner interface

@openshift-ci-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: deads2k
To complete the pull request process, please assign bparees
You can assign the PR to them by writing /assign @bparees in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@deads2k deads2k force-pushed the add-back-bz-component branch from 27dadfc to 0ff3699 Compare September 2, 2020 13:59
Comment thread pkg/html/bugs.go
)

func bugLink(bug bugsv1.Bug) string {
return fmt.Sprintf("<a target=\"_blank\" href=%s>%d</a> ", bug.Url, bug.ID)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: href="%s"

Comment thread pkg/util/utils.go Outdated
Failures int `json:"failures"`
Flakes int `json:"flakes"`
PassPercentage float64 `json:"passPercentage"`
BugList []bugsv1.Bug `json:"BugList"`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: bugList ?

Comment thread main.go Outdated
for t := range failedTestNamesAcrossAllJobRuns {
if util.IgnoreTestRegex.MatchString(t) {
for testName := range failedTestNamesAcrossAllJobRuns {
if util.IgnoreTestRegex.MatchString(testName) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this be just util.IsTestIgnored() ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this be just util.IsTestIgnored() ?

this shouldn't leak out. I tightened it up in the interim

Comment thread pkg/apis/bugs/v1/types.go
LastChangeTime time.Time `json:"last_change_time"`
Summary string `json:"summary"`
TargetRelease []string `json:"target_release"`
Component []string `json:"component"`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Components ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"
    ]

}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(which in turn is a more or less direct mapping of the BZ api)

Comment thread pkg/apis/bugs/v1/types.go
Status string `json:"status"`
LastChangeTime time.Time `json:"last_change_time"`
Summary string `json:"summary"`
TargetRelease []string `json:"target_release"`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wonder why is this an []string, can you have more than 1 target release?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes. the BZ api returns it as an array. though i haven't figured out how set more than one in the UI.

Comment thread pkg/apis/bugs/v1/types.go
// 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"`
Copy link
Copy Markdown
Contributor

@mfojtik mfojtik Sep 2, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in all bugzilla libs I saw the ID was an int :-)

Comment thread pkg/buganalysis/cache.go
c.cache[testName] = []bugsv1.Bug{}
batchCount++

if batchCount > 50 {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit:

if batchCount <=50 { continue }

makes less nesting

Comment thread pkg/buganalysis/cache.go
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)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: %v

@deads2k
Copy link
Copy Markdown
Contributor Author

deads2k commented Sep 2, 2020

@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.....
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ;)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// 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.

Comment thread pkg/html/html.go
<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>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you, i was going to ask for you to fix that formatting :)

Comment thread pkg/html/html.go
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>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<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>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(and elsewhere)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"

Comment thread pkg/html/html.go
<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>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<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>

Comment thread pkg/html/html.go

prev := util.GetPrevBugzillaJobFailures(v.Name, failuresByBugzillaComponentPrev)
highestFailPercentage := v.JobsFailed[0].FailPercentage
lowestPassPercentage := 100 - highestFailPercentage
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread pkg/html/html.go
v.Name,
safeBZJob,
lowestPassPercentage,
prev.JobsFailed[0].TotalRuns,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also i don't thiink you mean to have prev here. should be the current week

Comment thread pkg/html/html.go
failingJob.JobName,
bzJobTuple,
100.0-failingJob.FailPercentage,
failingJob.NumberOfJobRunsFailed,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since you inverted the percentage to be "passing" i think you should invert this to be successes(well, non-failures) also.

@openshift-merge-robot openshift-merge-robot merged commit 0ff3699 into openshift:master Sep 3, 2020
wking added a commit to wking/sippy that referenced this pull request Sep 29, 2020
…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
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants