merge main into pipe profile and preserve isolation fixes
This commit is contained in:
commit
a182af36d9
54 files changed
+1618
-574
No files matched your search
@@ -80,10 +80,13 @@ public sealed class ConfigReceiverService : BackgroundService
|
||||
.WithAutomaticReconnect(new RetryDelayed(TimeSpan.FromSeconds(1), TimeSpan.FromSeconds(5), TimeSpan.FromSeconds(30)))
|
||||
.Build();
|
||||
|
||||
_connection.On("DiscoveryScanRequested", () => _scanTrigger.Trigger());
|
||||
|
||||
// Listen for setting changes
|
||||
_connection.On<string, string>("SettingChanged", async (key, value) =>
|
||||
{
|
||||
_logger.LogInformation("Config update received: {Key} = {Value}", key, value);
|
||||
// Keys may identify secret settings; never log their values.
|
||||
_logger.LogInformation("Config update received: {Key}", key);
|
||||
if (key == "config.invalidated") await FetchFullConfigAsync(stoppingToken);
|
||||
else ApplySetting(key, value);
|
||||
});
|
||||
@@ -112,7 +115,7 @@ public sealed class ConfigReceiverService : BackgroundService
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogWarning(ex, "Failed to rejoin agent group after reconnect");
|
||||
_logger.LogWarning("Failed to rejoin agent group after reconnect (error type {ErrorType})", ex.GetType().Name);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -122,7 +125,7 @@ public sealed class ConfigReceiverService : BackgroundService
|
||||
try
|
||||
{
|
||||
await _connection.StartAsync(stoppingToken);
|
||||
_logger.LogInformation("Connected to config hub at {HubUrl}", hubUrl);
|
||||
_logger.LogInformation("Connected to config hub");
|
||||
|
||||
// Join our personal config channel
|
||||
await _connection.InvokeAsync("JoinAgentGroup", _state.AgentId.ToString(), stoppingToken);
|
||||
@@ -143,7 +146,7 @@ public sealed class ConfigReceiverService : BackgroundService
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogWarning(ex, "Config hub connection failed, retrying in 15s...");
|
||||
_logger.LogWarning("Config hub connection failed, retrying in 15s... (error type {ErrorType})", ex.GetType().Name);
|
||||
await Task.Delay(TimeSpan.FromSeconds(15), stoppingToken);
|
||||
}
|
||||
}
|
||||
@@ -180,7 +183,7 @@ public sealed class ConfigReceiverService : BackgroundService
|
||||
}
|
||||
else
|
||||
{
|
||||
_logger.LogWarning("Ignored invalid heartbeat interval: {Value}", value);
|
||||
_logger.LogWarning("Ignored invalid heartbeat interval");
|
||||
}
|
||||
break;
|
||||
case "log.level":
|
||||
@@ -191,7 +194,7 @@ public sealed class ConfigReceiverService : BackgroundService
|
||||
}
|
||||
else
|
||||
{
|
||||
_logger.LogWarning("Ignored invalid log level: {Value}", value);
|
||||
_logger.LogWarning("Ignored invalid log level");
|
||||
}
|
||||
break;
|
||||
case "discovery.scan.requested":
|
||||
@@ -210,19 +213,19 @@ public sealed class ConfigReceiverService : BackgroundService
|
||||
}
|
||||
else
|
||||
{
|
||||
_logger.LogWarning("Ignored invalid autoUpdateEnabled value: {Value}", value);
|
||||
_logger.LogWarning("Ignored invalid autoUpdateEnabled value");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (RestartRequiredPrefixes.Any(p => key.StartsWith(p, StringComparison.OrdinalIgnoreCase)))
|
||||
{
|
||||
_logger.LogWarning(
|
||||
"Setting {Key} = {Value} requires an agent restart to take effect (not applied live)",
|
||||
key, value);
|
||||
"Setting {Key} requires an agent restart to take effect (not applied live)",
|
||||
key);
|
||||
}
|
||||
else
|
||||
{
|
||||
_logger.LogDebug("Unknown setting {Key} = {Value} (stored for future use)", key, value);
|
||||
_logger.LogDebug("Unknown setting {Key} (stored for future use)", key);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -250,7 +253,7 @@ public sealed class ConfigReceiverService : BackgroundService
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogWarning(ex, "Failed to decrypt camera credential pool (kept previous pool)");
|
||||
_logger.LogWarning("Failed to decrypt camera credential pool (kept previous pool) (error type {ErrorType})", ex.GetType().Name);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -296,7 +299,7 @@ public sealed class ConfigReceiverService : BackgroundService
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogWarning(ex, "Failed to fetch full configuration");
|
||||
_logger.LogWarning("Failed to fetch full configuration (error type {ErrorType})", ex.GetType().Name);
|
||||
}
|
||||
finally { _reloadLock.Release(); }
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user