The check for max runners was added to CreateInstance(), but we crete the JIT runners before we run the function to add a runner to the DB. The defer function to clean up the JIT runner was being run after the error return generated by CreateInstance. So the cleanup code never ran. Additionally we would know that max runners was reached only after creating the JIT runner. Which kills rate limits. Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com> |
||
|---|---|---|
| .. | ||
| cache.go | ||
| common.go | ||
| pool.go | ||
| stub_client.go | ||
| util.go | ||
| util_test.go | ||
| watcher.go | ||