Compare commits

...

7 Commits

Author SHA1 Message Date
Tingluo Huang
da218fdbe6 Create 2.310.2 Runner release. 2023-10-10 14:26:14 -04:00
Tingluo Huang
aa7cc31d62 trim whitespace. (#2915) 2023-10-10 14:25:25 -04:00
Tingluo Huang
f26eb98056 Fix telemetry publish from JobServerQueue. (#2919) 2023-10-10 14:25:17 -04:00
Tatyana Kostromskaya
ea931c7deb Bump patch version for new release 2023-10-10 15:23:40 +00:00
Tatyana Kostromskaya
8c3e8d0627 Bump patch version for new release 2023-10-10 15:23:16 +00:00
Tatyana Kostromskaya
3424e3aa32 Revert "Update default version to node20 (#2844)" (#2918)
This reverts commit acdc6edf7c.
2023-10-10 15:17:43 +00:00
Tingluo Huang
6b9ba79e26 Create 2.310.0 runner release. 2023-10-09 09:44:29 -04:00
18 changed files with 53 additions and 31 deletions

View File

@@ -4,9 +4,9 @@
Make sure the built-in node.js has access to GitHub.com or GitHub Enterprise Server. Make sure the built-in node.js has access to GitHub.com or GitHub Enterprise Server.
The runner carries its own copy of node.js executable under `<runner_root>/externals/node20/`. The runner carries its own copy of node.js executable under `<runner_root>/externals/node16/`.
All javascript base Actions will get executed by the built-in `node` at `<runner_root>/externals/node20/`. All javascript base Actions will get executed by the built-in `node` at `<runner_root>/externals/node16/`.
> Not the `node` from `$PATH` > Not the `node` from `$PATH`

View File

@@ -29,6 +29,7 @@
* Use RawHttpMessageHandler and VssHttpRetryMessageHandler in ResultsHttpClient by @yacaovsnc in https://github.com/actions/runner/pull/2908 * Use RawHttpMessageHandler and VssHttpRetryMessageHandler in ResultsHttpClient by @yacaovsnc in https://github.com/actions/runner/pull/2908
* Retries to lock Services database on Windows by @sugymt in https://github.com/actions/runner/pull/2880 * Retries to lock Services database on Windows by @sugymt in https://github.com/actions/runner/pull/2880
* Update default version to node20 by @takost in https://github.com/actions/runner/pull/2844 * Update default version to node20 by @takost in https://github.com/actions/runner/pull/2844
* Revert "Update default version to node20" by @takost in https://github.com/actions/runner/pull/2918
* Fixed Attempt typo by @corycalahan in https://github.com/actions/runner/pull/2849 * Fixed Attempt typo by @corycalahan in https://github.com/actions/runner/pull/2849
* Fix typo by @rajbos in https://github.com/actions/runner/pull/2670 * Fix typo by @rajbos in https://github.com/actions/runner/pull/2670

View File

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

View File

@@ -1 +1 @@
7539d33c35b0bc94ee67e3c0de1a6bac5ef89ce8e8efaa110131fa0520a54fb4 7539d33c35b0bc94ee67e3c0de1a6bac5ef89ce8e8efaa110131fa0520a54fb4

View File

@@ -1 +1 @@
d71a31f9a17e1a41d6e1edea596edfa68a0db5948ed160e86f2154a547f4dd10 d71a31f9a17e1a41d6e1edea596edfa68a0db5948ed160e86f2154a547f4dd10

View File

@@ -1 +1 @@
3c2f700d8a995efe7895614ee07d9c7880f872d214b45983ad6163e1931870ab 3c2f700d8a995efe7895614ee07d9c7880f872d214b45983ad6163e1931870ab

View File

@@ -1 +1 @@
b2d85c95ecad13d352f4c7d31c64dbb0d9c6381b48fa5874c4c72a43a025a8a1 b2d85c95ecad13d352f4c7d31c64dbb0d9c6381b48fa5874c4c72a43a025a8a1

View File

@@ -1 +1 @@
417d835c1a108619886b4bb5d25988cb6c138eb7b4c00320b1d9455c5630bff9 417d835c1a108619886b4bb5d25988cb6c138eb7b4c00320b1d9455c5630bff9

View File

@@ -1 +1 @@
8f35aaecfb53426ea10816442e23065142bab9dd0fb712a29e0fc471d13c44ac 8f35aaecfb53426ea10816442e23065142bab9dd0fb712a29e0fc471d13c44ac

View File

@@ -1 +1 @@
811c7debdfc54d074385b063b83c997e5360c8a9160cd20fe777713968370063 811c7debdfc54d074385b063b83c997e5360c8a9160cd20fe777713968370063

View File

@@ -10,7 +10,7 @@ if [ -f ".path" ]; then
echo ".path=${PATH}" echo ".path=${PATH}"
fi fi
nodever=${GITHUB_ACTIONS_RUNNER_FORCED_NODE_VERSION:-node20} nodever=${GITHUB_ACTIONS_RUNNER_FORCED_NODE_VERSION:-node16}
# insert anything to setup env when running as a service # insert anything to setup env when running as a service
# run the host process which keep the listener alive # run the host process which keep the listener alive

View File

@@ -135,17 +135,12 @@ if [[ "$currentplatform" == 'darwin' && restartinteractiverunner -eq 0 ]]; then
then then
# inspect the open file handles to find the node process # inspect the open file handles to find the node process
# we can't actually inspect the process using ps because it uses relative paths and doesn't follow symlinks # we can't actually inspect the process using ps because it uses relative paths and doesn't follow symlinks
nodever="node20" nodever="node16"
path=$(lsof -a -g "$procgroup" -F n | grep $nodever/bin/node | grep externals | tail -1 | cut -c2-) path=$(lsof -a -g "$procgroup" -F n | grep $nodever/bin/node | grep externals | tail -1 | cut -c2-)
if [[ $? -ne 0 || -z "$path" ]] # Fallback if RunnerService.js was started with node16 if [[ $? -ne 0 || -z "$path" ]] # Fallback if RunnerService.js was started with node12
then then
nodever="node16" nodever="node12"
path=$(lsof -a -g "$procgroup" -F n | grep $nodever/bin/node | grep externals | tail -1 | cut -c2-) path=$(lsof -a -g "$procgroup" -F n | grep $nodever/bin/node | grep externals | tail -1 | cut -c2-)
if [[ $? -ne 0 || -z "$path" ]] # Fallback if RunnerService.js was started with node12
then
nodever="node12"
path=$(lsof -a -g "$procgroup" -F n | grep $nodever/bin/node | grep externals | tail -1 | cut -c2-)
fi
fi fi
if [[ $? -eq 0 && -n "$path" ]] if [[ $? -eq 0 && -n "$path" ]]
then then

View File

@@ -257,7 +257,7 @@ namespace GitHub.Runner.Common
{ {
public static readonly string ToolsDirectory = "agent.ToolsDirectory"; public static readonly string ToolsDirectory = "agent.ToolsDirectory";
// Set this env var to "node16" to downgrade the node version for internal functions (e.g hashfiles). This does NOT affect the version of node actions. // Set this env var to "node12" to downgrade the node version for internal functions (e.g hashfiles). This does NOT affect the version of node actions.
public static readonly string ForcedInternalNodeVersion = "ACTIONS_RUNNER_FORCED_INTERNAL_NODE_VERSION"; public static readonly string ForcedInternalNodeVersion = "ACTIONS_RUNNER_FORCED_INTERNAL_NODE_VERSION";
public static readonly string ForcedActionsNodeVersion = "ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION"; public static readonly string ForcedActionsNodeVersion = "ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION";
public static readonly string PrintLogToStdout = "ACTIONS_RUNNER_PRINT_LOG_TO_STDOUT"; public static readonly string PrintLogToStdout = "ACTIONS_RUNNER_PRINT_LOG_TO_STDOUT";

View File

@@ -5,7 +5,7 @@ namespace GitHub.Runner.Common.Util
{ {
public static class NodeUtil public static class NodeUtil
{ {
private const string _defaultNodeVersion = "node20"; private const string _defaultNodeVersion = "node16";
public static readonly ReadOnlyCollection<string> BuiltInNodeVersions = new(new[] { "node16", "node20" }); public static readonly ReadOnlyCollection<string> BuiltInNodeVersions = new(new[] { "node16", "node20" });
public static string GetInternalNodeVersion() public static string GetInternalNodeVersion()
{ {

View File

@@ -836,6 +836,7 @@ namespace GitHub.Runner.Worker
// Actions environment // Actions environment
ActionsEnvironment = message.ActionsEnvironment; ActionsEnvironment = message.ActionsEnvironment;
// Service container info // Service container info
Global.ServiceContainers = new List<ContainerInfo>(); Global.ServiceContainers = new List<ContainerInfo>();

View File

@@ -402,7 +402,12 @@ namespace GitHub.Runner.Worker
try try
{ {
await ShutdownQueue(throwOnFailure: true); var jobQueueTelemetry = await ShutdownQueue(throwOnFailure: true);
// include any job telemetry from the background upload process.
if (jobQueueTelemetry.Count > 0)
{
jobContext.Global.JobTelemetry.AddRange(jobQueueTelemetry);
}
} }
catch (Exception ex) catch (Exception ex)
{ {
@@ -412,13 +417,6 @@ namespace GitHub.Runner.Worker
result = TaskResultUtil.MergeTaskResults(result, TaskResult.Failed); result = TaskResultUtil.MergeTaskResults(result, TaskResult.Failed);
} }
// include any job telemetry from the background upload process.
if (_jobServerQueue != null &&
_jobServerQueue.JobTelemetries.Count > 0)
{
jobContext.Global.JobTelemetry.AddRange(_jobServerQueue.JobTelemetries);
}
// Clean TEMP after finish process jobserverqueue, since there might be a pending fileupload still use the TEMP dir. // Clean TEMP after finish process jobserverqueue, since there might be a pending fileupload still use the TEMP dir.
_tempDirectoryManager?.CleanupTempDirectory(); _tempDirectoryManager?.CleanupTempDirectory();
@@ -511,7 +509,7 @@ namespace GitHub.Runner.Worker
} }
} }
private async Task ShutdownQueue(bool throwOnFailure) private async Task<IList<JobTelemetry>> ShutdownQueue(bool throwOnFailure)
{ {
if (_jobServerQueue != null) if (_jobServerQueue != null)
{ {
@@ -519,6 +517,7 @@ namespace GitHub.Runner.Worker
{ {
Trace.Info("Shutting down the job server queue."); Trace.Info("Shutting down the job server queue.");
await _jobServerQueue.ShutdownAsync(); await _jobServerQueue.ShutdownAsync();
return _jobServerQueue.JobTelemetries;
} }
catch (Exception ex) when (!throwOnFailure) catch (Exception ex) when (!throwOnFailure)
{ {
@@ -530,6 +529,8 @@ namespace GitHub.Runner.Worker
_jobServerQueue = null; // Prevent multiple attempts. _jobServerQueue = null; // Prevent multiple attempts.
} }
} }
return Array.Empty<JobTelemetry>();
} }
} }
} }

View File

@@ -273,5 +273,29 @@ namespace GitHub.Runner.Common.Tests
Assert.True(string.Equals(hashResult, File.ReadAllText(externalsHashFile).Trim()), $"Hash mismatch for externals. You might need to update `Misc/contentHash/externals/{BuildConstants.RunnerPackage.PackageName}` or check if `hashFiles.ts` ever changed recently."); Assert.True(string.Equals(hashResult, File.ReadAllText(externalsHashFile).Trim()), $"Hash mismatch for externals. You might need to update `Misc/contentHash/externals/{BuildConstants.RunnerPackage.PackageName}` or check if `hashFiles.ts` ever changed recently.");
} }
} }
[Fact]
[Trait("Level", "L0")]
[Trait("Category", "Common")]
public Task RunnerLayoutParts_ContentHashFilesNoNewline()
{
using (TestHostContext hc = new(this))
{
Tracing trace = hc.GetTrace();
var dotnetRuntimeHashFile = Path.Combine(TestUtil.GetSrcPath(), $"Misc/contentHash/dotnetRuntime/{BuildConstants.RunnerPackage.PackageName}");
var dotnetRuntimeHash = File.ReadAllText(dotnetRuntimeHashFile);
trace.Info($"Current hash: {dotnetRuntimeHash}");
var externalsHashFile = Path.Combine(TestUtil.GetSrcPath(), $"Misc/contentHash/externals/{BuildConstants.RunnerPackage.PackageName}");
var externalsHash = File.ReadAllText(externalsHashFile);
trace.Info($"Current hash: {externalsHash}");
Assert.False(externalsHash.Any(x => char.IsWhiteSpace(x)), $"Found whitespace in externals hash file.");
Assert.False(dotnetRuntimeHash.Any(x => char.IsWhiteSpace(x)), $"Found whitespace in dotnet runtime hash file.");
return Task.CompletedTask;
}
}
} }
} }

View File

@@ -1 +1 @@
2.310.0 2.310.2