feat: implement config hot-reload and fix corrupted backend files#308
Open
malik203 wants to merge 1 commit into
Open
feat: implement config hot-reload and fix corrupted backend files#308malik203 wants to merge 1 commit into
malik203 wants to merge 1 commit into
Conversation
- Add ConfigManager (ArcSwap-based, patch-capable) in config/reload.rs - Add ConfigWatcher (Redis pub/sub driven reload) with ConfigHandle - Add ReloadError, handle_reload and handle_get_config Axum handlers - Move AppConfig to config/mod.rs with ServerConfig, DatabaseConfig, RedisConfig - Fix corrupted concatenated duplicates in Cargo.toml, lib.rs, error.rs, jobs.rs, telemetry.rs, services/mod.rs, api/mod.rs, handlers/mod.rs, middleware/mod.rs, profiling.rs, dashboard.rs
|
@malik203 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat: implement config hot-reload and fix corrupted backend files
Summary
Implements runtime configuration hot-reload for the backend and repairs all files that had
multiple versions concatenated together.
Changes
Config hot-reload (backend/src/config/)
RedisConfig, log_level, max_connections, request_timeout_secs, maintenance_mode
config.json and partial JSON-patch updates via update_from_patch
from config:current key, and atomically swaps the in-memory value; notifies all ConfigHandle
holders via a tokio::sync::watch channel
failures
/api/config
File corruption fixes
dep versions
implementations
deduplicated module declarations
each
Testing
Unit tests in config/reload.rs cover:
field preservation)
notifies handles, multiple handles see same update, wait_for_change resolves after reload