Compare commits

..

3 Commits

Author SHA1 Message Date
TingluoHuang
edfad1a198 c 2020-05-11 14:28:43 -04:00
TingluoHuang
10bce3549c windows 2020-05-11 14:23:15 -04:00
TingluoHuang
68b180a229 run codeql on all platforms. 2020-05-11 14:09:58 -04:00
10 changed files with 29 additions and 47 deletions

View File

@@ -9,11 +9,11 @@ jobs:
CodeQL-Build: CodeQL-Build:
strategy: strategy:
fail-fast: false matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
# CodeQL runs on ubuntu-latest, windows-latest, and macos-latest # CodeQL runs on ubuntu-latest, windows-latest, and macos-latest
runs-on: ubuntu-latest runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout repository - name: Checkout repository
@@ -22,13 +22,17 @@ jobs:
# Initializes the CodeQL tools for scanning. # Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL - name: Initialize CodeQL
uses: github/codeql-action/init@v1 uses: github/codeql-action/init@v1
# Override language selection by uncommenting this and choosing your languages
# with:
# languages: go, javascript, csharp, python, cpp, java
- name: Manual build - name: Manual build (Windows)
run : | if: runner.os == 'windows'
./dev.sh layout Release linux-x64 run : |
dev.cmd layout Release
working-directory: src
- name: Manual build (Non-Windows)
if: runner.os != 'windows'
run : |
./dev.sh layout Release
working-directory: src working-directory: src
- name: Perform CodeQL Analysis - name: Perform CodeQL Analysis

View File

@@ -1,22 +1,11 @@
## Features ## Features
- Sample scripts to automate scalable runners (#427) - Runner support for GHES Alpha (#381 #386 #390 #393 $401)
- Raise warning when action input does not match action.yml. (#429) - Allow secrets context in Container.env (#388)
- Add secret masker for trimming double quotes. (#440)
- Use the API_URL and munge action URLs for GHES (#437 #469)
- Help trace worker crash in Kusto. (#450)
- update checkout@v1 for GHES (#470)
## Bugs ## Bugs
- Print node version in debug instead of output. (#433) - Raise warning when volume mount root. (#413)
- Better error when runner removed from service. (#441) - Fix typo (#394)
- Add help info for '--labels' config option (#472)
- Sps/token migration fix, job.status/steps.outcome/steps.conclusion case match with GitHub check suites conclusion. (#462)
- Docker build using -f instead of implied default (#471)
- Fix configure as service with runner name has space. (#474)
## Misc ## Misc
- Make release notes code blocks copy-paste-able (#430) - N/A
- Fix spelling of RHEL and CentOS. (#436)
- Add CodeQL Analysis workflow (#459)
- Use an env var to point to an Actions Service dev instance (#468)
## 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.

View File

@@ -1 +1 @@
2.262.1 2.168.0

View File

@@ -1,7 +1,6 @@
#!/bin/bash #!/bin/bash
SVC_NAME="{{SvcNameVar}}" SVC_NAME="{{SvcNameVar}}"
SVC_NAME=${SVC_NAME// /_}
SVC_DESCRIPTION="{{SvcDescription}}" SVC_DESCRIPTION="{{SvcDescription}}"
user_id=`id -u` user_id=`id -u`

View File

@@ -1,7 +1,6 @@
#!/bin/bash #!/bin/bash
SVC_NAME="{{SvcNameVar}}" SVC_NAME="{{SvcNameVar}}"
SVC_NAME=${SVC_NAME// /_}
SVC_DESCRIPTION="{{SvcDescription}}" SVC_DESCRIPTION="{{SvcDescription}}"
SVC_CMD=$1 SVC_CMD=$1

View File

@@ -92,11 +92,9 @@ namespace GitHub.Runner.Listener.Configuration
_term.WriteSection("Authentication"); _term.WriteSection("Authentication");
while (true) while (true)
{ {
// When testing against a dev deployment of Actions Service, set this environment variable // Get the URL
var useDevActionsServiceUrl = Environment.GetEnvironmentVariable("USE_DEV_ACTIONS_SERVICE_URL");
var inputUrl = command.GetUrl(); var inputUrl = command.GetUrl();
if (inputUrl.Contains("codedev.ms", StringComparison.OrdinalIgnoreCase) if (inputUrl.Contains("codedev.ms", StringComparison.OrdinalIgnoreCase))
|| useDevActionsServiceUrl != null)
{ {
runnerSettings.ServerUrl = inputUrl; runnerSettings.ServerUrl = inputUrl;
// Get the credentials // Get the credentials

View File

@@ -170,15 +170,11 @@ namespace GitHub.Runner.Worker
} }
} }
// Validate inputs only for actions with action.yml foreach (var input in userInputs)
if (Action.Reference.Type == Pipelines.ActionSourceType.Repository)
{ {
foreach (var input in userInputs) if (!validInputs.Contains(input))
{ {
if (!validInputs.Contains(input)) ExecutionContext.Warning($"Unexpected input '{input}', valid inputs are ['{string.Join("', '", validInputs)}']");
{
ExecutionContext.Warning($"Unexpected input '{input}', valid inputs are ['{string.Join("', '", validInputs)}']");
}
} }
} }

View File

@@ -109,7 +109,6 @@ namespace GitHub.Runner.Worker
public sealed class ExecutionContext : RunnerService, IExecutionContext public sealed class ExecutionContext : RunnerService, IExecutionContext
{ {
private const int _maxIssueCount = 10; private const int _maxIssueCount = 10;
private const int _throttlingDelayReportThreshold = 10 * 1000; // Don't report throttling with less than 10 seconds delay
private readonly TimelineRecord _record = new TimelineRecord(); private readonly TimelineRecord _record = new TimelineRecord();
private readonly Dictionary<Guid, TimelineRecord> _detailRecords = new Dictionary<Guid, TimelineRecord>(); private readonly Dictionary<Guid, TimelineRecord> _detailRecords = new Dictionary<Guid, TimelineRecord>();
@@ -336,7 +335,7 @@ namespace GitHub.Runner.Worker
} }
// report total delay caused by server throttling. // report total delay caused by server throttling.
if (_totalThrottlingDelayInMilliseconds > _throttlingDelayReportThreshold) if (_totalThrottlingDelayInMilliseconds > 0)
{ {
this.Warning($"The job has experienced {TimeSpan.FromMilliseconds(_totalThrottlingDelayInMilliseconds).TotalSeconds} seconds total delay caused by server throttling."); this.Warning($"The job has experienced {TimeSpan.FromMilliseconds(_totalThrottlingDelayInMilliseconds).TotalSeconds} seconds total delay caused by server throttling.");
} }
@@ -852,8 +851,7 @@ namespace GitHub.Runner.Worker
{ {
Interlocked.Add(ref _totalThrottlingDelayInMilliseconds, Convert.ToInt64(data.Delay.TotalMilliseconds)); Interlocked.Add(ref _totalThrottlingDelayInMilliseconds, Convert.ToInt64(data.Delay.TotalMilliseconds));
if (!_throttlingReported && if (!_throttlingReported)
_totalThrottlingDelayInMilliseconds > _throttlingDelayReportThreshold)
{ {
this.Warning(string.Format("The job is currently being throttled by the server. You may experience delays in console line output, job status reporting, and action log uploads.")); this.Warning(string.Format("The job is currently being throttled by the server. You may experience delays in console line output, job status reporting, and action log uploads."));

View File

@@ -295,10 +295,9 @@ namespace GitHub.Runner.Common.Tests.Worker
{ {
Name = "action", Name = "action",
Id = actionId, Id = actionId,
Reference = new Pipelines.RepositoryPathReference() Reference = new Pipelines.ContainerRegistryReference()
{ {
Name = "actions/runner", Image = "ubuntu:16.04"
Ref = "v1"
}, },
Inputs = actionInputs Inputs = actionInputs
}; };

View File

@@ -1 +1 @@
2.262.1 2.169.0