adorsys / adorsys/didcomm-mediator-rs
Remove Redis and all its references from the project
- Lingua principale
- Rust
- Stelle
- 13
- Fork
- 1
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
# Ticket: Remove Redis and all its references from the project
## Description
Redis was originally introduced as an optional, distributed certificate-material cache for multi-replica deployments using AWS S3 certificate storage. After review, it no longer adds meaningful value to the project:
- It is only used for caching certificate material, not for status-list persistence or reads.
- The application already falls back to direct backend storage when Redis is unavailable.
- The operational overhead (TLS, HA, monitoring, credentials, Helm subchart, cert-sync CronJob) outweighs the benefit for the current architecture.
This ticket tracks the complete removal of Redis from the codebase, build configuration, deployment manifests, documentation, and CI.
---
## Tasks
### Rust application code
- [ ] Remove the `redis` feature flag from `Cargo.toml`.
- [ ] Remove the `redis` crate dependency from `Cargo.toml`.
- [ ] Delete `src/outbound/redis.rs`.
- [ ] Remove `#[cfg(feature = "redis")]` gating and Redis module export from `src/outbound/mod.rs`.
- [ ] Remove `RedisConfig` struct and all Redis-related fields from `src/config.rs`.
- [ ] Remove Redis imports, conditional compilation blocks, and Redis connection setup logic from `src/config.rs`.
- [ ] Remove Redis default config values (`redis.uri`, `redis.require_client_auth`, `redis.cert_cache_ttl`) from `src/config.rs`.
- [ ] Remove Redis-related tests from `src/config.rs`.
- [ ] Remove Redis conditional setup and fallback logic from `src/setup.rs`.
- [ ] Remove the `Redis` error variant from `src/utils/cert_manager/storage.rs`.
- [ ] Update `src/outbound/aws.rs` comment that mentions Redis for certificate data.
- [ ] Remove or rename the `redis_cache_failure_does_not_gate_readiness` test in `src/server/health.rs`.
### Build & lock files
- [ ] Regenerate `Cargo.lock` after removing the `redis` dependency.
- [ ] Remove the `redis` exemption from `supply-chain/config.toml`.
### Docker & local development
- [ ] Remove the `redis` service and `redis` profile from `docker-compose.yml`.
- [ ] Remove `APP_REDIS__URI` environment variable from `docker-compose.yml`.
### Environment templates
- [ ] Remove all `APP_REDIS__*` variables from `.env.template`.
### Helm deployment
- [ ] Remove the `redis-ha` dependency from `helm/chart/Chart.yaml`.
- [ ] Remove the `redis-ha` entry from `helm/chart/Chart.lock`.
- [ ] Delete the packaged `redis-ha-*.tgz` chart archive from `helm/chart/charts/`.
- [ ] Remove all `redis-ha` configuration from `helm/chart/values.yaml`.
- [ ] Remove Redis-related NetworkPolicy rules from `helm/chart/templates/network-policy.yaml`.
- [ ] Remove Redis password handling and `APP_REDIS__URI` env var from `helm/chart/templates/deployment.yaml`.
- [ ] Remove Redis conditional logic from `helm/chart/templates/external-secrets.yaml`.
- [ ] Delete `helm/chart/templates/redis-ha-cert-sync.yaml`.
- [ ] Remove the `redisUri` helper from `helm/chart/templates/_helpers.tpl`.
- [ ] Update `helm/README.md` to remove Redis HA sections.
### Documentation
- [ ] Delete `docs/REDIS_TLS_SETUP.md`.
- [ ] Remove Redis sections from `docs/database-backends.md`.
- [ ] Remove Redis sections from `docs/LOCAL_DEPLOYMENT.md`.
- [ ] Update `docs/architecture.md` if Redis is mentioned as a shared backend.
- [ ] Update `docs/blog/status-list-server.adoc` if Redis/TTL caches are referenced.
- [ ] Remove Redis references from `.kube-linter.yaml` and `.trivyignore.yaml`.
### CI / workflows
- [ ] Update `.github/workflows/CI.yml` to remove `redis` from the domain-layer dependency grep pattern.
### Verification
- [ ] Run `cargo check`, `cargo clippy`, and `cargo test` successfully.
- [ ] Confirm no remaining `redis`, `Redis`, or `REDIS` references in the codebase (excluding license text such as “redistribute”).
---
## Acceptance Criteria
- [ ] The project builds and all tests pass without the `redis` crate or feature flag.
- [ ] No Redis service, dependency, configuration, or documentation remains in the repository.
- [ ] AWS S3 certificate storage path continues to work using direct S3 reads (the existing fallback behavior).
- [ ] Helm chart deploys successfully without the `redis-ha` subchart.
- [ ] Docker Compose local setup starts successfully without the `redis` profile.
---
## References
- `src/config.rs` — `RedisConfig`, feature flags, and Redis connection setup
- `src/setup.rs` — Redis cache initialization and S3 fallback path
- `src/outbound/redis.rs` — Redis `Storage` implementation
- `src/utils/cert_manager/storage.rs` — Redis error variant
- `src/server/health.rs` — Redis-related health test
- `Cargo.toml` — `redis` feature and dependency
- `helm/chart/Chart.yaml`, `values.yaml`, `templates/redis-ha-cert-sync.yaml` — Helm Redis deployment
- `docs/REDIS_TLS_SETUP.md` — Redis TLS documentation
- `docs/database-backends.md`, `docs/LOCAL_DEPLOYMENT.md`, `helm/README.md` — Redis references in docs
- `.env.template`, `docker-compose.yml` — local Redis configuration
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Start in `Cargo.toml` and `src/config.rs` to remove the Redis feature/dependency and config paths, then propagate deletions through `src/outbound/mod.rs`, `src/outbound/redis.rs`, `src/setup.rs`, `src/utils/cert_manager/storage.rs`, and `src/server/health.rs`. Next, update the listed deployment/docs files (`docker-compose.yml`, `.env.template`, `helm/chart/*`, `docs/*`, `.github/workflows/CI.yml`) and regenerate `Cargo.lock`. Run `cargo check`, `cargo clippy`, and `cargo test`; done means all pass and no remaining `redis`/`Redis`/`REDIS` references except allowed license text.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- docker, helm, redis, rust
- Ambito
- backend, devops, documentation
- Tipo di issue
- Refactoring
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Attiva
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 44/100