Idle tasksBuilders spend a lot of their time with nothing to do. Idle tasks let a project use some of that time for work that has no natural end, like long-running fuzzing, without it ever getting in the way of real CI work. Asking for idle tasks in .sai.jsonA configuration asks for idle tasks by giving how many it wants on each platform it applies to: Every event still gets the configuration's normal task, which builds and counts towards the event's result as usual. Each event also gets, per platform, that many idle tasks ("lanes") for the same configuration (at most 16). Idle tasks:
Allowing idle tasks on a builderIdle tasks only go to builder platforms that allow them in the builder conf,
with an
Share of idle timeThe share is spread out through the idle time, not taken as one block. From
the first of a platform's slices starting to the last one ending is an active
period; after it, the platform has to rest for the period times
sai-server keeps the accounts, so they survive the builder going away. While idle tasks are running, or a builder is due to start one, the platform counts as having pending tasks for sai-power, the same as real tasks do. So sai-power keeps builders up for them, and brings builders that were turned off back up when their rest is over. Because sai-power can only turn on a platform, not a particular builder, this is only done for a platform whose builders all allow idle tasks. If a builder is paid for by the hour, or you don't want it running around the
clock, don't give it an Real work always wins"Idle" is about the builder as a whole. A builder doesn't take idle tasks while
any of its platforms has real work, or had it within When real work is offered to any platform of a builder, it stops all the idle tasks it's running to make way for it, and they are reported as "yielded". That's not a failure, the lane just waits for its next slice. When the builder is idle again, idle tasks start again. Writing an idle taskAn idle task's steps are told the length of their slice in Anything the task wants to keep between slices, like a fuzzing corpus, should go in a pool (see README-pool.md): the builder keeps it synced with every other builder working on the repo, even when it has to stop a slice to make way for real work. In the web UIAn event's idle tasks are shown after its real tasks, in their own group per configuration named "idle: <configuration>". While a slice is running, the lane is shown at full strength and gently "breathing"; the rest of the time, including when a slice yields to real work, it fades back. Idle tasks aren't included in the event's task counts or progress bar. |