Compare commits

..

2 Commits

Author SHA1 Message Date
Tingluo Huang
b86ce48745 Cherry-pick: Capture telemetry when git errors on unsafe repository. (#1823) (#1827)
* Capture telemetry when git errors on unsafe repository. (#1823)

* Release 2.290.1 runner.
2022-04-14 10:38:43 -04:00
Thomas Boop
d95bfc5d1f Update releaseVersion 2022-04-12 10:50:55 -04:00
6 changed files with 8 additions and 14 deletions

View File

@@ -101,11 +101,11 @@ jobs:
working-directory: src
# Run tests
#- name: L0
# run: |
# ${{ matrix.devScript }} test
# working-directory: src
# if: matrix.runtime != 'linux-arm64' && matrix.runtime != 'linux-arm'
- name: L0
run: |
${{ matrix.devScript }} test
working-directory: src
if: matrix.runtime != 'linux-arm64' && matrix.runtime != 'linux-arm'
# Create runner package tar.gz/zip
- name: Package Release

View File

@@ -13,6 +13,7 @@
- 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)
- Capture telemetry when git errors on unsafe repository. (#1823)
## 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.

View File

@@ -1 +1 @@
<Update to ./src/runnerversion when creating release>
2.290.1

View File

@@ -154,12 +154,6 @@ namespace GitHub.Runner.Worker.Handlers
if (line.Contains("fatal: unsafe repository", StringComparison.OrdinalIgnoreCase))
{
_executionContext.StepTelemetry.ErrorMessages.Add(line);
var gitUnsafeDirNotice = new DTWebApi.Issue
{
Message = $"You may experience error caused by a recently git safe directory enforcement. For more information see: https://github.blog/changelog/xxx",
Type = DTWebApi.IssueType.Notice,
};
_executionContext.AddIssue(gitUnsafeDirNotice);
}
// Regular output

View File

@@ -947,7 +947,6 @@ namespace GitHub.Runner.Common.Tests.Worker
{
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);
Assert.Contains(_issues, x => x.Item1.Type == DTWebApi.IssueType.Notice && x.Item1.Message.Contains("You may experience error caused by a recently git safe directory enforcement"));
}
}

View File

@@ -1 +1 @@
2.290.0
2.290.1