Skip to content

refactor(runners): introduce provider plugin framework - #5234

Open
edersonbrilhante wants to merge 18 commits into
mainfrom
test-runner-provider-framework
Open

refactor(runners): introduce provider plugin framework#5234
edersonbrilhante wants to merge 18 commits into
mainfrom
test-runner-provider-framework

Conversation

@edersonbrilhante

@edersonbrilhante edersonbrilhante commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Description

Introduce a shared runner-provider plugin framework so a provider is enabled once and its webhook, scale-up, scale-down, pool, and runner-resource capabilities are available through one registry facade.

  • Move the EC2 provider implementation into the shared runner-providers library.
  • Add a single provider configuration and capability registry for webhook and control-plane consumers.
  • Add reusable scale-up, scale-down, and pool contract tests that run for every enabled provider lane.
  • Add a provider skeleton that documents the interfaces required to implement another lane.

This reduces the number of control-plane and webhook locations that must be changed when adding a runner provider.

Follow-up work

Some tests still need to move to the control-plane package instead of remaining with the EC2 plugin. The affected files contain groups of tests, so this cleanup requires moving individual test cases rather than relocating an entire block or file. It will be handled in a follow-up PR to keep this refactor reviewable.

This is why some EC2 provider tests currently import from ../../../../../../functions/control-plane. Those dependencies should be removed in the follow-up PR.

Test Plan

  • Ran the runner-providers:test Nx target.
  • Ran the control-plane:test Nx target.
  • Ran Prettier checks for the runner-provider library.
  • Ran ESLint for the runner-provider library.

Related Issues

Follow-up: #5236.

@github-actions

Copy link
Copy Markdown
Contributor

Dependency Review

The following issues were found:
  • ✅ 0 vulnerable package(s)
  • ✅ 0 package(s) with incompatible licenses
  • ✅ 0 package(s) with invalid SPDX license definitions
  • ⚠️ 5 package(s) with unknown licenses.
See the Details below.

License Issues

lambdas/functions/control-plane/package.json

PackageVersionLicenseIssue Type
@aws-github-runner/runner-providersNullUnknown License

lambdas/functions/webhook/package.json

PackageVersionLicenseIssue Type
@aws-github-runner/runner-providersNullUnknown License

lambdas/libs/runner-providers/package.json

PackageVersionLicenseIssue Type
@aws-github-runner/aws-powertools-utilNullUnknown License
@aws-github-runner/aws-ssm-utilNullUnknown License
@aws-sdk/client-ec2^3.1009.0NullUnknown License

OpenSSF Scorecard

Scorecard details
PackageVersionScoreDetails
npm/@aws-github-runner/runner-providers UnknownUnknown
npm/@aws-github-runner/runner-providers UnknownUnknown
npm/@aws-github-runner/aws-powertools-util UnknownUnknown
npm/@aws-github-runner/aws-ssm-util UnknownUnknown
npm/@aws-sdk/client-ec2 ^3.1009.0 UnknownUnknown
npm/@octokit/rest 22.0.1 🟢 7.2
Details
CheckScoreReason
Maintained🟢 1022 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Code-Review⚠️ -1Found no human activity in the last 30 changesets
Binary-Artifacts🟢 10no binaries found in the repo
Security-Policy🟢 9security policy file detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Pinned-Dependencies🟢 6dependency not pinned by hash detected -- score normalized to 6
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
Packaging🟢 10packaging workflow detected
SAST🟢 10SAST tool is run on all commits
npm/aws-sdk-client-mock ^4.1.0 UnknownUnknown
npm/aws-sdk-client-mock-jest ^4.1.0 UnknownUnknown
npm/moment 2.29.4 🟢 4.5
Details
CheckScoreReason
Maintained🟢 57 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 5
Code-Review⚠️ 1Found 4/30 approved changesets -- score normalized to 1
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Packaging⚠️ -1packaging workflow not detected
Security-Policy🟢 10security policy file detected
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Binary-Artifacts🟢 10no binaries found in the repo
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
Fuzzing⚠️ 0project is not fuzzed
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
npm/nock ^14.0.10 UnknownUnknown
npm/yn 3.1.1 🟢 3.9
Details
CheckScoreReason
Code-Review🟢 4Found 12/30 approved changesets -- score normalized to 4
Packaging⚠️ -1packaging workflow not detected
Security-Policy🟢 10security policy file detected
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Binary-Artifacts🟢 10no binaries found in the repo
Maintained⚠️ 00 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
Signed-Releases⚠️ -1no releases found
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0

Scanned Files

  • lambdas/functions/control-plane/package.json
  • lambdas/functions/webhook/package.json
  • lambdas/libs/runner-providers/package.json

@edersonbrilhante
edersonbrilhante marked this pull request as ready for review July 31, 2026 19:36
@edersonbrilhante
edersonbrilhante requested a review from a team as a code owner July 31, 2026 19:36
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