Skip to content

Commit

Permalink
Relax the condition to stop uploading to Results (actions#3230)
Browse files Browse the repository at this point in the history
  • Loading branch information
yacaovsnc authored and ericsciple committed Jul 5, 2024
1 parent c62169f commit e3216ee
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Runner.Common/JobServerQueue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public sealed class JobServerQueue : RunnerService, IJobServerQueue
private readonly List<JobTelemetry> _jobTelemetries = new();
private bool _queueInProcess = false;
private bool _resultsServiceOnly = false;
private int _resultsServiceExceptionsCount = 0;
private Stopwatch _resultsUploadTimer = new();
private Stopwatch _actionsUploadTimer = new();

Expand Down Expand Up @@ -574,9 +575,9 @@ private async Task ProcessResultsUploadQueueAsync(bool runOnce = false)
Trace.Info("Catch exception during file upload to results, keep going since the process is best effort.");
Trace.Error(ex);
errorCount++;

_resultsServiceExceptionsCount++;
// If we hit any exceptions uploading to Results, let's skip any additional uploads to Results unless Results is serving logs
if (!_resultsServiceOnly)
if (!_resultsServiceOnly && _resultsServiceExceptionsCount > 3)
{
_resultsClientInitiated = false;
SendResultsTelemetry(ex);
Expand Down

0 comments on commit e3216ee

Please sign in to comment.