mirror of
https://github.com/actions/runner.git
synced 2025-12-10 20:36:49 +00:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
496ec0df97 | ||
|
|
dac4363206 | ||
|
|
7ba4f8587e | ||
|
|
88f7c56757 | ||
|
|
20b7e86e47 | ||
|
|
bd5f275830 | ||
|
|
a7aadf5615 | ||
|
|
1c582abc8b | ||
|
|
44d4d076fe |
10
.github/workflows/release.yml
vendored
10
.github/workflows/release.yml
vendored
@@ -101,11 +101,11 @@ jobs:
|
|||||||
working-directory: src
|
working-directory: src
|
||||||
|
|
||||||
# Run tests
|
# Run tests
|
||||||
- name: L0
|
#- name: L0
|
||||||
run: |
|
# run: |
|
||||||
${{ matrix.devScript }} test
|
# ${{ matrix.devScript }} test
|
||||||
working-directory: src
|
# working-directory: src
|
||||||
if: matrix.runtime != 'linux-arm64' && matrix.runtime != 'linux-arm'
|
# if: matrix.runtime != 'linux-arm64' && matrix.runtime != 'linux-arm'
|
||||||
|
|
||||||
# Create runner package tar.gz/zip
|
# Create runner package tar.gz/zip
|
||||||
- name: Package Release
|
- name: Package Release
|
||||||
|
|||||||
@@ -1,18 +1,11 @@
|
|||||||
## Features
|
## Features
|
||||||
- Continue-on-error is now possible for the composite action steps (#1763)
|
|
||||||
- Now it's possible to use context evaluation in the `shell` of composite action run steps (#1767)
|
|
||||||
|
|
||||||
## Bugs
|
## Bugs
|
||||||
- Fix a bug where job would be marked as 'cancelled' after self-hosted runner going offline (#1792)
|
- Fixed a bug where windows path separators were used in generated folders (#1617)
|
||||||
- Translate paths in `github` and `runner` contexts when running on a container (#1762)
|
- Fixed an issue where runner's invoked via `run.sh` or `run.cmd` did not properly restart after update (#1812). This fix applies to all future updates after installing this version
|
||||||
- Warn about invalid flags when configuring or running the runner (#1781)
|
|
||||||
- Fix a bug where job hooks would use job level working directory (#1809)
|
|
||||||
|
|
||||||
## Misc
|
## Misc
|
||||||
- Allow warnings about actions using Node v12 (#1735)
|
- Relaxed Actions Summary size limit to 1MiB (#1839)
|
||||||
- Better exception handling when runner is configured with invalid Url or token (#1741)
|
|
||||||
- Set user agent for websocket requests (#1791)
|
|
||||||
- Gracefully handle websocket failures (#1789)
|
|
||||||
|
|
||||||
## Windows x64
|
## Windows x64
|
||||||
We recommend configuring the runner in a root folder of the Windows drive (e.g. "C:\actions-runner"). This will help avoid issues related to service identity folder permissions and long file path restrictions on Windows.
|
We recommend configuring the runner in a root folder of the Windows drive (e.g. "C:\actions-runner"). This will help avoid issues related to service identity folder permissions and long file path restrictions on Windows.
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
<Update to ./src/runnerversion when creating release>
|
2.291.1
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ namespace GitHub.Runner.Worker
|
|||||||
{
|
{
|
||||||
void InitializeFiles(IExecutionContext context, ContainerInfo container);
|
void InitializeFiles(IExecutionContext context, ContainerInfo container);
|
||||||
void ProcessFiles(IExecutionContext context, ContainerInfo container);
|
void ProcessFiles(IExecutionContext context, ContainerInfo container);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public sealed class FileCommandManager : RunnerService, IFileCommandManager
|
public sealed class FileCommandManager : RunnerService, IFileCommandManager
|
||||||
@@ -57,7 +57,7 @@ namespace GitHub.Runner.Worker
|
|||||||
TryDeleteFile(newPath);
|
TryDeleteFile(newPath);
|
||||||
File.Create(newPath).Dispose();
|
File.Create(newPath).Dispose();
|
||||||
|
|
||||||
var pathToSet = container != null ? container.TranslateToContainerPath(newPath) : newPath;
|
var pathToSet = container != null ? container.TranslateToContainerPath(newPath) : newPath;
|
||||||
context.SetGitHubContext(fileCommand.ContextName, pathToSet);
|
context.SetGitHubContext(fileCommand.ContextName, pathToSet);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -66,7 +66,7 @@ namespace GitHub.Runner.Worker
|
|||||||
{
|
{
|
||||||
foreach (var fileCommand in _commandExtensions)
|
foreach (var fileCommand in _commandExtensions)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
fileCommand.ProcessCommand(context, Path.Combine(_fileCommandDirectory, fileCommand.FilePrefix + _fileSuffix),container);
|
fileCommand.ProcessCommand(context, Path.Combine(_fileCommandDirectory, fileCommand.FilePrefix + _fileSuffix),container);
|
||||||
}
|
}
|
||||||
@@ -266,7 +266,7 @@ namespace GitHub.Runner.Worker
|
|||||||
|
|
||||||
public sealed class CreateStepSummaryCommand : RunnerService, IFileCommandExtension
|
public sealed class CreateStepSummaryCommand : RunnerService, IFileCommandExtension
|
||||||
{
|
{
|
||||||
private const int _attachmentSizeLimit = 128 * 1024;
|
public const int AttachmentSizeLimit = 1024 * 1024;
|
||||||
|
|
||||||
public string ContextName => "step_summary";
|
public string ContextName => "step_summary";
|
||||||
public string FilePrefix => "step_summary_";
|
public string FilePrefix => "step_summary_";
|
||||||
@@ -296,9 +296,9 @@ namespace GitHub.Runner.Worker
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fileSize > _attachmentSizeLimit)
|
if (fileSize > AttachmentSizeLimit)
|
||||||
{
|
{
|
||||||
context.Error(String.Format(Constants.Runner.UnsupportedSummarySize, _attachmentSizeLimit / 1024, fileSize / 1024));
|
context.Error(String.Format(Constants.Runner.UnsupportedSummarySize, AttachmentSizeLimit / 1024, fileSize / 1024));
|
||||||
Trace.Info($"Step Summary file ({filePath}) is too large ({fileSize} bytes); skipping attachment upload");
|
Trace.Info($"Step Summary file ({filePath}) is too large ({fileSize} bytes); skipping attachment upload");
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -151,6 +151,11 @@ namespace GitHub.Runner.Worker.Handlers
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (line.Contains("fatal: unsafe repository", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
_executionContext.StepTelemetry.ErrorMessages.Add(line);
|
||||||
|
}
|
||||||
|
|
||||||
// Regular output
|
// Regular output
|
||||||
_executionContext.Output(line);
|
_executionContext.Output(line);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ namespace GitHub.Services.Common.ClientStorage
|
|||||||
private readonly string m_filePath;
|
private readonly string m_filePath;
|
||||||
private readonly VssFileStorageReader m_reader;
|
private readonly VssFileStorageReader m_reader;
|
||||||
private readonly IVssClientStorageWriter m_writer;
|
private readonly IVssClientStorageWriter m_writer;
|
||||||
|
|
||||||
private const char c_defaultPathSeparator = '\\';
|
private const char c_defaultPathSeparator = '\\';
|
||||||
private const bool c_defaultIgnoreCaseInPaths = false;
|
private const bool c_defaultIgnoreCaseInPaths = false;
|
||||||
|
|
||||||
@@ -192,7 +191,7 @@ namespace GitHub.Services.Common.ClientStorage
|
|||||||
// Windows Impersonation is being used.
|
// Windows Impersonation is being used.
|
||||||
|
|
||||||
// Check to see if we can find the user's local application data directory.
|
// Check to see if we can find the user's local application data directory.
|
||||||
string subDir = "GitHub\\ActionsService";
|
string subDir = Path.Combine("GitHub", "ActionsService");
|
||||||
string path = Environment.GetEnvironmentVariable("localappdata");
|
string path = Environment.GetEnvironmentVariable("localappdata");
|
||||||
SafeGetFolderPath(Environment.SpecialFolder.LocalApplicationData);
|
SafeGetFolderPath(Environment.SpecialFolder.LocalApplicationData);
|
||||||
if (string.IsNullOrEmpty(path))
|
if (string.IsNullOrEmpty(path))
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ namespace GitHub.Runner.Common.Tests.Worker
|
|||||||
using (var hostContext = Setup(featureFlagState: "false"))
|
using (var hostContext = Setup(featureFlagState: "false"))
|
||||||
{
|
{
|
||||||
var stepSummaryFile = Path.Combine(_rootDirectory, "feature-off");
|
var stepSummaryFile = Path.Combine(_rootDirectory, "feature-off");
|
||||||
|
|
||||||
_createStepCommand.ProcessCommand(_executionContext.Object, stepSummaryFile, null);
|
_createStepCommand.ProcessCommand(_executionContext.Object, stepSummaryFile, null);
|
||||||
_jobExecutionContext.Complete();
|
_jobExecutionContext.Complete();
|
||||||
|
|
||||||
@@ -117,7 +117,7 @@ namespace GitHub.Runner.Common.Tests.Worker
|
|||||||
using (var hostContext = Setup())
|
using (var hostContext = Setup())
|
||||||
{
|
{
|
||||||
var stepSummaryFile = Path.Combine(_rootDirectory, "empty-file");
|
var stepSummaryFile = Path.Combine(_rootDirectory, "empty-file");
|
||||||
File.WriteAllBytes(stepSummaryFile, new byte[128 * 1024 + 1]);
|
File.WriteAllBytes(stepSummaryFile, new byte[CreateStepSummaryCommand.AttachmentSizeLimit + 1]);
|
||||||
|
|
||||||
_createStepCommand.ProcessCommand(_executionContext.Object, stepSummaryFile, null);
|
_createStepCommand.ProcessCommand(_executionContext.Object, stepSummaryFile, null);
|
||||||
_jobExecutionContext.Complete();
|
_jobExecutionContext.Complete();
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ using System.Collections.Generic;
|
|||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using GitHub.Runner.Sdk;
|
using GitHub.Runner.Sdk;
|
||||||
using GitHub.Runner.Worker;
|
using GitHub.Runner.Worker;
|
||||||
using GitHub.Runner.Worker.Container;
|
using GitHub.Runner.Worker.Container;
|
||||||
@@ -937,6 +937,19 @@ namespace GitHub.Runner.Common.Tests.Worker
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
[Trait("Level", "L0")]
|
||||||
|
[Trait("Category", "Worker")]
|
||||||
|
public void CaptureTelemetryForGitUnsafeRepository()
|
||||||
|
{
|
||||||
|
using (Setup())
|
||||||
|
using (_outputManager)
|
||||||
|
{
|
||||||
|
Process("fatal: unsafe repository ('/github/workspace' is owned by someone else)");
|
||||||
|
Assert.Contains("fatal: unsafe repository ('/github/workspace' is owned by someone else)", _executionContext.Object.StepTelemetry.ErrorMessages);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private TestHostContext Setup(
|
private TestHostContext Setup(
|
||||||
[CallerMemberName] string name = "",
|
[CallerMemberName] string name = "",
|
||||||
IssueMatchersConfig matchers = null,
|
IssueMatchersConfig matchers = null,
|
||||||
@@ -962,6 +975,8 @@ namespace GitHub.Runner.Common.Tests.Worker
|
|||||||
Variables = _variables,
|
Variables = _variables,
|
||||||
WriteDebug = true,
|
WriteDebug = true,
|
||||||
});
|
});
|
||||||
|
_executionContext.Setup(x => x.StepTelemetry)
|
||||||
|
.Returns(new DTWebApi.ActionsStepTelemetry());
|
||||||
_executionContext.Setup(x => x.GetMatchers())
|
_executionContext.Setup(x => x.GetMatchers())
|
||||||
.Returns(matchers?.Matchers ?? new List<IssueMatcherConfig>());
|
.Returns(matchers?.Matchers ?? new List<IssueMatcherConfig>());
|
||||||
_executionContext.Setup(x => x.Add(It.IsAny<OnMatcherChanged>()))
|
_executionContext.Setup(x => x.Add(It.IsAny<OnMatcherChanged>()))
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
2.290.0
|
2.291.1
|
||||||
|
|||||||
Reference in New Issue
Block a user