Describe the feature
When using Redis as storage, OSS Relayers loads the configuration from config.json only once at startup. After that, Redis becomes the single source of truth, and any subsequent changes to config.json are ignored unless the environment variable RESET_STORAGE_ON_START is set.
The problem is that enabling RESET_STORAGE_ON_START also flushes the entire storage, causing loss of runtime data.
We need a way to reload or merge configuration updates from config.json into Redis without resetting storage.
This would allow updating configuration (e.g., relayers, signers, notifications, etc.) without data loss.
Proposed solutions
API endpoint
POST /api/v1/config/sync-from-file
Optional dry_run mode for previewing changes.
Environment variable
RELOAD_CONFIG_FROM_FILE_ON_START=true
- Works similarly to
RESET_STORAGE_ON_START, but non-destructive.
Both approaches could coexist, but the key requirements are:
- Read
config.json and update the Redis configuration accordingly.
- Preserve all runtime data.
- Log which parts of the configuration were updated, skipped, or left unchanged.
- Operate in a simple overwrite mode for initial implementation.
Additional context
The API endpoint solution was discarded because it would add too much complexity by requiring worker re-creation.
Describe the feature
When using Redis as storage, OSS Relayers loads the configuration from
config.jsononly once at startup. After that, Redis becomes the single source of truth, and any subsequent changes toconfig.jsonare ignored unless the environment variableRESET_STORAGE_ON_STARTis set.The problem is that enabling
RESET_STORAGE_ON_STARTalso flushes the entire storage, causing loss of runtime data.We need a way to reload or merge configuration updates from
config.jsoninto Redis without resetting storage.This would allow updating configuration (e.g., relayers, signers, notifications, etc.) without data loss.
Proposed solutions
API endpointPOST /api/v1/config/sync-from-fileOptionaldry_runmode for previewing changes.Environment variable
RELOAD_CONFIG_FROM_FILE_ON_START=trueRESET_STORAGE_ON_START, but non-destructive.Both approaches could coexist, but the key requirements are:
config.jsonand update the Redis configuration accordingly.Additional context
The API endpoint solution was discarded because it would add too much complexity by requiring worker re-creation.