Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion patches/last_processed_commit.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4197182ef8f39c719f66038c1bc9b34cd9e9ac9a
110142c2c501c6ae9373d553efa826bedbaab5f7
2 changes: 1 addition & 1 deletion patches/runner-main-sdk8-arm.patch
Original file line number Diff line number Diff line change
Expand Up @@ -622,4 +622,4 @@ index 63e95af8..70cfe5c2 100644
+ "version": "9.0.318"
}
}
# From upstream commit: 4197182ef8f39c719f66038c1bc9b34cd9e9ac9a
# From upstream commit: 110142c2c501c6ae9373d553efa826bedbaab5f7
2 changes: 1 addition & 1 deletion patches/runner-main-sdk8-ppc64le.patch
Original file line number Diff line number Diff line change
Expand Up @@ -284,4 +284,4 @@ index 056a312e..3f9a3679 100644
<Exec Command="%22$(DesktopMSBuild)%22 Runner.Service/Windows/RunnerService.csproj /p:Configuration=$(BUILDCONFIG) /p:PackageRuntime=$(PackageRuntime) /p:OutputPath=%22$(MSBuildProjectDirectory)/../_layout/bin%22" ConsoleToMSBuild="true" Condition="'$(PackageRuntime)' == 'win-x64' Or '$(PackageRuntime)' == 'win-x86' Or '$(PackageRuntime)' == 'win-arm64'" />
</Target>

# From upstream commit: 4197182ef8f39c719f66038c1bc9b34cd9e9ac9a
# From upstream commit: 110142c2c501c6ae9373d553efa826bedbaab5f7
2 changes: 1 addition & 1 deletion patches/runner-main-sdk8-s390x.patch
Original file line number Diff line number Diff line change
Expand Up @@ -284,4 +284,4 @@ index 056a312e..3f9a3679 100644
<Exec Command="%22$(DesktopMSBuild)%22 Runner.Service/Windows/RunnerService.csproj /p:Configuration=$(BUILDCONFIG) /p:PackageRuntime=$(PackageRuntime) /p:OutputPath=%22$(MSBuildProjectDirectory)/../_layout/bin%22" ConsoleToMSBuild="true" Condition="'$(PackageRuntime)' == 'win-x64' Or '$(PackageRuntime)' == 'win-x86' Or '$(PackageRuntime)' == 'win-arm64'" />
</Target>

# From upstream commit: 4197182ef8f39c719f66038c1bc9b34cd9e9ac9a
# From upstream commit: 110142c2c501c6ae9373d553efa826bedbaab5f7
19 changes: 13 additions & 6 deletions src/Runner.Common/BrokerServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,15 @@ public async Task<BrokerWebSocketProbeResult> RunLongPollWebSocketProbeAsync(Can

while (!cancellationToken.IsCancellationRequested)
{
var socket = await ConnectWebSocketAsync(cancellationToken);
var (socket, connectEx) = await ConnectWebSocketAsync(cancellationToken);
if (socket == null)
{
var errorMsg = connectEx.InnerException?.Message ?? connectEx.Message;
if (!result.Errors.Contains(errorMsg))
{
result.Errors.Add(errorMsg);
}

result.ConnectFailures++;
result.LastCloseReason = "connect_failed";

Expand Down Expand Up @@ -158,9 +164,10 @@ await socket.SendAsync(
{
Trace.Info("Exception caught while holding runner websocket, will reconnect.");
Trace.Error(ex);
if (!result.Errors.Contains(ex.Message))
var errorMsg = ex.InnerException?.Message ?? ex.Message;
if (!result.Errors.Contains(errorMsg))
{
result.Errors.Add(ex.Message);
result.Errors.Add(errorMsg);
}
result.LastCloseReason = "error";
}
Expand All @@ -177,20 +184,20 @@ await socket.SendAsync(
return result;
}

private async Task<ClientWebSocket> ConnectWebSocketAsync(CancellationToken cancellationToken)
private async Task<(ClientWebSocket Socket, Exception Error)> ConnectWebSocketAsync(CancellationToken cancellationToken)
{
try
{
Trace.Info("Attempting to start runner websocket client.");
var socket = await _brokerHttpClient.ConnectRunnerLongPollWebSocketAsync(cancellationToken);
Trace.Info("Successfully started runner websocket client.");
return socket;
return (socket, null);
}
catch (Exception ex)
{
Trace.Info("Exception caught during runner websocket connect, will retry.");
Trace.Error(ex);
return null;
return (null, ex);
}
}

Expand Down
Loading