Bug 1274311 - tier-2 jobs should have rank 0 in the index; r=dustin

MozReview-Commit-ID: 1CeJ7s6Eay3
This commit is contained in:
Mike Shal 2016-06-24 15:59:24 -04:00
Родитель 8f1b2347a0
Коммит b8cc44f4d4
5 изменённых файлов: 12 добавлений и 5 удалений

Просмотреть файл

@ -36,7 +36,7 @@ task:
build_name: '{{build_name}}'
build_type: '{{build_type}}'
index:
rank: {{push_epoch}}
rank: {{rank}}
treeherder:
jobKind: build
groupSymbol: tc

Просмотреть файл

@ -65,7 +65,7 @@ task:
build: null
tests: null
index:
rank: {{push_epoch}}
rank: {{rank}}
treeherder:
jobKind: test
groupSymbol: tc

Просмотреть файл

@ -37,6 +37,6 @@ task:
build_name: {{build_name}}
build_type: {{build_type}}
index:
rank: {{push_epoch}}
rank: {{rank}}
treeherder:
jobKind: test

Просмотреть файл

@ -61,7 +61,7 @@ task:
build_name: '{{build_name}}'
build_type: '{{build_type}}'
index:
rank: {{push_epoch}}
rank: {{rank}}
treeherder:
jobKind: build
groupSymbol: tc

Просмотреть файл

@ -355,11 +355,11 @@ class LegacyTask(base.Task):
'head_ref': params['head_ref'] or params['head_rev'],
'head_rev': params['head_rev'],
'pushdate': pushdate,
'push_epoch': push_epoch,
'pushtime': pushdate[8:],
'year': pushdate[0:4],
'month': pushdate[4:6],
'day': pushdate[6:8],
'rank': push_epoch,
'owner': params['owner'],
'level': params['level'],
'from_now': json_time_from_now,
@ -449,6 +449,13 @@ class LegacyTask(base.Task):
build_parameters['build_type'] = task_extra['build_type']
build_parameters['build_product'] = task_extra['build_product']
if 'treeherder' in task_extra:
tier = task_extra['treeherder'].get('tier', 1)
if tier != 1:
# Only tier 1 jobs use the build time as rank. Everything
# else gets rank 0 until it is promoted to tier 1.
task_extra['index']['rank'] = 0
set_interactive_task(build_task, interactive)
# try builds don't use cache