adorsys / adorsys/status-list-server
Replace LocalStack with Floci for lightweight, high-performance AWS emulation in tests and Compose
- 主要語言
- Rust
- 星號
- 22
- 分支
- 5
- 平均合併
- 2 天 6 小時
- 30 天內合併 PR
- 47
描述
## Objective
Replace LocalStack with [Floci](https://github.com/floci-io/floci) as the default local AWS emulator in `docker-compose.yml` and integration test suites (`tests/cert_provisioning.rs`) to dramatically reduce memory footprint, eliminate container startup latency, and accelerate developer testing.
## Context
Currently, local AWS service emulation (Secrets Manager, Route53, and S3) relies on `localstack/localstack:4.14` in `docker-compose.yml` and `testcontainers` in `tests/cert_provisioning.rs`.
LocalStack is resource-heavy (allocates ~1GB+ RAM, slow JVM/Python initialization of 15–30+ seconds), which slows down local development and increases CI test duration.
[Floci](https://github.com/floci-io/floci) is a lightweight, ultra-fast AWS service emulator written in Rust. It starts sub-second, consumes minimal memory (<50MB), provides official multi-architecture container images (`ghcr.io/floci-io/floci`), and offers full API compatibility with the AWS SDKs (`aws-sdk-secretsmanager`, `aws-sdk-route53`, `aws-sdk-s3`) used by the status-list-server.
## Deliverables
- [ ] **Docker Compose Migration**:
- Replace `localstack/localstack:4.14` in `docker-compose.yml` (and modular profiles in #477) with `ghcr.io/floci-io/floci:latest`.
- Configure Floci environment variables, ports (4566), and service flags.
- [ ] **Integration Tests**:
- Update `tests/cert_provisioning.rs` to use Floci (via `testcontainers` generic image `ghcr.io/floci-io/floci` or native test runner).
- Update AWS client endpoint configuration to point to Floci.
- Verify Secrets Manager and Route53 mock behaviors match required test semantics.
- [ ] **Dependency & Tooling Updates**:
- Clean up `Cargo.toml` if `testcontainers` `localstack` feature is no longer required.
- Update `docs/LOCAL_DEPLOYMENT.md` and `docs/secrets-backends.md` with Floci instructions.
## Acceptance Criteria
- [ ] `docker compose up localstack` (or `floci`) starts in < 2 seconds and responds to AWS SDK requests.
- [ ] `cargo test --test cert_provisioning` passes reliably against Floci.
- [ ] Test container startup latency and memory overhead in CI are substantially reduced.
## References
- Sub-EPIC: #502 (Sprint 2: Developer Tooling & CI/CD Modernization)
- Baseline EPIC: #141 (Status List Server Hardening & Production Readiness)
- Floci Repository: https://github.com/floci-io/floci
貢獻指南
研究方向
Start in `docker-compose.yml` and replace `localstack/localstack:4.14` with `ghcr.io/floci-io/floci:latest`, including profile-based entries, aligning port and env settings for Floci. Next read `tests/cert_provisioning.rs` to swap the `testcontainers` image and AWS endpoint wiring for Secrets Manager/Route53/S3. Then check `Cargo.toml` for any localstack `testcontainers` feature cleanup and update `docs/LOCAL_DEPLOYMENT.md` and `docs/secrets-backends.md`. Done when `cargo test --test cert_provisioning` passes reliably and compose/docs consistently reference Floci.
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- aws, docker, docker-compose, rust
- 領域
- devtools, documentation, testing
- Issue 類型
- 重構
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 活躍
- 描述清晰度
- 基本清楚
- 新手友好度
- 48/100