Skip to content

docs(warm-pool): add warm pool guide, ADR and examples - #5498

Open
Brend-Smits wants to merge 3 commits into
feat/warm-pool-07-terraform-multi-runnerfrom
feat/warm-pool-08-docs-examples
Open

Brend-Smits wants to merge 3 commits into
feat/warm-pool-07-terraform-multi-runnerfrom
feat/warm-pool-08-docs-examples

Conversation

@Brend-Smits

@Brend-Smits Brend-Smits commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Warm pool stack (review in order; each PR is based on the previous one):

  1. feat(compute-providers): add EC2 standby primitives for warm pools #5491 feat(compute-providers): add EC2 standby primitives for warm pools
  2. feat(pool): keep a warm pool of stopped instances #5492 feat(pool): keep a warm pool of stopped instances
  3. feat(scale-up): start warm instances before launching cold runners #5493 feat(scale-up): start warm instances before launching cold runners
  4. feat(scale-down): sweep stopped warm instances #5494 feat(scale-down): sweep stopped warm instances
  5. feat(runners): boot modes for warm pool instances #5495 feat(runners): boot modes for warm pool instances
  6. feat(runners): add warm_pool option to the root module #5496 feat(runners): add warm_pool option to the root module
  7. feat(multi-runner): support warm_pool in runner configs #5497 feat(multi-runner): support warm_pool in runner configs
  8. docs(warm-pool): add warm pool guide, ADR and examples #5498 docs(warm-pool): add warm pool guide, ADR and examples (this PR)
  9. fix(compute-providers): add warm pool boot modes to the EC2 template #5499 fix(compute-providers): add warm pool boot modes to the EC2 template
  10. feat(runners): warm pool support for Windows runners #5500 feat(runners): warm pool support for Windows runners
  11. fix(scale-down): do not sweep warm instances that are being activated #5501 fix(scale-down): do not sweep warm instances that are being activated
  12. feat(pool): index warm instances and stay within the Spot API budget #5505 feat(pool): index warm instances and stay within the Spot API budget
  13. fix(scale-up): start warm instances before registering them #5506 fix(scale-up): start warm instances before registering them
  14. feat(pool): mark primed warm instances warm on their stop event #5507 feat(pool): mark primed warm instances warm on their stop event

Background

This PR adds a new type of runner pool called "warm runners". These runners are essentially 'stopped' after they booted up and will be booted up again next time there's demand for it. This greatly reduces job start up times as we don't have to rely on cold starts anymore.
I have only ran this in my dev environment so far, and it's working there. Have yet to deploy this to staging for extended testing.

Description

  • ADR-0004 records the design: stopped standby instances owned by the pool lambda, on-demand and persistent spot, lease-based activation in scale-up, and cleanup in the pool and scale-down lambdas.
  • docs/warm-pool.md covers configuration, lifecycle, spot behaviour, metrics, the custom user data requirement, burst tuning and troubleshooting.
  • The multi-runner example gets on-demand and spot warm pool runner configs, and the default example shows the option commented out.

Test Plan

The full stack was deployed to a sandbox AWS account with the multi-runner example (on-demand and spot warm pools, legacy and v2 stacks). Covered: pool fill and refill, warm activation for single jobs and bursts of 5, 10 and 20 jobs with pools of 5, cold fallback for the remainder, drift and max-age eviction, spot interruption, disabling warm mode, and scale-down cleanup, with no leaked persistent spot requests. Warm jobs started in about 65-78 s from dispatch versus 133-198 s for cold runners in the same bursts.

Related Issues

Supersedes #5204.

@github-actions

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

Copilot AI 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.

Copilot review overview

🟡 Changes recommended

The migration command can affect unrelated deployments, and several lifecycle and disabling statements are inaccurate.

Review effort: Balanced
Findings: 4 Low severity

Open (4)
What changed in this PR

Adds warm-pool architecture, configuration, operations, and migration documentation alongside runnable examples.

Changes:

  • Adds a warm-pool guide and ADR.
  • Adds on-demand and spot multi-runner examples.
  • Updates navigation and v1-to-v2 configuration mapping.
File Description
mkdocs.yaml Adds guide and ADR navigation.
examples/​default/​main.tf Shows optional warm-pool configuration.
examples/​multi-runner/​templates/​runner-configs/​linux-x64-warm.yaml Adds an on-demand example.
examples/​multi-runner/​templates/​runner-configs/​linux-x64-warm-spot.yaml Adds a spot example.
docs/​warm-pool.md Documents configuration and operations.
docs/​multi-runner-v1-to-v2-configuration.md Maps the warm-pool setting.
docs/​adr/​0004-warm-pool-standby.md Records the architectural decision.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread docs/warm-pool.md Outdated
Comment thread docs/warm-pool.md Outdated
Comment thread docs/warm-pool.md Outdated
Comment thread docs/warm-pool.md Outdated
@Brend-Smits
Brend-Smits force-pushed the feat/warm-pool-07-terraform-multi-runner branch from 9d1b53c to 3988183 Compare October 1, 2026 12:27
@Brend-Smits
Brend-Smits force-pushed the feat/warm-pool-08-docs-examples branch from 5478b9b to 0a54e0d Compare October 1, 2026 12:27
@Brend-Smits
Brend-Smits force-pushed the feat/warm-pool-07-terraform-multi-runner branch from 3988183 to cf9c2c4 Compare October 1, 2026 12:34
@Brend-Smits
Brend-Smits force-pushed the feat/warm-pool-08-docs-examples branch 2 times, most recently from 61fa750 to a8541cd Compare October 1, 2026 12:35
@Brend-Smits
Brend-Smits force-pushed the feat/warm-pool-07-terraform-multi-runner branch from cf9c2c4 to 35bd24a Compare October 1, 2026 12:35
- ADR-0004 records the design: stopped standby instances owned by the
  pool lambda, on-demand and persistent spot, lease-based activation
  in scale-up and cleanup in the pool and scale-down lambdas.
- docs/warm-pool.md covers configuration, lifecycle, spot behavior,
  metrics, the custom user data requirement, burst tuning and
  troubleshooting.
- The multi-runner example gets on-demand and spot warm pool runner
  configs, and the default example shows the option commented out.

Signed-off-by: Brend Smits <brend.smits@philips.com>
- An activated instance is never parked again, but a non-ephemeral
  runner can run more than one job after activation.
- The activation latency is measured until the runner starts, not until
  it registers.
- Disabling warm mode with a pool_config left in place returns to an
  idle runner pool, which needs GitHub API access and pool_runner_owner.
- The migration drain command only cancels spot requests of the
  deployment's environment instead of every runner spot request in the
  region.
- State that one runner config keeps either idle runners or warm
  instances, and that max_age_hours is a whole number of hours.

Signed-off-by: Brend Smits <brend.smits@philips.com>
Comment thread docs/adr/0004-warm-pool-standby.md Outdated
Comment thread docs/warm-pool.md
Comment thread docs/warm-pool.md Outdated
Comment thread docs/warm-pool.md Outdated
Describe the design constraints in the ADR at a high level instead of
the history of an earlier attempt. Drop the scale-up concurrency
tuning, which applies to any runner config, and the migration steps
for the old preview branch from the warm pool guide.

Signed-off-by: Brend Smits <brend.smits@philips.com>

This branch has not been deployed

No deployments
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