Skip to content

test(aws): replace MinIO and LocalStack with MiniStack in AWS integration tests (backport #8010) - #8012

Open
mergify[bot] wants to merge 1 commit into
release-2026.2.xfrom
mergify/bp/release-2026.2.x/pr-8010
Open

test(aws): replace MinIO and LocalStack with MiniStack in AWS integration tests (backport #8010)#8012
mergify[bot] wants to merge 1 commit into
release-2026.2.xfrom
mergify/bp/release-2026.2.x/pr-8010

Conversation

@mergify

@mergify mergify Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Summary

The AWS-emulating integration tests run on three different emulators, two of which are on dead ends:

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

Module Before After
spinnaker-dependencies org.testcontainers:testcontainers-minio:2.0.5 org.ministack:testcontainers-ministack:0.1.5
kork-secrets-aws LocalStack 0.11.3 MiniStack 1.5.10
clouddriver-artifacts-s3 LocalStack 0.12.18 MiniStack 1.5.10
clouddriver-aws MinIO via Quay (test renamed …MinioTest…MiniStackTest) MiniStack 1.5.10
kayenta-s3 MinIO via Quay MiniStack 1.5.10
kayenta-integration-tests Playtika embedded-minio + embedded.minio.dockerImage new EmbeddedMiniStackBootstrapConfiguration

Two things worth a reviewer's attention:

  1. Testcontainers drops back to 1.21.4. testcontainers-minio:2.0.5 was the only thing pulling Testcontainers 2.x into the build, leaving clouddriver-aws and kayenta-s3 on a different core version from every other module. They now resolve the 1.21.4 that spring-boot-dependencies manages (verified with dependencyInsight).
  2. The image tag is pinned per test, in five places. MiniStackContainer's no-arg constructor resolves latest, 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 every kork-test consumer a Testcontainers dependency for one string. Happy to move it into kork-test if you'd prefer that trade.

Also renamed the kayenta integration-test account minio-store-accounts3-store-account (it no longer names the emulator behind it) and set its region explicitly 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. The examples/solutions/kayenta account 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 @Disabled on main)
  • :kork:kork-secrets-gcp:test, :front50:front50-s3:test — for the renamed fixtures
  • spotlessCheck on kork, clouddriver, kayenta, front50

CI 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.

…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
@mergify

mergify Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor Author

Cherry-pick of ad69f46 has failed:

On branch mergify/bp/release-2026.2.x/pr-8010
Your branch is up to date with 'origin/release-2026.2.x'.

You are currently cherry-picking commit ad69f46.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   clouddriver/clouddriver-artifacts/clouddriver-artifacts-s3/clouddriver-artifacts-s3.gradle
	modified:   clouddriver/clouddriver-artifacts/clouddriver-artifacts-s3/src/test/java/com/netflix/spinnaker/clouddriver/artifacts/s3/S3ArtifactCredentialsTest.java
	modified:   front50/front50-s3/src/test/java/com/netflix/spinnaker/front50/config/S3ClientFactoryTest.java
	modified:   kayenta/kayenta-integration-tests/kayenta-integration-tests.gradle
	new file:   kayenta/kayenta-integration-tests/src/test/java/com/netflix/kayenta/configuration/EmbeddedMiniStackBootstrapConfiguration.java
	modified:   kayenta/kayenta-integration-tests/src/test/java/com/netflix/kayenta/tests/standalone/PrometheusStandaloneCanaryAnalysisTest.java
	modified:   kayenta/kayenta-integration-tests/src/test/resources/META-INF/spring.factories
	modified:   kayenta/kayenta-integration-tests/src/test/resources/application-base.yml
	modified:   kork/kork-secrets-aws/kork-secrets-aws.gradle
	modified:   kork/kork-secrets-gcp/src/test/java/com/netflix/spinnaker/kork/secrets/engines/GoogleSecretsManagerSecretEngineTest.java

Unmerged paths:
  (use "git add/rm <file>..." as appropriate to mark resolution)
	both modified:   clouddriver/clouddriver-aws/clouddriver-aws.gradle
	deleted by us:   clouddriver/clouddriver-aws/src/test/java/com/netflix/spinnaker/clouddriver/aws/provider/view/AmazonS3DataProviderMiniStackTest.java
	both modified:   kayenta/kayenta-s3/kayenta-s3.gradle
	deleted by us:   kayenta/kayenta-s3/src/test/java/com/netflix/kayenta/s3/storage/S3StorageServiceIntegrationTest.java
	both modified:   kork/kork-secrets-aws/src/test/java/com/netflix/spinnaker/kork/secrets/engines/SecretsManagerSecretEngineIntegrationTest.java
	both modified:   kork/spinnaker-dependencies/spinnaker-dependencies.gradle

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

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.

1 participant