test(ministack): cover scale-set controller integration - #5416
Closed
edersonbrilhante wants to merge 54 commits into
Closed
edersonbrilhante wants to merge 54 commits into
edersonbrilhante wants to merge 54 commits into
Conversation
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
edersonbrilhante
added this pull request to stack #5406
September 11, 2026 17:47
edersonbrilhante
force-pushed
the
feat-scale-set-example-followup
branch
3 times, most recently
from
September 15, 2026 09:53
cb70e66 to
3bf4b05
Compare
edersonbrilhante
force-pushed
the
test-scale-set-integration
branch
from
September 15, 2026 09:58
beac2d7 to
b0b79c7
Compare
edersonbrilhante
marked this pull request as ready for review
September 15, 2026 09:59
edersonbrilhante
force-pushed
the
feat-scale-set-example-followup
branch
2 times, most recently
from
September 15, 2026 13:49
9bc003c to
21edd38
Compare
edersonbrilhante
force-pushed
the
test-scale-set-integration
branch
from
September 15, 2026 13:51
67513ac to
3b48adb
Compare
edersonbrilhante
removed this pull request from stack #5406
September 15, 2026 13:54
edersonbrilhante
added this pull request to stack #5431
September 15, 2026 13:55
edersonbrilhante
force-pushed
the
feat-scale-set-example-followup
branch
from
September 15, 2026 13:59
486be9f to
4f05336
Compare
edersonbrilhante
force-pushed
the
test-scale-set-integration
branch
from
September 15, 2026 14:00
fbb6ed3 to
c423df2
Compare
edersonbrilhante
force-pushed
the
feat-scale-set-example-followup
branch
from
September 15, 2026 14:02
4f05336 to
edd0ab7
Compare
edersonbrilhante
force-pushed
the
test-scale-set-integration
branch
from
September 15, 2026 14:02
c423df2 to
f97bc8c
Compare
edersonbrilhante
force-pushed
the
feat-scale-set-example-followup
branch
from
September 15, 2026 14:10
edd0ab7 to
77bce9f
Compare
edersonbrilhante
force-pushed
the
test-scale-set-integration
branch
from
September 15, 2026 14:11
f97bc8c to
da79830
Compare
edersonbrilhante
force-pushed
the
feat-scale-set-example-followup
branch
from
September 15, 2026 14:36
75343a9 to
274a43b
Compare
edersonbrilhante
force-pushed
the
test-scale-set-integration
branch
from
September 15, 2026 14:36
50113c5 to
9e12e90
Compare
edersonbrilhante
force-pushed
the
feat-scale-set-example-followup
branch
from
September 15, 2026 15:35
274a43b to
f940ee5
Compare
edersonbrilhante
force-pushed
the
test-scale-set-integration
branch
from
September 15, 2026 15:35
2829395 to
8110df5
Compare
edersonbrilhante
force-pushed
the
feat-scale-set-example-followup
branch
from
September 15, 2026 17:58
f940ee5 to
c5bb223
Compare
edersonbrilhante
force-pushed
the
test-scale-set-integration
branch
from
September 15, 2026 17:58
8110df5 to
b558fd7
Compare
edersonbrilhante
force-pushed
the
feat-scale-set-example-followup
branch
from
September 15, 2026 18:36
c5bb223 to
a602f6e
Compare
edersonbrilhante
force-pushed
the
test-scale-set-integration
branch
from
September 15, 2026 18:36
b558fd7 to
0b8c717
Compare
edersonbrilhante
force-pushed
the
feat-scale-set-example-followup
branch
from
September 17, 2026 15:20
895a0a9 to
32f4393
Compare
edersonbrilhante
force-pushed
the
feat-scale-set-example-followup
branch
from
September 17, 2026 17:24
20e7a80 to
6b419fb
Compare
edersonbrilhante
force-pushed
the
feat-scale-set-example-followup
branch
from
September 17, 2026 18:20
238c0bc to
5fa47cd
Compare
edersonbrilhante
removed this pull request from stack #5437
September 17, 2026 18:20
edersonbrilhante
changed the base branch from
feat-scale-set-example-followup
to
main
September 17, 2026 18:25
edersonbrilhante
added a commit
that referenced
this pull request
Sep 18, 2026
## 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. --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Guilherme Caulada <guilherme.caulada@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add reusable MiniStack fixture support for the
multi-runner-scale-setexample in the standard Terraform/OpenTofu lifecycle matrix.tests/ministack/README.md.tests/ministack/run-example.shto initialize, apply, and destroy the scale-set example.This PR owns the generic example-fixture and lifecycle-harness support. The ECS controller, ECR image, MockServer protocol, runner registration, and scale-up/scale-down lifecycle smoke test are kept in PR #5375.
Test Plan
sh -n tests/ministack/run-example.shshellcheck tests/ministack/run-example.shRelated Issues
Depends on #5405. The controller lifecycle smoke test is in #5375.