adorsys / adorsys/status-list-server

Replace LocalStack with Floci for lightweight, high-performance AWS emulation in tests and Compose

Aberta
#522 0 comentários 0 reações 0 responsáveis Ver no GitHub
enhancement refactoring
Linguagem predominante
Rust
Estrelas
22
Forks
5
Merge médio
2d 11h
PRs com merge (30d)
47

Descrição

## 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

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.