mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-15 19:38:11 +00:00
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:
@ -130,6 +130,7 @@ def on_state_update(
|
||||
# if tasks are running on the node when it reports as Done
|
||||
# those are stopped early
|
||||
node.mark_tasks_stopped_early()
|
||||
node.to_reimage(done=True)
|
||||
|
||||
# Model-validated.
|
||||
#
|
||||
@ -242,7 +243,6 @@ def on_worker_event_done(machine_id: UUID, event: WorkerDoneEvent) -> Result[Non
|
||||
node.debug_keep_node = True
|
||||
node.save()
|
||||
|
||||
node.to_reimage(done=True)
|
||||
task_event = TaskEvent(
|
||||
task_id=task.task_id, machine_id=machine_id, event_data=WorkerEvent(done=event)
|
||||
)
|
||||
|
Reference in New Issue
Block a user