-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Testing Infrastructure
-
None
-
Fully Compatible
-
DAG 2022-03-07
-
3
Currently, when generating tasks, we will calculate and set a dynamic timeouts value based on the historic runtimes of the tests in each sub-suite (as long as we have runtime information for all the tasks). The dynamic runtimes are useful in keeping the timeouts fairly close to the expected runtimes. This way if a hang occurs, we can wait less time for the task to hit the timeout and hopefully have smaller logs we need to dig through to find the problem.
Two of the big drawbacks to this approach are: (1) it only works for generated tasks, tasks that have not been generated cannot take advantage of it, and (2) the generated tasks cannot be shared between build variants, since runtimes on each build variant can be different, they each need to generate their own timeouts.
To overcome these limitation, we should move the calculation of the timeouts to the start of task execution, instead of it being part of generated tasks. The runtime of calculating the runtime of a single task should be relatively small (a few seconds), so the impact on the overall task runtime should be negligible. This approach would, however, provide a consistent way of calculating timeouts for both generated and non-generated tasks and allow generated tasks to be shared across build variants.