Skip to content

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

Open
edersonbrilhante wants to merge 4 commits into
refactor-ec2-provider-isolationfrom
refactor-ec2-runner-orchestration-boundary
Open

refactor(compute-providers): share EC2 runner operations#5301
edersonbrilhante wants to merge 4 commits into
refactor-ec2-provider-isolationfrom
refactor-ec2-runner-orchestration-boundary

Conversation

@edersonbrilhante

@edersonbrilhante edersonbrilhante commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Description

Moves shared EC2 runner operations and types out of the control-plane directory so they can be reused by multiple orchestration providers. RunnerSource is required at the caller boundary, preserving the existing scale-up-lambda and pool-lambda values, and both EC2 launch paths use that source for ghr:created_by.

Introduces an Ec2RunnerClient that owns the durable EC2 and SSM clients. Callers bind request state with forRequest({ signal }), allowing the module-scoped control-plane provider to reuse AWS clients across warm Lambda invocations without sharing cancellation state between invocations. The bound operations are passed through scale-up, scale-down, pool, runner configuration, and dynamic-label launch-template lookup instead of using a dependency bag or parameter callback.

AMI values read from SSM are requested with decryption, validated as EC2 AMI IDs, and never logged.

Test Plan

  • Compute-provider tests passed: 13 files, 283 tests.
  • Control-plane tests passed: 14 files, 348 tests.
  • TypeScript type-checks passed for compute providers and control plane.
  • ESLint and Prettier checks passed for both affected projects.
  • The control-plane NCC bundle completed successfully.
  • git diff --check and pre-commit checks passed.

Related Issues

None.

@edersonbrilhante
edersonbrilhante requested a review from a team as a code owner August 26, 2026 11:22
@github-actions

Copy link
Copy Markdown
Contributor

Dependency Review

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

Scanned Files

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.

1 participant