Skip to content

test(control-plane): separate orchestration tests from EC2 provider tests - #5246

Merged
edersonbrilhante merged 1 commit into
mainfrom
test-separate-control-plane-provider-tests
Aug 12, 2026
Merged

test(control-plane): separate orchestration tests from EC2 provider tests#5246
edersonbrilhante merged 1 commit into
mainfrom
test-separate-control-plane-provider-tests

Conversation

@edersonbrilhante

Copy link
Copy Markdown
Contributor

Description

  • Move generic scale-up and scale-down orchestration tests from the EC2 provider package into the control-plane package.
  • Test orchestration through the runner-provider interfaces and registry.
  • Keep EC2 resource operations and dynamic configuration coverage beside the EC2 provider.
  • Remove direct EC2 provider test imports and mocks of control-plane modules.

Production behavior is unchanged.

Test Plan

  • cd lambdas && yarn test (all 8 projects passed)
  • Focused control-plane suites: 226 tests passed
  • Focused EC2 provider suites: 158 tests passed
  • ESLint and Prettier checks passed for control-plane and runner-providers
  • Exact test-title inventory: 276 before and after, with no additions or removals
  • git diff --check

Related Issues

Closes #5236

Follow-up to #5234

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Dependency Review

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

Scanned Files

None

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

LGTM! Way easier to consume now. Great work! :rocket:

@edersonbrilhante
edersonbrilhante merged commit e45602b into main Aug 12, 2026
9 checks passed
@edersonbrilhante
edersonbrilhante deleted the test-separate-control-plane-provider-tests branch August 12, 2026 20:29
edersonbrilhante added a commit that referenced this pull request Aug 12, 2026
## Description

- Define the provider-neutral `RunnerType`, `RunnerInfo`,
`ListRunnerFilters`, and `CreateRunnerResult` contracts in
runner-provider core.
- Use one `RunnerInfo` shape across control-plane and EC2, with `id`,
`githubRunnerId`, and required `owner` and `type` fields.
- Keep EC2-specific inputs and the EC2 status-filter extension in
`runners.d.ts`.
- Consolidate control-plane type re-exports in `scale-runners/types.ts`
and remove the redundant scale-up and scale-down provider type shims.
- Update the existing tests in place without adding or removing test
cases.

### Compatibility note

This PR intentionally normalizes the exported `listEC2Runners` result
fields from `instanceId`/`runnerId` to `id`/`githubRunnerId` and removes
the legacy core type aliases. This differs from the compatibility
approach initially described in #5247 and is included explicitly for
review.

## Test Plan

- `cd lambdas && NX_DAEMON=false yarn test` (all 8 projects passed)
- Control-plane suite: 14 test files / 326 tests passed
- Runner-provider suite: 10 test files / 270 tests passed
- Focused scale-down contract, EC2 listing, and pool tests passed after
the final type tightening
- ESLint and Prettier passed for control-plane and runner-providers
- Exact test-title inventory: 276 before and after, with no additions or
removals
- `git diff --check`

Local TypeScript build validation remains blocked by the installed
`@aws-sdk/client-ec2` declarations missing exports used throughout the
existing EC2 sources; the same environment issue affects untouched code.

## Related Issues

Closes #5247

Stacked on #5246
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.

test(control-plane): separate orchestration tests from EC2 provider tests

2 participants