-
Notifications
You must be signed in to change notification settings - Fork 48
Description
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
Optionaldry_runmode 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.jsonand 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.