Skip to content

refactor(control-plane): decouple pool tests from EC2 - #5307

Merged
edersonbrilhante merged 1 commit into
mainfrom
refactor-pool-provider-test-boundary
Sep 2, 2026
Merged

edersonbrilhante merged 1 commit into
mainfrom
refactor-pool-provider-test-boundary

Conversation

@edersonbrilhante

Copy link
Copy Markdown
Contributor

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.

@edersonbrilhante
edersonbrilhante requested a review from a team as a code owner August 27, 2026 11:20
@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.

Tested, all looks good. Nice work.

@edersonbrilhante
edersonbrilhante force-pushed the refactor-pool-provider-test-boundary branch from 98230a3 to 4a71056 Compare September 2, 2026 15:40
Base automatically changed from refactor-ec2-runner-operations to main September 2, 2026 16:42
@edersonbrilhante
edersonbrilhante force-pushed the refactor-pool-provider-test-boundary branch from 4a71056 to 7a34de4 Compare September 2, 2026 16:42

@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

@edersonbrilhante
edersonbrilhante merged commit fd123d9 into main Sep 2, 2026
9 checks passed
@edersonbrilhante
edersonbrilhante deleted the refactor-pool-provider-test-boundary branch September 2, 2026 16:46
edersonbrilhante added a commit that referenced this pull request Sep 2, 2026
## Description

Depends on #5307.

Removes EC2-specific assumptions from generic control-plane tests and
the local pool invocation. Scale-up and scale-down test doubles now
model provider capability factories without owning a provider type,
partial creation tests use provider-neutral runner terminology, and pool
events rely on the optional provider type's default behavior.

The scale-up provider-selection test remains as integration coverage,
but asserts the public `defaultComputeProvider` contract instead of the
concrete EC2 value. The provider-type unit tests remain responsible for
the concrete default mapping.

## Test Plan

- Ran the affected scale-up, scale-down, and Lambda wrapper suites: 253
tests passed.
- Ran the complete Lambda Vitest suite: 819 tests passed.
- Ran the control-plane TypeScript type-check.
- Ran ESLint and Prettier checks for all changed files.
- Ran `git diff --check`.
- Verified the four scoped files contain 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