Colocate tasks (#402)

Enables co-locating multiple tasks in a given work-set.

Tasks are bucketed by the following:
* OS
* job id
* setup container
* VM SKU & image (used in pre-1.0 style tasks)
* pool name (used in 1.0+ style tasks)
* if the task needs rebooting after the task setup script executes.

Additionally, a task will end up in a unique bucket if any of the following are true:
* The task is set to run on more than one VM
* The task is missing the `task.config.colocate` flag (all tasks created prior to this functionality) or the value is False

This updates the libfuzzer template to make use of colocation.  Users can specify co-locating all of the tasks *or* co-locating the secondary tasks.
This commit is contained in:
bmc-msft
2021-01-06 08:49:15 -05:00
committed by GitHub
parent 883f38cb87
commit c1a50f6f6c
9 changed files with 395 additions and 90 deletions

View File

@ -803,6 +803,7 @@ class Tasks(Endpoint):
target_workers: Optional[int] = None,
vm_count: int = 1,
preserve_existing_outputs: bool = False,
colocate: bool = False,
) -> models.Task:
"""
Create a task
@ -846,6 +847,7 @@ class Tasks(Endpoint):
pool=models.TaskPool(count=vm_count, pool_name=pool_name),
prereq_tasks=prereq_tasks,
tags=tags,
colocate=colocate,
task=models.TaskDetails(
analyzer_env=analyzer_env,
analyzer_exe=analyzer_exe,