test(aws): replace MinIO and LocalStack with MiniStack in AWS integration tests (backport #8010) - #8012
Open
mergify[bot] wants to merge 1 commit into
Open
Conversation
…tion tests (#8010) * test(aws): replace MinIO and LocalStack with MiniStack in AWS integration tests Every AWS-emulating integration test in the repo depended on an image that is no longer distributed or no longer upgradable: - MinIO's community edition stopped publishing binaries and Docker images in October 2025 and the repository was archived in April 2026. `minio/minio` no longer resolves for an anonymous pull ("pull access denied for minio/minio, repository does not exist"), so the pinned RELEASE.2023-09-04T19-57-37Z tag in kayenta-s3 and clouddriver-aws, and whatever tag Playtika's embedded-minio module selects for kayenta-integration-tests, are all a CI break waiting for a cache miss. - The two LocalStack tests are pinned to localstack/localstack 0.11.3 (2020) and 0.12.18 ("latest as of 1-oct-21") because newer LocalStack moved the services these tests need behind a paid plan, so neither pin can be moved forward. MiniStack (https://github.com/ministackorg/ministack, MIT) covers both roles: S3 for the object-store tests and Secrets Manager for kork-secrets-aws, from one ~74 MB image that needs no account, token, or telemetry. That collapses three emulators into one and removes the 2020/2021 pins. Changes: - spinnaker-dependencies: drop `org.testcontainers:testcontainers-minio:2.0.5`, manage `org.ministack:testcontainers-ministack:0.1.5` instead. The minio module was the only thing pulling Testcontainers 2.x into this build; with it gone, clouddriver-aws and kayenta-s3 resolve the 1.21.4 that spring-boot-dependencies manages for every other module (verified with dependencyInsight). - kork-secrets-aws, clouddriver-artifacts-s3: LocalStack -> MiniStack. - kayenta-s3, clouddriver-aws: MinIO -> MiniStack. The clouddriver test is renamed AmazonS3DataProviderMinioTest -> AmazonS3DataProviderMiniStackTest. - kayenta-integration-tests: Playtika's embedded-minio bootstrap module is replaced by EmbeddedMiniStackBootstrapConfiguration, following the shape of the existing EmbeddedPrometheusBootstrapConfiguration in the same package. It publishes `embedded.ministack.{endpoint,region,accessKey,secretKey}` during the bootstrap phase, which application-base.yml binds into the kayenta AWS account. Intentional behavior changes: - The kayenta integration-test account is renamed `minio-store-account` -> `s3-store-account`, since it no longer names the emulator behind it. - That account now sets `region` explicitly (from the container) rather than relying on the SDK's region provider chain. - The image tag is pinned in each test rather than shared: MiniStackContainer's no-arg constructor resolves `latest` and the emulator releases weekly, so the tag is the only thing fixing the version under test. The five copies live in three separate composite builds (kork, clouddriver, kayenta); centralizing them would mean giving every kork-test consumer a Testcontainers/MiniStack dependency for one string. MiniStack's S3 is account-scoped but not yet region-scoped (`AccountScopedDict` rather than `AccountRegionScopedDict` in its services/s3.py), so a bucket created in one region stays visible to a client configured for another. No test here asserts cross-region rejection, and bucket names are globally unique on real S3 anyway, so this does not affect the migrated assertions. * test(aws): drop leftover MinIO naming from fixtures and the kayenta example Follow-up to the MiniStack migration: the emulator dependencies were all replaced, but MinIO survived in strings that had nothing to do with the emulator. None of these exercise MinIO; they just named it. - kork-secrets-gcp GoogleSecretsManagerSecretEngineTest: the fixture secret `minioAccessKeyId`/`minioadmin` becomes `objectStoreAccessKeyId`/ `object-store-admin`. The test covers the Google secrets engine; the payload is arbitrary. - front50-s3 S3ClientFactoryTest: the custom endpoint under test becomes `https://s3-compatible-host:9000`, which is what the assertion is actually about (a non-AWS endpoint plus an explicit region). - examples/solutions/kayenta: the example storage account `kayenta-minio` becomes `kayenta-s3` in both pipeline definitions and the automated-canary script, so the example names the storage type rather than one implementation. Readers following the guide name this account themselves; the repo's only constraint is that the three files agree. The one remaining mention is the javadoc on EmbeddedMiniStackBootstrapConfiguration explaining which module it replaced, which is the rationale for the class existing. * test(aws): keep the kayenta example's storage account name; fix a comment Review follow-ups: - Revert `kayenta-s3` back to `kayenta-minio` in the kayenta example pipelines and automated-canary.sh. That account is provisioned by the external GCP tutorial the example targets, not by anything in this repo (setup.sh installs Spinnaker from quick-install.yml and defines no canary storage account), so renaming it here only made the example disagree with the tutorial. - The spinnaker-dependencies comment pointed at `MINISTACK_IMAGE`; the constant in the tests is `MINISTACK_IMAGE_TAG`. --------- Co-authored-by: Claude <noreply@anthropic.com> (cherry picked from commit ad69f46) # Conflicts: # clouddriver/clouddriver-aws/clouddriver-aws.gradle # clouddriver/clouddriver-aws/src/test/java/com/netflix/spinnaker/clouddriver/aws/provider/view/AmazonS3DataProviderMiniStackTest.java # kayenta/kayenta-s3/kayenta-s3.gradle # kayenta/kayenta-s3/src/test/java/com/netflix/kayenta/s3/storage/S3StorageServiceIntegrationTest.java # kork/kork-secrets-aws/src/test/java/com/netflix/spinnaker/kork/secrets/engines/SecretsManagerSecretEngineIntegrationTest.java # kork/spinnaker-dependencies/spinnaker-dependencies.gradle
Contributor
Author
|
Cherry-pick of ad69f46 has failed: To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
7 tasks
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.
Summary
The AWS-emulating integration tests run on three different emulators, two of which are on dead ends:
quay.io/minio/minio, which works today — but it is MinIO's own registry for a project that no longer ships releases, so the tags will never move again and there is no upstream to fix anything.0.11.3(2020) inkork-secrets-awsand0.12.18("latest as of 1-oct-21") inclouddriver-artifacts-s3, untouched by fix(tests): Tests using dockerhub images from minio which were removed. #8001, and unupgradable because newer LocalStack moved these services behind a paid plan.This consolidates all of it onto MiniStack (MIT, ~74 MB, no account or token): S3 for the object-store tests, Secrets Manager for
kork-secrets-aws. One maintained emulator instead of three images, two of which nobody publishes anymore.Builds on #8001 rather than reverting it — that fix bought CI time, this removes the dependency it was patching.
Changes
spinnaker-dependenciesorg.testcontainers:testcontainers-minio:2.0.5org.ministack:testcontainers-ministack:0.1.5kork-secrets-awsclouddriver-artifacts-s3clouddriver-aws…MinioTest→…MiniStackTest)kayenta-s3kayenta-integration-testsembedded-minio+embedded.minio.dockerImageEmbeddedMiniStackBootstrapConfigurationTwo things worth a reviewer's attention:
testcontainers-minio:2.0.5was the only thing pulling Testcontainers 2.x into the build, leavingclouddriver-awsandkayenta-s3on a different core version from every other module. They now resolve the 1.21.4 thatspring-boot-dependenciesmanages (verified withdependencyInsight).MiniStackContainer's no-arg constructor resolveslatest, so the tag is the only thing fixing the version under test. The copies live in three separate composite builds; centralizing them would mean giving everykork-testconsumer a Testcontainers dependency for one string. Happy to move it intokork-testif you'd prefer that trade.Also renamed the kayenta integration-test account
minio-store-account→s3-store-account(it no longer names the emulator behind it) and set itsregionexplicitly from the container. A separate commit clears leftover MinIO naming out of two unrelated fixtures (GoogleSecretsManagerSecretEngineTest,S3ClientFactoryTest); those never ran MinIO, they just named it. Theexamples/solutions/kayentaaccount name is deliberately left alone — it is provisioned by the external tutorial, not by this repo.Test plan
Locally against MiniStack 1.5.10 (JDK 17, Docker), re-run after merging
main::kork:kork-secrets-aws:test --tests '*SecretsManagerSecretEngineIntegrationTest*'— 1 test, 0 failures:kayenta:kayenta-s3:test --tests '*S3StorageServiceIntegrationTest*'— 5 tests, 0 failures:clouddriver:clouddriver-aws:test --tests '*AmazonS3DataProviderMiniStackTest*'— 4 tests, 0 failures:clouddriver:clouddriver-artifacts:clouddriver-artifacts-s3:test— 16 tests, 0 failures:kayenta:kayenta-integration-tests:test— Management, Swagger, and both Prometheus canary cases pass (Graphite is@Disabledonmain):kork:kork-secrets-gcp:test,:front50:front50-s3:test— for the renamed fixturesspotlessCheckon kork, clouddriver, kayenta, front50CI is green on this branch: 27/27 checks, including all 12 service builds, the clouddriver k8s matrix, and the Kayenta integration workflow.
This is an automatic backport of pull request #8010 done by Mergify.