Skip to content

refactor(compute-providers): reuse EC2 runner clients - #5301

Open
edersonbrilhante wants to merge 5 commits into
refactor-control-plane-provider-neutral-testsfrom
refactor-ec2-runner-orchestration-boundary
Open

refactor(compute-providers): reuse EC2 runner clients#5301
edersonbrilhante wants to merge 5 commits into
refactor-control-plane-provider-neutral-testsfrom
refactor-ec2-runner-orchestration-boundary

Conversation

@edersonbrilhante

@edersonbrilhante edersonbrilhante commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Description

Depends on #5308.

Introduces an Ec2RunnerClient that owns a reusable EC2 client and exposes request-bound EC2 runner operations through forRequest({ 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

  • Ran Prettier, ESLint, and the control-plane TypeScript type-check.
  • Ran the complete compute-provider suite: 286 tests passed.
  • Ran the complete control-plane suite: 345 tests passed.
  • Added three runner-client tests covering launch-template lookup with the bound client and request signal, rejection of an already-cancelled request before AWS is called, and isolation between cancelled and active requests sharing one client.
  • Updated pool, scale-up, and scale-down tests to exercise the returned capability methods and their dependency wiring.
  • Ran git diff --check.

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

@edersonbrilhante
edersonbrilhante force-pushed the refactor-ec2-runner-orchestration-boundary branch from fda6bc5 to 3ee6cad Compare August 27, 2026 10:48
@edersonbrilhante edersonbrilhante changed the title refactor(compute-providers): share EC2 runner operations refactor(compute-providers): reuse EC2 runner clients Aug 27, 2026
@edersonbrilhante
edersonbrilhante changed the base branch from refactor-ec2-provider-isolation to refactor-ec2-runner-operations August 27, 2026 10:49
@edersonbrilhante
edersonbrilhante marked this pull request as draft August 27, 2026 10:51
@edersonbrilhante
edersonbrilhante force-pushed the refactor-ec2-runner-orchestration-boundary branch from 3ee6cad to ce667cf Compare August 27, 2026 11:20
@edersonbrilhante
edersonbrilhante changed the base branch from refactor-ec2-runner-operations to refactor-pool-provider-test-boundary August 27, 2026 11:21
@edersonbrilhante
edersonbrilhante force-pushed the refactor-ec2-runner-orchestration-boundary branch 2 times, most recently from af43f2b to e8f4188 Compare August 27, 2026 11:50
@edersonbrilhante
edersonbrilhante marked this pull request as ready for review August 27, 2026 12:12
@edersonbrilhante
edersonbrilhante marked this pull request as draft August 27, 2026 12:13
@edersonbrilhante
edersonbrilhante changed the base branch from refactor-pool-provider-test-boundary to refactor-control-plane-provider-neutral-tests August 27, 2026 13:13
@edersonbrilhante
edersonbrilhante force-pushed the refactor-ec2-runner-orchestration-boundary branch 15 times, most recently from b390b74 to 6f4e8cf Compare August 27, 2026 18:01
@edersonbrilhante
edersonbrilhante force-pushed the refactor-ec2-runner-orchestration-boundary branch from 6f4e8cf to 1f56d9a Compare August 27, 2026 18:08
@edersonbrilhante
edersonbrilhante marked this pull request as ready for review August 27, 2026 18:30
@edersonbrilhante
edersonbrilhante force-pushed the refactor-ec2-runner-orchestration-boundary branch from 1f56d9a to 3d5186e Compare August 27, 2026 21:00
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