Skip to content

Support reloading config from file without Redis reset #516

@LuisUrrutia

Description

@LuisUrrutia

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    S-needs-triageRequires initial triage or categorizationT-featureSuggests a new feature or enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions