Compare commits

..

6 Commits

Author SHA1 Message Date
TingluoHuang
8c938489a6 release 2.262.1 runner. 2020-05-12 16:24:54 -04:00
Tingluo Huang
ef4f6aad67 Validate inputs only for repo action, no warning for small delay. (#476)
* validate inputs only for repo action, no warning for small delay.

* l0
2020-05-12 16:18:22 -04:00
Tingluo Huang
f472532284 Fix configure as service with runner name has space. (#474) 2020-05-12 16:18:15 -04:00
Brian Cristante
2d43c04c22 Use an env var to point to an Actions Service dev instance (#468)
* Use an environment variable for the testing backdoor

* Make the env var a boolean

We'll still have to pass the URL on the command line

* Empty commit to rerun CI
2020-05-12 16:18:07 -04:00
Tingluo Huang
a003b1ca69 create 2.262.0 runner release 2020-05-11 15:23:26 -04:00
TingluoHuang
7a65236022 prepare 2.262.0 runner release. 2020-05-11 15:05:59 -04:00
10 changed files with 47 additions and 29 deletions

View File

@@ -9,11 +9,11 @@ jobs:
CodeQL-Build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
fail-fast: false
# CodeQL runs on ubuntu-latest, windows-latest, and macos-latest
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
@@ -22,17 +22,13 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
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 (Windows)
if: runner.os == 'windows'
run : |
dev.cmd layout Release
working-directory: src
- name: Manual build (Non-Windows)
if: runner.os != 'windows'
run : |
./dev.sh layout Release
- name: Manual build
run : |
./dev.sh layout Release linux-x64
working-directory: src
- name: Perform CodeQL Analysis

View File

@@ -1,11 +1,22 @@
## Features
- Runner support for GHES Alpha (#381 #386 #390 #393 $401)
- Allow secrets context in Container.env (#388)
- Sample scripts to automate scalable runners (#427)
- Raise warning when action input does not match action.yml. (#429)
- 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
- Raise warning when volume mount root. (#413)
- Fix typo (#394)
- Print node version in debug instead of output. (#433)
- Better error when runner removed from service. (#441)
- 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
- N/A
- Make release notes code blocks copy-paste-able (#430)
- 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
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.168.0
2.262.1

View File

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

View File

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

View File

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

View File

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

View File

@@ -109,6 +109,7 @@ namespace GitHub.Runner.Worker
public sealed class ExecutionContext : RunnerService, IExecutionContext
{
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 Dictionary<Guid, TimelineRecord> _detailRecords = new Dictionary<Guid, TimelineRecord>();
@@ -335,7 +336,7 @@ namespace GitHub.Runner.Worker
}
// report total delay caused by server throttling.
if (_totalThrottlingDelayInMilliseconds > 0)
if (_totalThrottlingDelayInMilliseconds > _throttlingDelayReportThreshold)
{
this.Warning($"The job has experienced {TimeSpan.FromMilliseconds(_totalThrottlingDelayInMilliseconds).TotalSeconds} seconds total delay caused by server throttling.");
}
@@ -851,7 +852,8 @@ namespace GitHub.Runner.Worker
{
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."));

View File

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

View File

@@ -1 +1 @@
2.169.0
2.262.1