heptapod-paas-runner: job age option
The API call to request jobs from the coordinator has this interesting field:
optional :job_age, type: Integer, desc: %q(Job should be older than passed age in seconds to be ran on runner)
Exposing it in configuration would make it very interesting to supplement permanent runners with a PAAS runner: on-demand provisioning induces more latency because everything has to be set up from scratch (pulling Docker images, initial repo cloning etc). With the tight polling loop that runners perform by default, putting a reasonably low value like 30 seconds would effectively implement "run jobs on permanent runners if any is available, otherwise default to the PAAS runner".
A more advanced usage would be to automate this in the PAAS runner itself. If it kept some warm resources available, it could itself have two polling loops, one to run on warm resources (without the job_age
field) and the second loop to run on newly provisioned resources, with a sufficiently large job_age
value.