Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/Runner.Listener/Runner.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.IO;
Expand Down Expand Up @@ -1075,6 +1075,13 @@ private async Task ReportAuthMigrationTelemetryAsync(CancellationToken token)
await _runnerServer.UpdateAgentUpdateStateAsync(runnerSettings.PoolId, runnerSettings.AgentId, "RefreshConfig", telemetry, tokenSource.Token);
}
}
catch (InvalidOperationException ex) when (ex.Message.StartsWith("SetConnection"))
{
// In broker mode (serverUrl == serverUrlV2), _runnerServer is intentionally
// not connected in BrokerMessageListener.CreateSessionAsync. Discard the
// telemetry entry silently rather than re-enqueuing it into an infinite loop.
Trace.Verbose($"Runner server not connected in broker mode, discarding auth migration telemetry: {ex.Message}");
}
catch (Exception ex)
{
Trace.Error("Failed to report auth migration telemetry.");
Expand Down