garm/runner
Gabriel Adrian Samfira ce3c917ae5 Add pool balancing strategy
This change adds the ability to specify the pool balancing strategy to
use when processing queued jobs. Before this change, GARM would round-robin
through all pools that matched the set of tags requested by queued jobs.

When round-robin (default) is used for an entity (repo, org or enterprise)
and you have 2 pools defined for that entity with a common set of tags that
match 10 jobs (for example), then those jobs would trigger the creation of
a new runner in each of the two pools in turn. Job 1 would go to pool 1,
job 2 would go to pool 2, job 3 to pool 1, job 4 to pool 2 and so on.

When "stack" is used, those same 10 jobs would trigger the creation of a
new runner in the pool with the highest priority, every time.

In both cases, if a pool is full, the next one would be tried automatically.

For the stack case, this would mean that if pool 2 had a priority of 10 and
pool 1 would have a priority of 5, pool 2 would be saturated first, then
pool 1.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-03-14 20:04:34 +00:00
..
common Allow bypassing Unauthorized error when deleting runner 2024-03-10 15:21:39 +00:00
metrics Add job info in runner list 2024-03-11 15:46:18 +00:00
mocks Allow bypassing Unauthorized error when deleting runner 2024-03-10 15:21:39 +00:00
pool Add pool balancing strategy 2024-03-14 20:04:34 +00:00
providers fix: godoc linter warnings (TODOs) 2024-02-22 15:06:53 +01:00
common_test.go fix: goconst linter findings 2024-02-22 17:39:02 +01:00
enterprises.go Add pool balancing strategy 2024-03-14 20:04:34 +00:00
enterprises_test.go Add pool balancing strategy 2024-03-14 20:04:34 +00:00
interfaces.go Slight refactor and fix tests 2023-07-05 09:46:19 +00:00
metadata.go fix: gocritic linter finding 2024-02-22 17:40:15 +01:00
organizations.go Add pool balancing strategy 2024-03-14 20:04:34 +00:00
organizations_test.go Add pool balancing strategy 2024-03-14 20:04:34 +00:00
pools.go fix: godoc linter findings (TODO comments) 2024-02-22 17:33:19 +01:00
pools_test.go Add pool balancing strategy 2024-03-14 20:04:34 +00:00
repositories.go Add pool balancing strategy 2024-03-14 20:04:34 +00:00
repositories_test.go Add pool balancing strategy 2024-03-14 20:04:34 +00:00
runner.go Add pool balancing strategy 2024-03-14 20:04:34 +00:00
types.go Move code to external package 2023-07-21 15:34:18 +00:00