feat(runners): warm pool support for Windows runners - #5500
Open
Brend-Smits wants to merge 2 commits into
Open
Brend-Smits wants to merge 2 commits into
Brend-Smits wants to merge 2 commits into
Conversation
This was referenced Sep 30, 2026
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Boot-hook installation failures can currently be ignored, allowing unusable Windows instances to enter the warm pool.
Review effort: Balanced
Findings: 2
Open (2)
What changed in this PR
Adds Windows runner support to the existing EC2 warm-pool lifecycle.
Changes:
- Adds Windows RUN, PRIME, and WAIT boot modes using a startup scheduled task.
- Allows Windows warm pools while continuing to reject macOS.
- Adds PowerShell tests and updates documentation.
| File | Description |
|---|---|
variables.tf |
Documents Windows support. |
README.md |
Updates root module documentation. |
modules/runners/warm-pool.tf |
Allows Windows runners. |
modules/runners/variables.tf |
Updates warm-pool description. |
modules/runners/tests/warm-pool.tftest.hcl |
Tests Windows and macOS validation. |
modules/runners/templates/tests/start-runner.test.ps1 |
Tests Windows boot modes. |
modules/runners/templates/start-runner.ps1 |
Implements the Windows boot hook. |
modules/runners/README.md |
Documents Windows support. |
modules/runner-config/variables.orchestration-provider.tf |
Updates provider documentation. |
modules/runner-config/README.md |
Regenerates provider documentation. |
modules/multi-runner/variables.tf |
Updates multi-runner documentation. |
modules/multi-runner/README.md |
Regenerates multi-runner documentation. |
modules/compute-providers/aws/ec2/validations.tf |
Allows Windows warm pools. |
modules/compute-providers/aws/ec2/tests/warm-pool.tftest.hcl |
Tests provider validation. |
modules/compute-providers/aws/ec2/templates/start-runner.ps1 |
Adds the v2 Windows boot hook. |
docs/warm-pool.md |
Documents Windows behavior. |
docs/configuration.md |
Explains Windows scheduled-task boot hooks. |
docs/adr/0004-warm-pool-standby.md |
Records expanded OS support. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Brend-Smits
force-pushed
the
feat/warm-pool-09-v2-boot-modes
branch
from
October 1, 2026 12:27
2826d9a to
e96c4d8
Compare
Brend-Smits
force-pushed
the
feat/warm-pool-10-windows
branch
from
October 1, 2026 12:27
49c44f1 to
4f938c4
Compare
Brend-Smits
force-pushed
the
feat/warm-pool-09-v2-boot-modes
branch
from
October 1, 2026 12:34
e96c4d8 to
1b09c78
Compare
Brend-Smits
force-pushed
the
feat/warm-pool-10-windows
branch
from
October 1, 2026 12:34
4f938c4 to
07f4766
Compare
Brend-Smits
force-pushed
the
feat/warm-pool-09-v2-boot-modes
branch
from
October 1, 2026 12:35
1b09c78 to
e4e05cb
Compare
Brend-Smits
force-pushed
the
feat/warm-pool-10-windows
branch
2 times, most recently
from
October 1, 2026 13:43
8213258 to
c78bdee
Compare
Brend-Smits
force-pushed
the
feat/warm-pool-09-v2-boot-modes
branch
from
October 1, 2026 13:43
e4e05cb to
6ff50e8
Compare
Brend-Smits
marked this pull request as ready for review
October 1, 2026 13:59
Windows runners get the same RUN, PRIME and WAIT boot modes as Linux. EC2Launch runs user data only on the first boot, so a priming instance copies the start logic between the start-runner markers out of its user data (read from instance metadata) and registers a `ghr-start-runner` scheduled task that runs it as SYSTEM at startup. The priming shutdown is delayed by 60 seconds so EC2Launch records the user data as completed and does not run it again. An activated instance disables the task, so later reboots do not rerun the start logic, and logs the time from activation to runner start. Both Terraform stacks now accept warm pools for linux and windows runners and still reject macOS. Adds a pwsh harness for the Windows boot modes that also checks both template copies stay identical. Signed-off-by: Brend Smits <brend.smits@philips.com>
User data runs with ErrorActionPreference Continue, so a failure to write the hook script or register the startup task was ignored and the instance parked without a working hook. Hook persistence and task registration now stop on errors, and priming only shuts down once the task exists. Otherwise the instance keeps running and the pool evicts it as stuck priming. Signed-off-by: Brend Smits <brend.smits@philips.com>
Brend-Smits
force-pushed
the
feat/warm-pool-10-windows
branch
from
October 1, 2026 14:26
c78bdee to
52b02df
Compare
Brend-Smits
force-pushed
the
feat/warm-pool-09-v2-boot-modes
branch
from
October 1, 2026 14:27
6ff50e8 to
0d16875
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Warm pool stack (review in order; each PR is based on the previous one):
Description
Windows runners get the same RUN, PRIME and WAIT boot modes as Linux.
ghr:start-runnermarkers out of its user data (read from instance metadata) toC:\ProgramData\ghr\start-runner.ps1and registers aghr-start-runnerscheduled task that runs it as SYSTEM at startup.linuxandwindowsrunners and still rejectosx. Docs and the ADR are updated.Test Plan
modules/runners/templates/tests/start-runner.test.ps1(37 checks: RUN, WAIT, PRIME, activated boot from the startup task, missing markers, and a check that both template copies match).terraform testfor the warm pool tests inmodules/runnersandmodules/compute-providers/aws/ec2(Windows plans, macOS is rejected),modules/multi-runnerandmodules/runner-config.examples/multi-runnerwith warm mode on the Windows Server 2022 config: the instance primed and stopped itself about 10 minutes after launch; a job later activated it, the startup task ran it in RUN mode, and the job started 95 s after dispatch (activation to runner start 64 s) instead of a full Windows cold boot.Related Issues
Supersedes #5204.