Open olivergondza opened 8 years ago
This can, however, cause problems to people that for some reason do not want to provision one of the latter templates unless necessary. Consider job that can run everywhere will pick a template that takes several times longer to provision, uses more resources, will use limited number of licences, etc. An alternative can be to detect one template have a poor provisioning success record and move on to a more stable.
We can implement better heuristics once https://github.com/jenkinsci/cloud-stats-plugin gets ready.
Hi, I think that the list of templates should be ordered (templates with less resources are first) and plugin should use first matching template. If the provisioning fails then plugin can continue to next template in ordered list. It can safe some resources.
In case the first matching template got misconfigured (unable to provision, snapshot not working, etc.), plugin keeps picking it for further provisioning. It would be better to pick one at random if more matches the label to avoid it. Additional advantage is it will constantly test all other templates for early problem discovery.