You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(agent): Ensure agent receives and applies dynamic config on startup
This commit fixes a bug where the agent would not receive its dynamic, server-side configuration upon initial connection. It now correctly fetches the effective configuration during the handshake process.
Key changes:
- Modified the server's handshake logic in `core_services.rs` to call `get_effective_vps_config` and send the correct configuration to the agent immediately after connection, replacing the previously used hardcoded default config.
- Added logging in the agent (`agent.rs`, `metrics.rs`) to print the received configuration and log configuration check intervals, improving debuggability.
- Refactored `get_effective_vps_config` in `config_routes.rs` to accept a `&DatabaseConnection` instead of the full `Arc<AppState>`, making it more modular and reusable.