Bug 1302227: set the taskGroupId to match the decision task; r=garndt
In this case, the tasks must have the same schedulerId as the existing task, so this is calculated using parameters['level']. MozReview-Commit-ID: G8EE2kvFstT
This commit is contained in:
@@ -23,9 +23,7 @@ logger = logging.getLogger(__name__)
|
||||
CONCURRENCY = 50
|
||||
|
||||
|
||||
def create_tasks(taskgraph, label_to_taskid):
|
||||
# TODO: use the taskGroupId of the decision task
|
||||
task_group_id = slugid()
|
||||
def create_tasks(taskgraph, label_to_taskid, params):
|
||||
taskid_to_label = {t: l for l, t in label_to_taskid.iteritems()}
|
||||
|
||||
session = requests.Session()
|
||||
@@ -40,6 +38,13 @@ def create_tasks(taskgraph, label_to_taskid):
|
||||
|
||||
decision_task_id = os.environ.get('TASK_ID')
|
||||
|
||||
# when running as an actual decision task, we use the decision task's
|
||||
# taskId as the taskGroupId. The process that created the decision task
|
||||
# helpfully placed it in this same taskGroup. If there is no $TASK_ID,
|
||||
# fall back to a slugid
|
||||
task_group_id = decision_task_id or slugid()
|
||||
scheduler_id = 'gecko-level-{}'.format(params['level'])
|
||||
|
||||
with futures.ThreadPoolExecutor(CONCURRENCY) as e:
|
||||
fs = {}
|
||||
|
||||
@@ -62,7 +67,7 @@ def create_tasks(taskgraph, label_to_taskid):
|
||||
task_def['dependencies'] = [decision_task_id]
|
||||
|
||||
task_def['taskGroupId'] = task_group_id
|
||||
task_def['schedulerId'] = '-'
|
||||
task_def['schedulerId'] = scheduler_id
|
||||
|
||||
# Wait for dependencies before submitting this.
|
||||
deps_fs = [fs[dep] for dep in task_def.get('dependencies', [])
|
||||
|
||||
Reference in New Issue
Block a user