Skip to content

feat(scale-set): add service controller - #5300

Draft
edersonbrilhante wants to merge 19 commits into
refactor-ec2-orchestration-supportfrom
feat-scale-set-typescript
Draft

feat(scale-set): add service controller#5300
edersonbrilhante wants to merge 19 commits into
refactor-ec2-orchestration-supportfrom
feat-scale-set-typescript

Conversation

@edersonbrilhante

@edersonbrilhante edersonbrilhante commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Description

Adds the scale-set service controller, GitHub scale-set client library, EC2 scale-set capability, and container build and release workflow.

Builds on the neutral EC2 runner creation result from #5312. This PR owns the scale-set-specific orchestration tags and their validation, adds the explicit scale-set-service runner source, and binds each reconciliation request's abort signal before launch, tag, or terminate work.

Splits the EC2 scale-set logic into configuration, inventory, reconciliation, scale-up, and scale-down contexts, with provider.ts as the public facade and matching context-focused tests.

Aligns message handling with the upstream actions/scaleset listener: acknowledge before job acquisition and reconciliation, treat provider failures after acknowledgement as fatal for that reconciler, and keep transport and session recovery separate. Scale-set consumes neutral failed-instance counts and does not inherit the webhook/SQS retry policy.

Normalizes GitHub and Actions service URL paths with linear scans, avoiding regular-expression denial-of-service risks on uncontrolled input while preserving invalid-path rejection.

Test Plan

  • Compute-provider suite: 21 files, 348 tests passed.
  • Control-plane suite: 14 files, 345 tests passed.
  • GitHub scale-set client: 4 files, 40 tests passed.
  • Scale-set service: 9 files, 67 tests passed.
  • TypeScript type-checks passed for control-plane, GitHub scale-set client, and scale-set service.
  • ESLint and Prettier passed for the changed TypeScript package scopes.
  • The scale-set service NCC bundle completed successfully.
  • git diff --check and pre-commit checks passed.

Related Issues

Depends on #5312.

@edersonbrilhante
edersonbrilhante requested review from a team as code owners August 26, 2026 10:44
@github-actions

github-actions Bot commented Aug 26, 2026

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
  • ⚠️ 3 package(s) with unknown licenses.
See the Details below.

License Issues

lambdas/services/scale-set/package.json

PackageVersionLicenseIssue Type
@aws-github-runner/aws-ssm-utilNullUnknown License
@aws-github-runner/compute-providersNullUnknown License
@aws-github-runner/github-actions-scale-setNullUnknown License

OpenSSF Scorecard

Scorecard details
PackageVersionScoreDetails
actions/actions/attest 1e69f48acb82d1966a394da916b4c1698aa569d6 UnknownUnknown
actions/docker/build-push-action 53b7df96c91f9c12dcc8a07bcb9ccacbed38856a 🟢 7.5
Details
CheckScoreReason
Security-Policy🟢 9security policy file detected
Code-Review🟢 10all changesets reviewed
Maintained🟢 1030 commit(s) and 8 issue activity found in the last 90 days -- score normalized to 10
Binary-Artifacts🟢 10no binaries found in the repo
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration
Packaging🟢 10packaging workflow detected
SAST🟢 9SAST tool detected but not run on all commits
Pinned-Dependencies🟢 7dependency not pinned by hash detected -- score normalized to 7
actions/docker/login-action dbcb813823bdd20940b903addbd779551569679f 🟢 8.6
Details
CheckScoreReason
Code-Review🟢 10all changesets reviewed
Security-Policy🟢 9security policy file detected
Maintained🟢 1030 commit(s) and 3 issue activity found in the last 90 days -- score normalized to 10
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Binary-Artifacts🟢 10no binaries found in the repo
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
License🟢 10license file detected
Fuzzing⚠️ 0project is not fuzzed
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration
Signed-Releases⚠️ -1no releases found
Packaging🟢 10packaging workflow detected
Pinned-Dependencies🟢 6dependency not pinned by hash detected -- score normalized to 6
SAST🟢 10SAST tool is run on all commits
actions/docker/setup-buildx-action 37fe631027851001ddb9b187196cc803df7f5f0e 🟢 8.6
Details
CheckScoreReason
Code-Review🟢 10all changesets reviewed
Maintained🟢 1030 commit(s) and 2 issue activity found in the last 90 days -- score normalized to 10
Security-Policy🟢 9security policy file detected
Binary-Artifacts🟢 10no binaries found in the repo
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration
Signed-Releases⚠️ -1no releases found
Packaging🟢 10packaging workflow detected
Pinned-Dependencies🟢 7dependency not pinned by hash detected -- score normalized to 7
SAST🟢 10SAST tool is run on all commits
actions/docker/setup-qemu-action 96fe6ef7f33517b61c61be40b68a1882f3264fb8 🟢 8.4
Details
CheckScoreReason
Code-Review🟢 10all changesets reviewed
Security-Policy🟢 9security policy file detected
Binary-Artifacts🟢 10no binaries found in the repo
Maintained🟢 1030 commit(s) and 5 issue activity found in the last 90 days -- score normalized to 10
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration
Signed-Releases⚠️ -1no releases found
Pinned-Dependencies🟢 5dependency not pinned by hash detected -- score normalized to 5
SAST🟢 10SAST tool is run on all commits
npm/@aws-sdk/client-ssm ^3.1009.0 UnknownUnknown
npm/@types/node ^22.19.3 UnknownUnknown
npm/typescript ^5.9.3 UnknownUnknown
npm/@aws-github-runner/aws-ssm-util UnknownUnknown
npm/@aws-github-runner/compute-providers UnknownUnknown
npm/@aws-github-runner/github-actions-scale-set UnknownUnknown
npm/@aws-sdk/client-ssm ^3.1009.0 UnknownUnknown
npm/@octokit/auth-app 8.2.0 🟢 6.8
Details
CheckScoreReason
Code-Review🟢 10all changesets reviewed
Security-Policy🟢 9security policy file detected
Maintained🟢 57 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 5
Binary-Artifacts🟢 10no binaries found in the repo
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Pinned-Dependencies🟢 4dependency not pinned by hash detected -- score normalized to 4
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
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/@octokit/request ^9.2.2 UnknownUnknown
npm/@types/node ^22.19.3 UnknownUnknown
npm/@vercel/ncc 0.38.4 🟢 7.4
Details
CheckScoreReason
Maintained🟢 1017 commit(s) and 2 issue activity found in the last 90 days -- score normalized to 10
Packaging⚠️ -1packaging workflow not detected
Code-Review🟢 10all changesets reviewed
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Token-Permissions🟢 9detected GitHub workflow tokens with excessive permissions
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Pinned-Dependencies🟢 3dependency not pinned by hash detected -- score normalized to 3
Binary-Artifacts🟢 10no binaries found in the repo
License🟢 10license file detected
Fuzzing⚠️ 0project is not fuzzed
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration
Security-Policy🟢 10security policy file detected
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
npm/typescript ^5.9.3 UnknownUnknown
npm/undici ^6.19.2 UnknownUnknown
npm/undici 6.28.0 🟢 7.7
Details
CheckScoreReason
Code-Review🟢 10all changesets reviewed
Maintained🟢 1030 commit(s) and 8 issue activity found in the last 90 days -- score normalized to 10
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Dependency-Update-Tool🟢 10update tool detected
Security-Policy🟢 10security policy file detected
Binary-Artifacts🟢 8binaries present in source code
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
License🟢 10license file detected
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Pinned-Dependencies🟢 6dependency not pinned by hash detected -- score normalized to 6
Vulnerabilities⚠️ 011 existing vulnerabilities detected
Packaging🟢 10packaging workflow detected
Fuzzing🟢 10project is fuzzed
Signed-Releases⚠️ -1no releases found
SAST🟢 10SAST tool is run on all commits
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
CI-Tests🟢 1030 out of 30 merged PRs checked by a CI test -- score normalized to 10
Contributors🟢 10project has 63 contributing companies or organizations

Scanned Files

  • .github/workflows/release.yml
  • lambdas/libs/compute-providers/package.json
  • lambdas/libs/github-actions-scale-set/package.json
  • lambdas/services/scale-set/package.json
  • lambdas/yarn.lock

Comment thread lambdas/libs/github-actions-scale-set/src/client.ts Fixed
Comment thread lambdas/libs/github-actions-scale-set/src/client.ts Fixed
Comment thread lambdas/libs/github-actions-scale-set/src/config.ts Fixed
@edersonbrilhante
edersonbrilhante force-pushed the feat-scale-set-typescript branch from 341697e to 3eb2808 Compare August 26, 2026 11:49
@edersonbrilhante
edersonbrilhante changed the base branch from refactor-ec2-provider-isolation to refactor-ec2-runner-orchestration-boundary August 26, 2026 11:49
@edersonbrilhante
edersonbrilhante force-pushed the feat-scale-set-typescript branch from 3eb2808 to 9e47723 Compare August 26, 2026 12:43
@edersonbrilhante
edersonbrilhante marked this pull request as draft August 26, 2026 13:59
@edersonbrilhante
edersonbrilhante force-pushed the refactor-ec2-runner-orchestration-boundary branch 3 times, most recently from af43f2b to e8f4188 Compare August 27, 2026 11:50
@edersonbrilhante
edersonbrilhante force-pushed the feat-scale-set-typescript branch from 6ac6290 to 46d0cd5 Compare August 27, 2026 12:20
@edersonbrilhante
edersonbrilhante changed the base branch from refactor-ec2-runner-orchestration-boundary to refactor-pool-provider-test-boundary August 27, 2026 12:22
@edersonbrilhante
edersonbrilhante force-pushed the feat-scale-set-typescript branch from acf9a55 to 86ecd3a Compare August 27, 2026 19:00
@edersonbrilhante
edersonbrilhante changed the base branch from refactor-pool-provider-test-boundary to refactor-ec2-runner-orchestration-boundary August 27, 2026 19:00
@edersonbrilhante
edersonbrilhante force-pushed the feat-scale-set-typescript branch from 86ecd3a to 98e3f72 Compare August 27, 2026 19:28
@edersonbrilhante
edersonbrilhante changed the base branch from refactor-ec2-runner-orchestration-boundary to refactor-ec2-orchestration-support August 27, 2026 19:28
@edersonbrilhante
edersonbrilhante force-pushed the refactor-ec2-orchestration-support branch from 081e6bf to c452fb1 Compare August 27, 2026 19:59
@edersonbrilhante
edersonbrilhante force-pushed the feat-scale-set-typescript branch from 98e3f72 to 1ace218 Compare August 27, 2026 19:59
@edersonbrilhante
edersonbrilhante force-pushed the refactor-ec2-orchestration-support branch from c452fb1 to 6a5790d Compare August 27, 2026 20:15
@edersonbrilhante
edersonbrilhante force-pushed the feat-scale-set-typescript branch from 1ace218 to dec0ffa Compare August 27, 2026 20:15
@edersonbrilhante
edersonbrilhante force-pushed the refactor-ec2-orchestration-support branch from 6a5790d to 3179711 Compare August 27, 2026 20:35
@edersonbrilhante
edersonbrilhante force-pushed the feat-scale-set-typescript branch from dec0ffa to 652dba7 Compare August 27, 2026 20:35
@edersonbrilhante
edersonbrilhante force-pushed the refactor-ec2-orchestration-support branch 2 times, most recently from 0d1969f to f990720 Compare August 28, 2026 11:03
@edersonbrilhante
edersonbrilhante force-pushed the feat-scale-set-typescript branch from 652dba7 to fb95b1a Compare August 28, 2026 11:13
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.

2 participants