ouija slave view should only show slaves that have >5 jobs

RESOLVED FIXED

Status

RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: jmaher, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

5 years ago
this is a measure that will help us turn the long list of failed slaves into action items.  A slave that has run 2 jobs and failed both might not be a bad slave- it isn't causing a lot of noise.

Comment 1

5 years ago
Created attachment 828870 [details] [diff] [review]
0001-Bug-936164.patch
Attachment #828870 - Flags: review?(jmaher)

Comment 2

5 years ago
Created attachment 828898 [details] [diff] [review]
0002-Bug-936164.patch

Ah, sorry, the idea with filtering slaves on database level was not that good. Platform failure rate calculation gone bad, so I re-wrote code, and now it seems to be ok.
Attachment #828870 - Attachment is obsolete: true
Attachment #828870 - Flags: review?(jmaher)
Attachment #828898 - Flags: review?(jmaher)
(Reporter)

Comment 3

5 years ago
Comment on attachment 828898 [details] [diff] [review]
0002-Bug-936164.patch

Review of attachment 828898 [details] [diff] [review]:
-----------------------------------------------------------------

great addition. is there any issues with the show all slaves checkbox?  I would be fine having limitations with that feature in order to get something more beneficial like this patch.

::: src/server.py
@@ +177,5 @@
> +    else:
> +        jobs = int(round(days_to_show * 0.4))
> +
> +    info = '''Only slaves with more than %d jobs are displayed.''' % jobs
> +

excellent!

@@ +184,5 @@
>      cursor.execute("""select slave, result, date from testjobs
>                        where result in
>                        ("retry", "testfailed", "success", "busted", "exception")
> +                      and date between "{0}" and "{1}"
> +                      order by slave;""".format(start_date, end_date))

I am unfamiliar with this use of format vs %.  I assume this is better for database connections?
(Reporter)

Updated

5 years ago
Attachment #828898 - Flags: review?(jmaher) → review+

Comment 4

5 years ago
Well, if this patch will be applied, then only slaves with more than 5 jobs will be returned. So, if among those slaves will be slaves with no failures, checkbox will continue to work as expected, if there will be no such slaves, then there is nothing to show.
(Reporter)

Comment 5

5 years ago
dminor: I would like to apply this patch and roll it out.  I am not that familiar with the deployment solution.
Flags: needinfo?(dminor)

Comment 6

5 years ago
:jmaher, I'll apply this patch to make sure I get the steps right, and leave it here for future reference, until there is a better place for this information.

1) wget <patch url from bugzilla>
2) git am <patch>
3) sudo apachectl restart
4) check that it works :)
5) git push origin master

Revision: https://github.com/dminor/ouija/commit/1e1c277cd8d4e34c7d0642e4b5c733be6ea272b1
Flags: needinfo?(dminor)

Comment 7

5 years ago
This was done. Should we close ticket?
(Reporter)

Comment 8

5 years ago
oops, my bad, lets close this out!
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.