Skip to content

refactor(compute-providers): share EC2 runner operations - #5306

Merged
edersonbrilhante merged 2 commits into
mainfrom
refactor-ec2-runner-operations
Sep 2, 2026
Merged

edersonbrilhante merged 2 commits into
mainfrom
refactor-ec2-runner-operations

Conversation

@edersonbrilhante

Copy link
Copy Markdown
Contributor

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
edersonbrilhante requested a review from a team as a code owner August 27, 2026 10:48
@github-actions

Copy link
Copy Markdown
Contributor

Dependency Review

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

Scanned Files

None

Brend-Smits
Brend-Smits previously approved these changes Sep 2, 2026

@Brend-Smits Brend-Smits 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.

Looks good to me, tested it in our dev environment and confirmed the created_by value is correct.

Base automatically changed from refactor-ec2-provider-isolation to main September 2, 2026 15:40

@stuartp44 stuartp44 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.

LGTM, nice work!

@edersonbrilhante
edersonbrilhante merged commit 809423f into main Sep 2, 2026
12 checks passed
@edersonbrilhante
edersonbrilhante deleted the refactor-ec2-runner-operations branch September 2, 2026 16:42
edersonbrilhante added a commit that referenced this pull request Sep 2, 2026
## Description

Depends on #5306.

Refactors the control-plane pool tests to use the `PoolComputeProvider`
capability boundary instead of importing and mocking the EC2 runner
implementation.

EC2-specific assertions for running-instance filters, busy and booting
runner counts, and the `pool-lambda` source now live in the EC2 pool
provider tests. Generic pool orchestration coverage remains in the
control-plane test.

## Test Plan

- Ran the targeted control-plane pool suite: 17 tests passed.
- Ran the targeted EC2 provider pool suite: 7 tests passed.
- Ran ESLint and Prettier checks for both changed files.
- Ran the control-plane TypeScript type-check.
- Ran `git diff --check` against `refactor-ec2-runner-operations`.
- Verified the generic control-plane pool test contains no EC2
references.

## Related Issues

None.
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.

3 participants