Merge the etcd configuration into the storage proxy unified config
- Dominant language
- Python
- Stars
- 670
- Forks
- 183
- Avg merge
- 15h 13m
- Merged PRs (30d)
- 368
Description
Give the storage proxy a configuration provider that merges the etcd configuration into its unified config, the way the manager already does, so that etcd-only settings are typed config fields rather than runtime etcd reads.
### Problem
- StorageProxyUnifiedConfig has no redis field. The Redis settings live only under the etcd config/redis prefix, so every consumer reads etcd directly at runtime.
- RedisConfigProvider in the infrastructure stage exists solely to perform that read and hand the resulting RedisConfig to the Valkey clients, the message queue and service discovery. It carries the standing TODO to override the unified config with etcd values.
- The storage proxy ConfigProvider loads the local TOML file once. It has no etcd source and no reload, unlike ManagerConfigProvider, which composes a file plus etcd LoaderChain and re-validates on etcd watch events.
- check_and_upgrade in migration.py validates the same etcd payload through the legacy trafaret redis_config_iv before RedisConfig, so the two paths do not agree on validation.
### Scope
- Add the Redis settings as a field of StorageProxyUnifiedConfig.
- Build the storage proxy configuration provider on a loader chain of the local file and etcd, so the composed config carries the etcd values.
- Drop RedisConfigProvider from the infrastructure stage once the Redis settings arrive through the config.
- Route the migration command through the same configuration path and retire its trafaret validator.
### Out of scope
- Reloading the configuration on etcd watch events. The provider loads once at startup; live reload is separate work.
- Typing the remaining raw etcd reads in the proxy (volumes/_mount, config/watcher/file-io-timeout, the DDN project id key).
JIRA Issue: BA-7794
Contributor guide
Research direction
Start with StorageProxyUnifiedConfig and the storage proxy ConfigProvider, then compare their loading path with ManagerConfigProvider's file-plus-etcd LoaderChain. Trace RedisConfigProvider and migration.py, including check_and_upgrade; done means Redis settings arrive through the unified configuration, the redundant provider and legacy validator are removed, and the stated raw etcd reads remain out of scope.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, redis
- Domain
- backend, infrastructure
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100