Skip to content

Commit ba4eeb8

Browse files
committed
update: patch
1 parent 5c105b0 commit ba4eeb8

File tree

1 file changed

+22
-15
lines changed

1 file changed

+22
-15
lines changed

patches/runner-main-sdk8-ppc64le.patch

+22-15
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ index c1953d88..61561ba7 100644
309309
}
310310
}
311311
diff --git a/src/Runner.Common/Logging.cs b/src/Runner.Common/Logging.cs
312-
index 9200ca59..a0e6e1da 100644
312+
index 9200ca59..6fa0decc 100644
313313
--- a/src/Runner.Common/Logging.cs
314314
+++ b/src/Runner.Common/Logging.cs
315315
@@ -1,5 +1,7 @@
@@ -333,26 +333,32 @@ index 9200ca59..a0e6e1da 100644
333333
}
334334

335335
public class PagingLogger : RunnerService, IPagingLogger
336-
@@ -75,93 +75,88 @@ namespace GitHub.Runner.Common
336+
@@ -70,98 +70,93 @@ namespace GitHub.Runner.Common
337+
// and the consumer queues it for upload
338+
// Ensure this is lazy. Create a page on first write
339+
//
340+
- public void Write(string message)
341+
+ public async Task WriteAsync(string message)
342+
{
337343
// lazy creation on write
338344
if (_pageWriter == null)
339345
{
340346
- NewPage();
341-
+ await NewPageAsync(); // Changed to async
347+
+ await NewPageAsync();
342348
}
343349

344350
if (_resultsBlockWriter == null)
345351
{
346352
- NewBlock();
347-
+ await NewBlockAsync(); // Changed to async
353+
+ await NewBlockAsync();
348354
}
349355

350356
- string line = $"{DateTime.UtcNow.ToString("O")} {message}";
351357
- _pageWriter.WriteLine(line);
352358
- _resultsBlockWriter.WriteLine(line);
353359
+ string line = $"{DateTime.UtcNow:O} {message}";
354-
+ await _pageWriter.WriteLineAsync(line); // Changed to async
355-
+ await _resultsBlockWriter.WriteLineAsync(line); // Changed to async
360+
+ await _pageWriter.WriteLineAsync(line);
361+
+ await _resultsBlockWriter.WriteLineAsync(line);
356362

357363
_totalLines++;
358364
- if (line.IndexOf('\n') != -1)
@@ -372,18 +378,19 @@ index 9200ca59..a0e6e1da 100644
372378
+ int bytes = Encoding.UTF8.GetByteCount(line);
373379
_byteCount += bytes;
374380
_blockByteCount += bytes;
381+
+
375382
if (_byteCount >= PageSize)
376383
{
377384
- NewPage();
378-
+ await NewPageAsync(); // Changed to async
385+
+ await NewPageAsync();
379386
}
380387

381388
if (_blockByteCount >= BlockSize)
382389
{
383390
- NewBlock();
384-
+ await NewBlockAsync(); // Changed to async
391+
+ await NewBlockAsync();
385392
}
386-
393+
-
387394
}
388395

389396
- public void End()
@@ -396,10 +403,10 @@ index 9200ca59..a0e6e1da 100644
396403
}
397404

398405
- private void NewPage()
399-
+ private async Task NewPageAsync() // Changed to async
406+
+ private async Task NewPageAsync()
400407
{
401408
- EndPage();
402-
+ await EndPageAsync(); // Changed to async
409+
+ await EndPageAsync();
403410
_byteCount = 0;
404411
_dataFileName = Path.Combine(_pagesFolder, $"{_timelineId}_{_timelineRecordId}_{++_pageCount}.log");
405412
- _pageData = new FileStream(_dataFileName, FileMode.CreateNew, FileAccess.ReadWrite, FileShare.ReadWrite);
@@ -410,7 +417,7 @@ index 9200ca59..a0e6e1da 100644
410417
}
411418

412419
- private void EndPage()
413-
+ private async Task EndPageAsync() // Changed to async
420+
+ private async Task EndPageAsync()
414421
{
415422
if (_pageWriter != null)
416423
{
@@ -428,10 +435,10 @@ index 9200ca59..a0e6e1da 100644
428435
}
429436

430437
- private void NewBlock()
431-
+ private async Task NewBlockAsync() // Changed to async
438+
+ private async Task NewBlockAsync()
432439
{
433440
- EndBlock(false);
434-
+ await EndBlockAsync(false); // Changed to async
441+
+ await EndBlockAsync(false);
435442
_blockByteCount = 0;
436443
_resultsDataFileName = Path.Combine(_resultsBlockFolder, $"{_timelineId}_{_timelineRecordId}.{++_blockCount}");
437444
- _resultsBlockData = new FileStream(_resultsDataFileName, FileMode.CreateNew, FileAccess.ReadWrite, FileShare.ReadWrite);
@@ -442,7 +449,7 @@ index 9200ca59..a0e6e1da 100644
442449
}
443450

444451
- private void EndBlock(bool finalize)
445-
+ private async Task EndBlockAsync(bool finalize) // Changed to async
452+
+ private async Task EndBlockAsync(bool finalize)
446453
{
447454
if (_resultsBlockWriter != null)
448455
{

0 commit comments

Comments
 (0)