Closed
Bug 1277993
Opened 9 years ago
Closed 9 years ago
Improve mechanism for excluding jobs and setting tiers that is less brittle
Categories
(Tree Management :: Treeherder, defect, P2)
Tree Management
Treeherder
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: camd, Assigned: martianwars)
References
Details
Attachments
(1 file)
Currently, excluding jobs consists of creating a set of values to exclude by. Then we get all the reference_data_signatures that match those params, and persist that list at the time of saving the exclusion profile.
However, when new jobs that SHOULD call within those exclusion parameters are added, they are not excluded. A sheriff must go in to the exclusion editor and just re-save it to update the list of signatures.
This was inspired by bug 1258720.
We COULD create a process that re-saves all exclusion profiles every time a new job type or platform (or some criteria) is added. Or have a timer that re-saves them all every X minutes/hours/etc.
Or perhaps there's a better approach we could take that is less brittle.
I don't know what the approach might be at this time, but this bug is here to re-think how this is working. Do we shore it up? Or come up with something better?
Reporter | ||
Comment 1•9 years ago
|
||
Note that this also effects the Tier-2 and Tier-3 exclusion profiles which don't actually exclude anything, but set their tier during ingestion. Missing signatures in that list mean that jobs are ingested and STAY in the wrong tier.
Severity: normal → major
Priority: -- → P2
Reporter | ||
Updated•9 years ago
|
Summary: Improve mechanism for excluding jobs that is less brittle → Improve mechanism for excluding jobs and setting tiers that is less brittle
Comment 2•9 years ago
|
||
I would personally just hook into the post-save method to update the exclusion profiles when a new reference data signature is added:
https://docs.djangoproject.com/en/1.8/ref/signals/#django.db.models.signals.post_save
This shouldn't happen *that* often, so it doesn't matter if it's a little slow (I doubt it would even be that slow)
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → kalpeshk2011
Comment 3•9 years ago
|
||
Assignee | ||
Comment 4•9 years ago
|
||
Comment on attachment 8768930 [details] [review]
[treeherder] martiansideofthemoon:hello > mozilla:master
Does this look any good?
Attachment #8768930 -
Flags: feedback?(wlachance)
Comment 5•9 years ago
|
||
Comment on attachment 8768930 [details] [review]
[treeherder] martiansideofthemoon:hello > mozilla:master
Cam, if you have a moment, could you take a look and let :martianwars if he's on the right track?
Attachment #8768930 -
Flags: feedback?(wlachance)
Attachment #8768930 -
Flags: feedback?(cdawson)
Attachment #8768930 -
Flags: feedback+
Reporter | ||
Comment 6•9 years ago
|
||
I left a comment in the PR, but I'm only really concerned about performance. The exclusion profiles are huge on production, so saving them will have a cost. I think the approach is good as long as that cost isn't too much.
An alternative would be to set a value in memcached that the profiles are "dirty" and have a celery beat process that checks that every 5 or 10 minutes to do the update.
Reporter | ||
Updated•9 years ago
|
Attachment #8768930 -
Flags: feedback?(cdawson) → feedback+
Reporter | ||
Comment 7•9 years ago
|
||
Here's a unit test that works with exclusion_profiles: https://github.com/mozilla/treeherder/blob/b040bb40455e2baac403813c882d143711262b49/tests/webapp/api/test_jobs_api.py#L160-L160
Assignee | ||
Comment 8•9 years ago
|
||
Comment on attachment 8768930 [details] [review]
[treeherder] martiansideofthemoon:hello > mozilla:master
The unit-test fails when I remove the added code, so I guess it works :) I'm not sure how much this will harm the performance though.
Attachment #8768930 -
Flags: review?(wlachance)
Comment 9•9 years ago
|
||
Comment on attachment 8768930 [details] [review]
[treeherder] martiansideofthemoon:hello > mozilla:master
We need to update the tier info inside jobs model (see PR for details), but this is looking good!
Attachment #8768930 -
Flags: review?(wlachance) → review-
Assignee | ||
Updated•9 years ago
|
Attachment #8768930 -
Flags: review- → review?(wlachance)
Comment 10•9 years ago
|
||
Comment on attachment 8768930 [details] [review]
[treeherder] martiansideofthemoon:hello > mozilla:master
Looks good. We should be somewhat cautious about merging this (i.e. we should wait for the issues in bug 1287501 to be resolved), but I am pretty sure it will be fine. There isn't actually that much data in the job exclusion profiles themselves, so I think resaving them should be quite fast.
Attachment #8768930 -
Flags: review?(wlachance) → review+
Comment 12•9 years ago
|
||
Commit pushed to master at https://github.com/mozilla/treeherder
https://github.com/mozilla/treeherder/commit/2dac5add3b2aae87a8e865a7c713ead81c70bbcc
Bug 1277993 - Improve mechanism for excluding jobs and setting tiers (#1661)
Comment 13•9 years ago
|
||
I merged the patch and will deploy to stage shortly. Hopefully it won't cause any explosions. :)
Flags: needinfo?(wlachance)
Assignee | ||
Updated•9 years ago
|
Status: NEW → RESOLVED
Closed: 9 years ago
Flags: needinfo?(wlachance)
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•