Compare commits

...

5 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
9 changed files with 24 additions and 11 deletions

View File

@@ -11,10 +11,12 @@
- Add help info for '--labels' config option (#472) - 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) - 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) - 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) - Make release notes code blocks copy-paste-able (#430)
- Fix spelling of RHEL and CentOS. (#436) - Fix spelling of RHEL and CentOS. (#436)
- Add CodeQL Analysis workflow (#459) - 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 @@
<Update to ./src/runnerversion when creating release> 2.262.1

View File

@@ -1,6 +1,7 @@
#!/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,6 +1,7 @@
#!/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,9 +92,11 @@ namespace GitHub.Runner.Listener.Configuration
_term.WriteSection("Authentication"); _term.WriteSection("Authentication");
while (true) 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(); 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,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 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>();
@@ -335,7 +336,7 @@ namespace GitHub.Runner.Worker
} }
// report total delay caused by server throttling. // 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."); 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)); 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,9 +295,10 @@ namespace GitHub.Runner.Common.Tests.Worker
{ {
Name = "action", Name = "action",
Id = actionId, Id = actionId,
Reference = new Pipelines.ContainerRegistryReference() Reference = new Pipelines.RepositoryPathReference()
{ {
Image = "ubuntu:16.04" Name = "actions/runner",
Ref = "v1"
}, },
Inputs = actionInputs Inputs = actionInputs
}; };

View File

@@ -1 +1 @@
2.262.0 2.262.1