Skip to content

test(scale-set): run service container smoke test - #5375

Merged
edersonbrilhante merged 15 commits into
feat-scale-set-typescript-docs-cifrom
feat-scale-set-image-test
Sep 18, 2026
Merged

edersonbrilhante merged 15 commits into
feat-scale-set-typescript-docs-cifrom
feat-scale-set-image-test

Conversation

@edersonbrilhante

@edersonbrilhante edersonbrilhante commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Description

Add the scale-set service-container smoke test and the ECS/MockServer scale-set lifecycle test on top of the scale-set Terraform wiring.

  • Build the scale-set service image from lambdas/services/scale-set/Dockerfile, push it to a MiniStack ECR repository, and allow the MiniStack account to pull it.
  • Run the controller through its real ECS container entrypoint with a read-only filesystem, dropped capabilities, and no-new-privileges.
  • Configure the scale-set example with the MockServer GitHub App/Actions endpoints and the required SSM-backed GitHub App values.
  • Verify the controller resolves the runner group and scale set, updates labels, creates a session, and reaches a converged state.
  • Start at minRunners = 1, verify MiniStack creates and registers the EC2 runner, then register a new ECS task definition with minRunners = 0 and verify the controller removes the mocked GitHub runner and terminates the EC2 instance.
  • Keep the MockServer protocol fixture deterministic, including dynamic agent-name matching and runner/session cleanup.

The workflow uses MiniStack 1.5.12 and a pinned MockServer image. The scale-set lifecycle integration remains in this PR; PR #5416 provides only the reusable example-fixture support.

Test Plan

  • Full local MiniStack 1.5.12 lifecycle test passed: image build/ECR push, Terraform apply of 272 resources, ECS controller startup, scale-up runner registration, ECS redeployment with minRunners = 0, EC2 runner termination, MockServer session cleanup, and Terraform destroy.
  • sh -n tests/ministack/run-scale-set-integration.sh
  • shellcheck -S warning tests/ministack/run-scale-set-integration.sh
  • python3 -m json.tool mockserver/initializerJson.json
  • terraform fmt -check examples/multi-runner-scale-set/main.tf examples/multi-runner-scale-set/variables.tf
  • git diff --check

Related Issues

Depends on #5347. The Terraform wiring is provided by the scale-set stack beginning at #5350; the example is restored in #5405.

@github-actions

github-actions Bot commented Sep 4, 2026

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 feat-scale-set-typescript-docs-ci branch from 54a8eb3 to 1172732 Compare September 8, 2026 15:29
@edersonbrilhante
edersonbrilhante force-pushed the feat-scale-set-image-test branch from 4a21477 to 2513185 Compare September 8, 2026 15:29
@edersonbrilhante
edersonbrilhante force-pushed the feat-scale-set-typescript-docs-ci branch from 1172732 to cdca4dc Compare September 8, 2026 20:04
@edersonbrilhante
edersonbrilhante force-pushed the feat-scale-set-image-test branch from 2513185 to 14c5a3a Compare September 8, 2026 20:04
@edersonbrilhante
edersonbrilhante force-pushed the feat-scale-set-typescript-docs-ci branch from cdca4dc to d99f1f8 Compare September 8, 2026 20:12
@edersonbrilhante
edersonbrilhante force-pushed the feat-scale-set-image-test branch 2 times, most recently from 1dd5c1a to fe04562 Compare September 8, 2026 20:48
@edersonbrilhante
edersonbrilhante force-pushed the feat-scale-set-typescript-docs-ci branch from 4d9bfd0 to d568ef4 Compare September 10, 2026 16:55
@edersonbrilhante
edersonbrilhante force-pushed the feat-scale-set-image-test branch from fe04562 to 250cf5b Compare September 10, 2026 16:55
@edersonbrilhante
edersonbrilhante force-pushed the feat-scale-set-typescript-docs-ci branch from d568ef4 to aca1a4d Compare September 11, 2026 07:53
@edersonbrilhante
edersonbrilhante force-pushed the feat-scale-set-image-test branch from 250cf5b to e43e206 Compare September 11, 2026 07:53
@edersonbrilhante
edersonbrilhante removed this pull request from stack #5348 September 15, 2026 09:57
@edersonbrilhante
edersonbrilhante added this pull request to stack #5406 September 15, 2026 09:57
@edersonbrilhante
edersonbrilhante removed this pull request from stack #5406 September 15, 2026 13:54
@edersonbrilhante
edersonbrilhante added this pull request to stack #5432 September 15, 2026 13:55
@edersonbrilhante
edersonbrilhante force-pushed the feat-scale-set-typescript-docs-ci branch from aca1a4d to 9f0a3a9 Compare September 15, 2026 13:56
@edersonbrilhante
edersonbrilhante force-pushed the feat-scale-set-image-test branch from e43e206 to d3572ce Compare September 15, 2026 13:56
@edersonbrilhante
edersonbrilhante removed this pull request from stack #5432 September 15, 2026 14:04
@edersonbrilhante
edersonbrilhante added this pull request to stack #5433 September 15, 2026 14:05
@edersonbrilhante
edersonbrilhante force-pushed the feat-scale-set-typescript-docs-ci branch from 9f0a3a9 to f0fc8b1 Compare September 15, 2026 14:06
@edersonbrilhante
edersonbrilhante force-pushed the feat-scale-set-image-test branch from d3572ce to e7904f5 Compare September 15, 2026 14:07
@edersonbrilhante
edersonbrilhante force-pushed the feat-scale-set-typescript-docs-ci branch from f0fc8b1 to 0cda186 Compare September 15, 2026 14:12
@edersonbrilhante
edersonbrilhante force-pushed the feat-scale-set-image-test branch from e7904f5 to 3a541ac Compare September 15, 2026 14:12
@edersonbrilhante
edersonbrilhante removed this pull request from stack #5433 September 15, 2026 14:36
@edersonbrilhante
edersonbrilhante added this pull request to stack #5431 September 15, 2026 14:36
@edersonbrilhante
edersonbrilhante force-pushed the feat-scale-set-typescript-docs-ci branch from 53af972 to 73e4062 Compare September 15, 2026 14:36
@edersonbrilhante
edersonbrilhante force-pushed the feat-scale-set-image-test branch from bbb95ce to 94bb339 Compare September 15, 2026 14:36
@edersonbrilhante
edersonbrilhante force-pushed the feat-scale-set-typescript-docs-ci branch from 73e4062 to f75d003 Compare September 15, 2026 15:08
@edersonbrilhante
edersonbrilhante force-pushed the feat-scale-set-typescript-docs-ci branch from 62187e3 to a8a89d4 Compare September 16, 2026 22:22
@edersonbrilhante
edersonbrilhante force-pushed the feat-scale-set-image-test branch from d84bd7c to 4e96513 Compare September 16, 2026 22:32
@edersonbrilhante
edersonbrilhante removed this pull request from stack #5431 September 17, 2026 14:28
@edersonbrilhante
edersonbrilhante added this pull request to stack #5437 September 17, 2026 14:38
@edersonbrilhante
edersonbrilhante removed this pull request from stack #5437 September 17, 2026 18:20
@edersonbrilhante
edersonbrilhante added this pull request to stack #5441 September 17, 2026 18:41
@edersonbrilhante
edersonbrilhante removed this pull request from stack #5441 September 17, 2026 19:01
@edersonbrilhante
edersonbrilhante added this pull request to stack #5442 September 17, 2026 19:01
@edersonbrilhante
edersonbrilhante removed this pull request from stack #5442 September 17, 2026 21:40
@edersonbrilhante
edersonbrilhante added this pull request to stack #5443 September 18, 2026 10:18
@edersonbrilhante
edersonbrilhante removed this pull request from stack #5443 September 18, 2026 10:19
@edersonbrilhante
edersonbrilhante merged commit 61c058e into feat-scale-set-typescript-docs-ci Sep 18, 2026
@edersonbrilhante
edersonbrilhante deleted the feat-scale-set-image-test branch September 18, 2026 10:26
edersonbrilhante added a commit that referenced this pull request Sep 21, 2026
## Description

Adds the documentation, CI, release, and integration-test support needed
to validate and publish the GitHub Actions scale-set service introduced
by #5300.

This PR includes:

- Dependabot coverage and grouping for GitHub Actions, Lambda
dependencies, the scale-set service container, MiniStack, and
documentation dependencies.
- Lambda CI coverage for formatting, linting, tests, distribution
builds, multi-architecture scale-set container builds, and an isolated
container smoke test. The smoke test runs the image with a read-only
filesystem, dropped capabilities, no-new-privileges, and no network
access, then validates the controller health response.
- A MiniStack ECS/MockServer integration test that builds and pushes the
scale-set image to the local registry, applies the
`multi-runner-scale-set` example, validates the rendered SSM
configuration and ECS task definition, exercises GitHub App and
scale-set protocol requests, verifies runner launch and registration,
changes the minimum capacity to zero, verifies scale-down and
termination, and cleans up the deployment.
- Pinned MockServer expectations and MiniStack fixtures for
installation-token exchange, runner registration, scale-set discovery
and label updates, JIT configuration generation, message-session
creation, polling, and cleanup.
- Release workflow support for publishing the multi-architecture
scale-set service image to GHCR with an SBOM, build provenance, and
registry attestation. Release notes now include the immutable image
digest and attestation information alongside Lambda artifact
attestations.
- Security documentation describing the scale-set image provenance and
the `gh attestation verify` command for production image verification.

## Test Plan

- Lambda CI runs the repository format, lint, test, and build checks and
builds the scale-set image for `linux/amd64` and `linux/arm64`.
- The container smoke test validates the hardened image independently of
AWS or GitHub.
- The MiniStack workflow runs the scale-set ECS/MockServer smoke test
with pinned MiniStack and MockServer versions.
- `git diff --check` and the changed-file scope were verified for this
follow-up branch.

## Related Issues

- Follow-up to #5300.
- Exercises the Terraform scale-set deployment from #5299.
- Includes the scale-set service smoke-test work from #5375.

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Guilherme Caulada <guilherme.caulada@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants