Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Idle and Pool Configs Simultaneously - Runners Redeploying in a Loop #4277

Open
dmatviichuk opened this issue Nov 20, 2024 · 0 comments
Open

Comments

@dmatviichuk
Copy link

Hi,

I am trying to achieve the following scenario using both idle_config and pool_config in the GitHub Runner module:

  1. Maintain 1 idle runner at all times.
  2. When a runner becomes busy (e.g., due to a developer pushing code), the pool dynamically adds another idle runner because the first one is busy
  3. If 2 runners are idle, the lambda should scale down to only 1 idle runner.

However, this setup results in runners being redeployed in a loop. Here’s the observed behavior:
• When a second runner is deployed (to handle a busy runner), and both runners become idle, the scale-down Lambda terminates one of the runners to maintain only 1 idle runner (as per idle_config).
• The pool Lambda immediately detects the shortfall (as the pool_config expects 1 idle runner) and deploys a new runner.
• This cycle continues indefinitely, creating and terminating runners in a loop.

gh_idle_config = [
  {
    cron             = "* 8-19 * * 1-5 *"
    timeZone         = "America/Phoenix"
    idleCount        = 1
    evictionStrategy = "oldest_first"
  }
]

gh_pool_config = [
  {
    schedule_expression          = "cron(0/5 8-19 ? * 1-5 *)"
    schedule_expression_timezone = "America/Phoenix"
    size                         = 1
  }
]
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

No branches or pull requests

1 participant