Skip to content

feat(pool): Allow to optionally include busy runners into the pool#5078

Merged
edersonbrilhante merged 1 commit into
github-aws-runners:mainfrom
rvem:optionally-include-busy-runners-into-the-pool
Jul 10, 2026
Merged

feat(pool): Allow to optionally include busy runners into the pool#5078
edersonbrilhante merged 1 commit into
github-aws-runners:mainfrom
rvem:optionally-include-busy-runners-into-the-pool

Conversation

@rvem

@rvem rvem commented Mar 26, 2026

Copy link
Copy Markdown
Contributor

Description

'pool_config' is useful when one wants to ensure that a certain number
of runners is running within given time periods.
However, when 'pool_config' is used in a combination with persistent runners,
the pool lambda tends to spin up new runner instance when it sees that some
existing runners are online, but busy.

As a result, with frequent pool lambda checks, the total size of the runners
pool tends to grow more than desired (without respecting
'runners_maximum_count', which is only considered by the 'scale_up' lambda).

These changes introduce a new 'pool_include_busy_runners' module variable
to make it possbile to include all online runners (both idle and busy)
into the pool, so that the pool's lambda only tops up the pool if not
enough runners are online.

Test Plan

Tested on a module instance with persistent runners, also added a few unit tests to the pool lambda itself.

Related Issues

@rvem rvem requested review from a team as code owners March 26, 2026 08:54
@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions Bot added the Stale label Jun 25, 2026

@edersonbrilhante edersonbrilhante left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rvem Can you fix the conflicts?

@github-actions github-actions Bot removed the Stale label Jul 4, 2026
@rvem rvem force-pushed the optionally-include-busy-runners-into-the-pool branch from 34e2f4b to 696f692 Compare July 6, 2026 07:43
@rvem

rvem commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

@edersonbrilhante done

@edersonbrilhante

Copy link
Copy Markdown
Contributor

@rvem Can you sign your commit?

@rvem rvem force-pushed the optionally-include-busy-runners-into-the-pool branch 2 times, most recently from b628711 to 813c45e Compare July 9, 2026 07:27
'pool_config' is useful when one wants to ensure that a certain number
of runners is running within given time periods.
However, when 'pool_config' is used in a combination with persistent runners,
the pool lambda tends to spin up new runner instance when it sees that some
existing runners are online, but busy.

As a result, with frequent pool lambda checks, the total size of the runners
pool tends to grow more than desired (without respecting
'runners_maximum_count', which is only considered by the 'scale_up' lambda).

These changes introduce a new 'pool_include_busy_runners' module variable
to make it possbile to include all online runners (both idle and busy)
into the pool, so that the pool's lambda only tops up the pool if not
enough runners are online.
@rvem rvem force-pushed the optionally-include-busy-runners-into-the-pool branch from 813c45e to c83c53b Compare July 9, 2026 07:28
@rvem

rvem commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

Done; also rebased on the latest upstream main

@edersonbrilhante edersonbrilhante merged commit c3eeb0f into github-aws-runners:main Jul 10, 2026
43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants