Commit Graph

2 Commits

Author SHA1 Message Date
Simon Westphahl e0321f0daa Ensure correct lexical sorting of node requests
The recently introduced change to request child nodes of paused jobs
with a higher priority causes the priority to be actually lower in
case the pipeline precedence is set to 'high'.

Due to the lexical sorting of node requests in Nodepool, 99 will be
treated as the lowest prio in this case.

This is especially apparent when Nodepool is up against quota.

Change-Id: I094dee4f357c9974b6d9e95fcd70b02115d9de93
2019-03-14 15:39:23 +01:00
James E. Blair 8e09a758cf Request child nodes of paused jobs at higher priority
When requesting nodes for jobs which depend on paused parent jobs,
do so at a priority slightly higher than the pipeline priority
for that job.  E.g., if a gate pipeline priority is 200, then the
child job nodes will be requested at 199.

This is based on the theory that by the time the parent job has
run and paused, the queue item has already spent its time in line
waiting for nodes.  It's fair for it to get the additional
required nodes ASAP, and doing so means that the paused job may
finish quicker, reducing wasted node-time.

Change-Id: I5a210d37ef223e93361004a26ef327ffeb530a3c
2019-02-26 09:56:27 -08:00