mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-18 16:26:38 +00:00
[client] refactor auto update workflow (#5448)
Auto-update logic moved out of the UI into a dedicated updatemanager.Manager service that runs in the connection layer. The UI no longer polls or checks for updates independently. The update manager supports three modes driven by the management server's auto-update policy: No policy set by mgm: checks GitHub for the latest version and notifies the user (previous behavior, now centralized) mgm enforces update: the "About" menu triggers installation directly instead of just downloading the file — user still initiates the action mgm forces update: installation proceeds automatically without user interaction updateManager lifecycle is now owned by daemon, giving the daemon server direct control via a new TriggerUpdate RPC Introduces EngineServices struct to group external service dependencies passed to NewEngine, reducing its argument count from 11 to 4
This commit is contained in:
@@ -85,6 +85,10 @@ service DaemonService {
|
||||
|
||||
rpc GetFeatures(GetFeaturesRequest) returns (GetFeaturesResponse) {}
|
||||
|
||||
// TriggerUpdate initiates installation of the pending enforced version.
|
||||
// Called when the user clicks the install button in the UI (Mode 2 / enforced update).
|
||||
rpc TriggerUpdate(TriggerUpdateRequest) returns (TriggerUpdateResponse) {}
|
||||
|
||||
// GetPeerSSHHostKey retrieves SSH host key for a specific peer
|
||||
rpc GetPeerSSHHostKey(GetPeerSSHHostKeyRequest) returns (GetPeerSSHHostKeyResponse) {}
|
||||
|
||||
@@ -226,7 +230,7 @@ message WaitSSOLoginResponse {
|
||||
message UpRequest {
|
||||
optional string profileName = 1;
|
||||
optional string username = 2;
|
||||
optional bool autoUpdate = 3;
|
||||
reserved 3;
|
||||
}
|
||||
|
||||
message UpResponse {}
|
||||
@@ -725,6 +729,13 @@ message GetFeaturesResponse{
|
||||
bool disable_update_settings = 2;
|
||||
}
|
||||
|
||||
message TriggerUpdateRequest {}
|
||||
|
||||
message TriggerUpdateResponse {
|
||||
bool success = 1;
|
||||
string errorMsg = 2;
|
||||
}
|
||||
|
||||
// GetPeerSSHHostKeyRequest for retrieving SSH host key for a specific peer
|
||||
message GetPeerSSHHostKeyRequest {
|
||||
// peer IP address or FQDN to get SSH host key for
|
||||
|
||||
Reference in New Issue
Block a user