Closed Bug 1330385 Opened 8 years ago Closed 8 years ago

SETA - Make the job priorities endpoint work for TaskCluster

Categories

(Tree Management Graveyard :: Treeherder: SETA, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: armenzg, Assigned: rwood)

References

Details

Attachments

(1 file)

I will initially take this bug. It seems that the job priorities end point on the Heroku app returns jobtypes [1] instead of a task's unique identifier (task labels or builders) [2]. This is my mistake as I had assumed that the same kind of data would be used between Buildbot and TaskCluster. Let me see how to reconcile this. I think we should be able to make it work by changing [3] [1] https://github.com/mozilla/ouija/blob/master/src/server.py#L508 { "jobtypes": { "2017-01-10": [ [ "windows8-64", "debug", "web-platform-tests-1" ], [2] https://github.com/mozilla/treeherder/blob/master/treeherder/seta/job_priorities.py#L65-L67 { "jobtypes": { "2017-01-10": [ "test-android-4.2-x86/opt-mochitest-chrome", [3] https://dxr.mozilla.org/mozilla-central/source/taskcluster/taskgraph/util/seta.py?q=seta.heroku&redirect_type=single#39-50
Blocks: 1325404
Blocks: 1326102
No longer blocks: 1325404
I did not have anymore time to look at this before heading out for parental leave. I hope it is not too difficult to figure out.
Assignee: armenzg → nobody
Assignee: nobody → rwood
Status: NEW → ASSIGNED
Alright, so to make sure I'm on the right page here, so making the seta code in the gecko decision task able to use the output [1] in the Description the goal here, correct? As currently it just works with output [2]. I'm assuming I need to build a string adding 'test' etc, something like this (in the case of [1] above): "test-windows8-64/debug-web-platform-tests-1". So that the calling task label can be found in the list of low-value tasks.
Flags: needinfo?(jmaher)
:rwood, I believe you are 100% correct. That is how I understand this- we will take the tuples from SETA data and translate those into task definitions by building a string and matching on the task definition string name during the optimize step.
Flags: needinfo?(jmaher)
Comment on attachment 8833040 [details] Bug 1330385 - Make the job priorities endpoint work for tc; https://reviewboard.mozilla.org/r/109268/#review110396 a few issues here, but overall this is looking great! ::: taskcluster/taskgraph/util/seta.py:44 (Diff revision 1) > + > + if len(task_tuple) == 0: > + return '' > + if len(task_tuple) != 3: > + return ' '.join(task_tuple) > + if any('build' in x.lower() for x in task_tuple): we check for build inside of query_low_value_tasks, do we need it here as well? ::: taskcluster/taskgraph/util/seta.py:48 (Diff revision 1) > + return ' '.join(task_tuple) > + if any('build' in x.lower() for x in task_tuple): > + # ensure we never optimize out build jobs > + return '' > + > + return 'test-%s/%s-%s' % (task_tuple[0], task_tuple[1], task_tuple[2]) this could be fragile, but I am not coming up with a better method for implementing this. ::: taskcluster/taskgraph/util/seta.py:66 (Diff revision 1) > response = retry(requests.get, attempts=2, sleeptime=10, > args=(url, ), > kwargs={'timeout': 5, 'headers': headers}) > task_list = json.loads(response.content).get('jobtypes', '') > - if len(task_list) > 0: > + > + if len(task_list.values()[0]) > 0: do we handle invalid json or data types here? assuming [0] on an odd blob of data is risky- it is in try/except, just making sure we catch that. ::: taskcluster/taskgraph/util/seta.py:75 (Diff revision 1) > + if type(low_value_tasks[0]) == list: > + low_value_tasks = [self._convert_to_task_string(x) for x in low_value_tasks] > > # Bug 1315145, disable SETA for tier-1 platforms until backfill is implemented. > low_value_tasks = [x for x in low_value_tasks if x.find('debug') == -1] > low_value_tasks = [x for x in low_value_tasks if x.find('asan') == -1] we can remove these debug/asan hacks for now! backfilling is supported.
Attachment #8833040 - Flags: review?(jmaher) → review-
Comment on attachment 8833040 [details] Bug 1330385 - Make the job priorities endpoint work for tc; https://reviewboard.mozilla.org/r/109268/#review110396 > this could be fragile, but I am not coming up with a better method for implementing this. Yeah it's def not the best but I also don't have a better solution
Comment on attachment 8833040 [details] Bug 1330385 - Make the job priorities endpoint work for tc; https://reviewboard.mozilla.org/r/109268/#review110412 thanks for the update!
Attachment #8833040 - Flags: review?(jmaher) → review+
Pushed by rwood@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1f731804ffd4 Make the job priorities endpoint work for tc; r=jmaher
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Component: Treeherder → Treeherder: SETA
Product: Tree Management → Tree Management Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: