Repository navigation
refactor(compute-providers): reuse EC2 runner clients - #5301
Merged
edersonbrilhante merged 5 commits intoSep 2, 2026
Merged
Conversation
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
edersonbrilhante
force-pushed
the
refactor-ec2-runner-orchestration-boundary
branch
from
August 27, 2026 10:48
fda6bc5 to
3ee6cad
Compare
edersonbrilhante
changed the base branch from
refactor-ec2-provider-isolation
to
refactor-ec2-runner-operations
August 27, 2026 10:49
edersonbrilhante
marked this pull request as draft
August 27, 2026 10:51
edersonbrilhante
force-pushed
the
refactor-ec2-runner-orchestration-boundary
branch
from
August 27, 2026 11:20
3ee6cad to
ce667cf
Compare
edersonbrilhante
changed the base branch from
refactor-ec2-runner-operations
to
refactor-pool-provider-test-boundary
August 27, 2026 11:21
edersonbrilhante
force-pushed
the
refactor-ec2-runner-orchestration-boundary
branch
2 times, most recently
from
August 27, 2026 11:50
af43f2b to
e8f4188
Compare
edersonbrilhante
marked this pull request as ready for review
August 27, 2026 12:12
edersonbrilhante
marked this pull request as draft
August 27, 2026 12:13
edersonbrilhante
changed the base branch from
refactor-pool-provider-test-boundary
to
refactor-control-plane-provider-neutral-tests
August 27, 2026 13:13
edersonbrilhante
force-pushed
the
refactor-ec2-runner-orchestration-boundary
branch
15 times, most recently
from
August 27, 2026 18:01
b390b74 to
6f4e8cf
Compare
edersonbrilhante
force-pushed
the
refactor-ec2-runner-orchestration-boundary
branch
from
August 27, 2026 21:00
1f56d9a to
3d5186e
Compare
edersonbrilhante
force-pushed
the
refactor-ec2-runner-orchestration-boundary
branch
from
August 28, 2026 11:03
3d5186e to
6857f95
Compare
Brend-Smits
previously approved these changes
Sep 2, 2026
Brend-Smits
left a comment
Contributor
There was a problem hiding this comment.
Tested it locally and all is good, working as expected.
edersonbrilhante
force-pushed
the
refactor-ec2-runner-orchestration-boundary
branch
from
September 2, 2026 15:40
6857f95 to
ac1bd03
Compare
edersonbrilhante
added a commit
that referenced
this pull request
Sep 2, 2026
## Description Moves the shared EC2 runner implementation and types out of the control-plane directory and exposes them through the EC2 provider package boundary so multiple orchestration entry points can use the same runner operations. Requires callers to provide a `RunnerSource`, preserving the existing `scale-up-lambda` and `pool-lambda` values. Both EC2 launch paths now use that caller-provided source for the `ghr:created_by` tag. PR #5301 is the follow-up and will be stacked on this PR. ## Test Plan - Ran ESLint for the compute-provider and control-plane projects. - Ran the Lambda Vitest suite: 50 test files and 819 tests passed. - Ran `git diff --check` against `refactor-ec2-provider-isolation`. ## Related Issues None.
edersonbrilhante
force-pushed
the
refactor-ec2-runner-orchestration-boundary
branch
from
September 2, 2026 16:42
ac1bd03 to
52cb98b
Compare
edersonbrilhante
force-pushed
the
refactor-ec2-runner-orchestration-boundary
branch
from
September 2, 2026 16:46
52cb98b to
9a1d2a7
Compare
Base automatically changed from
refactor-control-plane-provider-neutral-tests
to
main
September 2, 2026 16:53
edersonbrilhante
force-pushed
the
refactor-ec2-runner-orchestration-boundary
branch
from
September 2, 2026 16:53
9a1d2a7 to
09668c8
Compare
stuartp44
reviewed
Sep 2, 2026
stuartp44
approved these changes
Sep 2, 2026
edersonbrilhante
deleted the
refactor-ec2-runner-orchestration-boundary
branch
September 2, 2026 17:09
edersonbrilhante
added a commit
that referenced
this pull request
Sep 2, 2026
## Description Separates the result returned by shared EC2 runner creation from the control-plane `CreateRunnerResult` contract. `createEc2Runner()` and `Ec2RunnerResourceOperations.create()` now return `Ec2RunnerCreateResult`, containing created instance IDs, the failed-instance count, and bounded AWS failure identifiers. The control-plane adapter converts that result into its existing `CreateRunnerResult` and applies retryable or non-retryable classification using `scaleErrors`. The core contract and existing pool and scale-up behavior remain unchanged. ## Test Plan - Compute-provider suite: 14 files, 295 tests passed. - Control-plane suite: 14 files, 345 tests passed. - Control-plane TypeScript type-check passed. - ESLint and Prettier passed for changed EC2 TypeScript files. - `git diff --check` and pre-commit checks passed. ## Related Issues Depends on #5301.
edersonbrilhante
added a commit
that referenced
this pull request
Sep 3, 2026
## Description Clarifies the partial runner creation test name so it explicitly states that non-retryable failures are not retried, while keeping the terminology provider-neutral. This addresses the same review suggestion raised in the stacked PR discussions for [#5308](#5308 (comment)) and [#5301](#5301 (comment)). ## Test Plan - Ran the focused control-plane scale-up suite: 113 tests passed. - Ran Prettier for the changed file. - Ran `git diff --check`. - Repository pre-commit hooks passed. ## Related Issues Related to #5338
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.
Description
Depends on #5308.
Introduces an
Ec2RunnerClientthat owns a reusable EC2 client and exposes request-bound EC2 runner operations throughforRequest({ signal }). The control-plane registry creates the client once for the warm Lambda execution environment, and the pool, scale-up, and scale-down capabilities share those operations while keeping cancellation scoped to each request.The EC2 capability boundary now distinguishes resource operations from provisioning operations, uses consistent capability naming, and removes the legacy default-operation wrappers. Launch-template block-device lookup uses the same bound EC2 client, and runner creation is named separately from runner configuration.
Test Plan
git diff --check.Related Issues
None.