From 07bf080fa7f746104ed88979f5f3d96b51be8c72 Mon Sep 17 00:00:00 2001 From: Tatyana Kostromskaya <32135588+takost@users.noreply.github.com> Date: Tue, 25 Jul 2023 13:02:22 +0000 Subject: [PATCH 01/13] . --- src/Misc/externals.sh | 8 ---- src/Runner.Common/Constants.cs | 2 +- src/Runner.Worker/Handlers/HandlerFactory.cs | 47 ++++++++----------- .../Handlers/NodeScriptActionHandler.cs | 8 ++-- src/Test/L0/Worker/HandlerFactoryL0.cs | 30 ++---------- 5 files changed, 27 insertions(+), 68 deletions(-) diff --git a/src/Misc/externals.sh b/src/Misc/externals.sh index 5e86a75d3e6..d9606094882 100755 --- a/src/Misc/externals.sh +++ b/src/Misc/externals.sh @@ -4,7 +4,6 @@ PRECACHE=$2 NODE_URL=https://nodejs.org/dist UNOFFICIAL_NODE_URL=https://unofficial-builds.nodejs.org/download/release -NODE12_VERSION="12.22.7" NODE16_VERSION="16.16.0" get_abs_path() { @@ -137,8 +136,6 @@ function acquireExternalTool() { # Download the external tools only for Windows. if [[ "$PACKAGERUNTIME" == "win-x64" || "$PACKAGERUNTIME" == "win-x86" ]]; then - acquireExternalTool "$NODE_URL/v${NODE12_VERSION}/$PACKAGERUNTIME/node.exe" node12/bin - acquireExternalTool "$NODE_URL/v${NODE12_VERSION}/$PACKAGERUNTIME/node.lib" node12/bin acquireExternalTool "$NODE_URL/v${NODE16_VERSION}/$PACKAGERUNTIME/node.exe" node16/bin acquireExternalTool "$NODE_URL/v${NODE16_VERSION}/$PACKAGERUNTIME/node.lib" node16/bin if [[ "$PRECACHE" != "" ]]; then @@ -158,7 +155,6 @@ fi # Download the external tools only for OSX. if [[ "$PACKAGERUNTIME" == "osx-x64" ]]; then - acquireExternalTool "$NODE_URL/v${NODE12_VERSION}/node-v${NODE12_VERSION}-darwin-x64.tar.gz" node12 fix_nested_dir acquireExternalTool "$NODE_URL/v${NODE16_VERSION}/node-v${NODE16_VERSION}-darwin-x64.tar.gz" node16 fix_nested_dir fi @@ -169,18 +165,14 @@ fi # Download the external tools for Linux PACKAGERUNTIMEs. if [[ "$PACKAGERUNTIME" == "linux-x64" ]]; then - acquireExternalTool "$NODE_URL/v${NODE12_VERSION}/node-v${NODE12_VERSION}-linux-x64.tar.gz" node12 fix_nested_dir - acquireExternalTool "https://vstsagenttools.blob.core.windows.net/tools/nodejs/${NODE12_VERSION}/alpine/x64/node-v${NODE12_VERSION}-alpine-x64.tar.gz" node12_alpine acquireExternalTool "$NODE_URL/v${NODE16_VERSION}/node-v${NODE16_VERSION}-linux-x64.tar.gz" node16 fix_nested_dir acquireExternalTool "https://vstsagenttools.blob.core.windows.net/tools/nodejs/${NODE16_VERSION}/alpine/x64/node-v${NODE16_VERSION}-alpine-x64.tar.gz" node16_alpine fi if [[ "$PACKAGERUNTIME" == "linux-arm64" ]]; then - acquireExternalTool "$NODE_URL/v${NODE12_VERSION}/node-v${NODE12_VERSION}-linux-arm64.tar.gz" node12 fix_nested_dir acquireExternalTool "$NODE_URL/v${NODE16_VERSION}/node-v${NODE16_VERSION}-linux-arm64.tar.gz" node16 fix_nested_dir fi if [[ "$PACKAGERUNTIME" == "linux-arm" ]]; then - acquireExternalTool "$NODE_URL/v${NODE12_VERSION}/node-v${NODE12_VERSION}-linux-armv7l.tar.gz" node12 fix_nested_dir acquireExternalTool "$NODE_URL/v${NODE16_VERSION}/node-v${NODE16_VERSION}-linux-armv7l.tar.gz" node16 fix_nested_dir fi diff --git a/src/Runner.Common/Constants.cs b/src/Runner.Common/Constants.cs index 31b3daeefc5..dfb50ff4f6b 100644 --- a/src/Runner.Common/Constants.cs +++ b/src/Runner.Common/Constants.cs @@ -154,7 +154,7 @@ public static class ReturnCode public static class Features { public static readonly string DiskSpaceWarning = "runner.diskspace.warning"; - public static readonly string Node12Warning = "DistributedTask.AddWarningToNode12Action"; + public static readonly string Node16Warning = "DistributedTask.AddWarningToNode16Action"; public static readonly string LogTemplateErrorsAsDebugMessages = "DistributedTask.LogTemplateErrorsAsDebugMessages"; public static readonly string UseContainerPathForTemplate = "DistributedTask.UseContainerPathForTemplate"; public static readonly string AllowRunnerContainerHooks = "DistributedTask.AllowRunnerContainerHooks"; diff --git a/src/Runner.Worker/Handlers/HandlerFactory.cs b/src/Runner.Worker/Handlers/HandlerFactory.cs index 56532d9d8d8..0ef666905b4 100644 --- a/src/Runner.Worker/Handlers/HandlerFactory.cs +++ b/src/Runner.Worker/Handlers/HandlerFactory.cs @@ -58,40 +58,31 @@ public IHandler Create( var nodeData = data as NodeJSActionExecutionData; // With node12 EoL in 04/2022, we want to be able to uniformly upgrade all JS actions to node16 from the server - if (string.Equals(nodeData.NodeVersion, "node12", StringComparison.InvariantCultureIgnoreCase) && - (executionContext.Global.Variables.GetBoolean("DistributedTask.ForceGithubJavascriptActionsToNode16") ?? false)) + if (string.Equals(nodeData.NodeVersion, "node12", StringComparison.InvariantCultureIgnoreCase)) { - // The user can opt out of this behaviour by setting this variable to true, either setting 'env' in their workflow or as an environment variable on their machine - executionContext.Global.EnvironmentVariables.TryGetValue(Constants.Variables.Actions.AllowActionsUseUnsecureNodeVersion, out var workflowOptOut); - var isWorkflowOptOutSet = !string.IsNullOrEmpty(workflowOptOut); - var isLocalOptOut = StringUtil.ConvertToBoolean(Environment.GetEnvironmentVariable(Constants.Variables.Actions.AllowActionsUseUnsecureNodeVersion)); - bool isOptOut = isWorkflowOptOutSet ? StringUtil.ConvertToBoolean(workflowOptOut) : isLocalOptOut; - if (!isOptOut) + var repoAction = action as Pipelines.RepositoryPathReference; + if (repoAction != null) { - var repoAction = action as Pipelines.RepositoryPathReference; - if (repoAction != null) + var warningActions = new HashSet(); + if (executionContext.Global.Variables.TryGetValue(Constants.Runner.EnforcedNode12DetectedAfterEndOfLifeEnvVariable, out var node16ForceWarnings)) { - var warningActions = new HashSet(); - if (executionContext.Global.Variables.TryGetValue(Constants.Runner.EnforcedNode12DetectedAfterEndOfLifeEnvVariable, out var node16ForceWarnings)) - { - warningActions = StringUtil.ConvertFromJson>(node16ForceWarnings); - } - - var repoActionFullName = ""; - if (string.IsNullOrEmpty(repoAction.Name)) - { - repoActionFullName = repoAction.Path; // local actions don't have a 'Name' - } - else - { - repoActionFullName = $"{repoAction.Name}/{repoAction.Path ?? string.Empty}".TrimEnd('/') + $"@{repoAction.Ref}"; - } + warningActions = StringUtil.ConvertFromJson>(node16ForceWarnings); + } - warningActions.Add(repoActionFullName); - executionContext.Global.Variables.Set("Node16ForceActionsWarnings", StringUtil.ConvertToJson(warningActions)); + var repoActionFullName = ""; + if (string.IsNullOrEmpty(repoAction.Name)) + { + repoActionFullName = repoAction.Path; // local actions don't have a 'Name' } - nodeData.NodeVersion = "node16"; + else + { + repoActionFullName = $"{repoAction.Name}/{repoAction.Path ?? string.Empty}".TrimEnd('/') + $"@{repoAction.Ref}"; + } + + warningActions.Add(repoActionFullName); + executionContext.Global.Variables.Set("Node16ForceActionsWarnings", StringUtil.ConvertToJson(warningActions)); } + nodeData.NodeVersion = "node16"; } (handler as INodeScriptActionHandler).Data = nodeData; } diff --git a/src/Runner.Worker/Handlers/NodeScriptActionHandler.cs b/src/Runner.Worker/Handlers/NodeScriptActionHandler.cs index b5de017d62a..4f701d7cd93 100644 --- a/src/Runner.Worker/Handlers/NodeScriptActionHandler.cs +++ b/src/Runner.Worker/Handlers/NodeScriptActionHandler.cs @@ -136,13 +136,13 @@ public async Task RunAsync(ActionRunStage stage) // Remove environment variable that may cause conflicts with the node within the runner. Environment.Remove("NODE_ICU_DATA"); // https://github.com/actions/runner/issues/795 - if (Data.NodeVersion == "node12" && (ExecutionContext.Global.Variables.GetBoolean(Constants.Runner.Features.Node12Warning) ?? false)) + if (Data.NodeVersion == "node16" && (ExecutionContext.Global.Variables.GetBoolean(Constants.Runner.Features.Node16Warning) ?? false)) { var repoAction = Action as RepositoryPathReference; var warningActions = new HashSet(); - if (ExecutionContext.Global.Variables.TryGetValue("Node12ActionsWarnings", out var node12Warnings)) + if (ExecutionContext.Global.Variables.TryGetValue("Node16ActionsWarnings", out var node16Warnings)) { - warningActions = StringUtil.ConvertFromJson>(node12Warnings); + warningActions = StringUtil.ConvertFromJson>(node16Warnings); } var repoActionFullName = ""; @@ -156,7 +156,7 @@ public async Task RunAsync(ActionRunStage stage) } warningActions.Add(repoActionFullName); - ExecutionContext.Global.Variables.Set("Node12ActionsWarnings", StringUtil.ConvertToJson(warningActions)); + ExecutionContext.Global.Variables.Set("Node16ActionsWarnings", StringUtil.ConvertToJson(warningActions)); } using (var stdoutManager = new OutputManager(ExecutionContext, ActionCommandManager)) diff --git a/src/Test/L0/Worker/HandlerFactoryL0.cs b/src/Test/L0/Worker/HandlerFactoryL0.cs index 18cf8e8ff07..ce5fb5d8116 100644 --- a/src/Test/L0/Worker/HandlerFactoryL0.cs +++ b/src/Test/L0/Worker/HandlerFactoryL0.cs @@ -30,19 +30,9 @@ private TestHostContext CreateTestContext([CallerMemberName] string testName = " [Theory] [Trait("Level", "L0")] [Trait("Category", "Worker")] - [InlineData("node12", "", "", "", "node12")] - [InlineData("node12", "true", "", "", "node16")] - [InlineData("node12", "true", "", "true", "node12")] - [InlineData("node12", "true", "true", "", "node12")] - [InlineData("node12", "true", "true", "true", "node12")] - [InlineData("node12", "true", "false", "true", "node16")] // workflow overrides env - [InlineData("node16", "", "", "", "node16")] - [InlineData("node16", "true", "", "", "node16")] - [InlineData("node16", "true", "", "true", "node16")] - [InlineData("node16", "true", "true", "", "node16")] - [InlineData("node16", "true", "true", "true", "node16")] - [InlineData("node16", "true", "false", "true", "node16")] - public void IsNodeVersionUpgraded(string inputVersion, string serverFeatureFlag, string workflowOptOut, string machineOptOut, string expectedVersion) + [InlineData("node12", "node16")] + [InlineData("node16", "node16")] + public void IsNodeVersionUpgraded(string inputVersion, string expectedVersion) { using (TestHostContext hc = CreateTestContext()) { @@ -52,24 +42,10 @@ public void IsNodeVersionUpgraded(string inputVersion, string serverFeatureFlag, // Server Feature Flag var variables = new Dictionary(); - if (!string.IsNullOrEmpty(serverFeatureFlag)) - { - variables["DistributedTask.ForceGithubJavascriptActionsToNode16"] = serverFeatureFlag; - } Variables serverVariables = new(hc, variables); // Workflow opt-out var workflowVariables = new Dictionary(); - if (!string.IsNullOrEmpty(workflowOptOut)) - { - workflowVariables[Constants.Variables.Actions.AllowActionsUseUnsecureNodeVersion] = workflowOptOut; - } - - // Machine opt-out - if (!string.IsNullOrEmpty(machineOptOut)) - { - Environment.SetEnvironmentVariable(Constants.Variables.Actions.AllowActionsUseUnsecureNodeVersion, machineOptOut); - } _ec.Setup(x => x.Global).Returns(new GlobalContext() { From b86881abce7aebfdd9b5bdb949f61c68a5f3ae8c Mon Sep 17 00:00:00 2001 From: Tatyana Kostromskaya <32135588+takost@users.noreply.github.com> Date: Wed, 26 Jul 2023 12:13:15 +0000 Subject: [PATCH 02/13] fix hashes --- src/Misc/contentHash/externals/linux-x64 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Misc/contentHash/externals/linux-x64 b/src/Misc/contentHash/externals/linux-x64 index 29c47502111..f3f9133df35 100644 --- a/src/Misc/contentHash/externals/linux-x64 +++ b/src/Misc/contentHash/externals/linux-x64 @@ -1 +1 @@ -a9fb9c14e24e79aec97d4da197dd7bfc6364297d6fce573afb2df48cc9a931f8 \ No newline at end of file +b986fa4323bf005e96ed5133aed1970c2a084060a6106a64a5a87a4c42f4da30 \ No newline at end of file From 7d252c918390ff06b5c6b0470fd0b4aff641eeab Mon Sep 17 00:00:00 2001 From: Tatyana Kostromskaya <32135588+takost@users.noreply.github.com> Date: Wed, 26 Jul 2023 12:25:08 +0000 Subject: [PATCH 03/13] fix linux-arm --- src/Misc/contentHash/externals/linux-arm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Misc/contentHash/externals/linux-arm b/src/Misc/contentHash/externals/linux-arm index 778d0975d4a..a05e941f58d 100644 --- a/src/Misc/contentHash/externals/linux-arm +++ b/src/Misc/contentHash/externals/linux-arm @@ -1 +1 @@ -3807dcbf947e840c33535fb466b096d76bf09e5c0254af8fc8cbbb24c6388222 \ No newline at end of file +ad945e2a961bcbe31c5c90f7781cb23eb1004852345d929cfc122dd085575807 \ No newline at end of file From a51b756b72c533a192d386c21d9aa0ba67049a4f Mon Sep 17 00:00:00 2001 From: Tatyana Kostromskaya <32135588+takost@users.noreply.github.com> Date: Wed, 26 Jul 2023 12:27:13 +0000 Subject: [PATCH 04/13] linux-arm64 --- src/Misc/contentHash/externals/linux-arm64 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Misc/contentHash/externals/linux-arm64 b/src/Misc/contentHash/externals/linux-arm64 index 49f41a1da9e..1c5943e30ba 100644 --- a/src/Misc/contentHash/externals/linux-arm64 +++ b/src/Misc/contentHash/externals/linux-arm64 @@ -1 +1 @@ -ee01eee80cd8a460a4b9780ee13fdd20f25c59e754b4ccd99df55fbba2a85634 \ No newline at end of file +9e846b24c7eb2fe41b9af90cc881e9fc5c35dda6e53d7a986888f020c4daef46 \ No newline at end of file From 28b0e60df3db46bf036aa78b383b479f07ecc2d6 Mon Sep 17 00:00:00 2001 From: Tatyana Kostromskaya <32135588+takost@users.noreply.github.com> Date: Wed, 26 Jul 2023 12:29:33 +0000 Subject: [PATCH 05/13] osx-x64 --- src/Misc/contentHash/externals/osx-x64 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Misc/contentHash/externals/osx-x64 b/src/Misc/contentHash/externals/osx-x64 index f387ba76ede..41eb854f6eb 100644 --- a/src/Misc/contentHash/externals/osx-x64 +++ b/src/Misc/contentHash/externals/osx-x64 @@ -1 +1 @@ -17ac17fbe785b3d6fa2868d8d17185ebfe0c90b4b0ddf6b67eac70e42bcd989b \ No newline at end of file +8b514de0b5473d22c0d00110cbc75b79e2758379cbebe00863b6c4bc6d63b12e \ No newline at end of file From 3dd6c677b8dae51d7e7a947b2e8023b5fc60b49b Mon Sep 17 00:00:00 2001 From: Tatyana Kostromskaya <32135588+takost@users.noreply.github.com> Date: Wed, 26 Jul 2023 12:33:39 +0000 Subject: [PATCH 06/13] win-x64 --- src/Misc/contentHash/externals/win-x64 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Misc/contentHash/externals/win-x64 b/src/Misc/contentHash/externals/win-x64 index 46422113b85..bd894f4e104 100644 --- a/src/Misc/contentHash/externals/win-x64 +++ b/src/Misc/contentHash/externals/win-x64 @@ -1 +1 @@ -24fd131b5dce33ef16038b771407bc0507da8682a72fb3b7780607235f76db0b \ No newline at end of file +66bb8b366e8d11910804454d887a0a6b487e543b86466636b455e90fa34e541a \ No newline at end of file From a9cafd708362f9120ae9653c1dd2ccdf8eb4193b Mon Sep 17 00:00:00 2001 From: Tatyana Kostromskaya <32135588+takost@users.noreply.github.com> Date: Wed, 26 Jul 2023 16:26:09 +0000 Subject: [PATCH 07/13] clean up node12 deprecation warning --- src/Runner.Common/Constants.cs | 1 - .../Handlers/NodeScriptActionHandler.cs | 23 ------------------- src/Runner.Worker/JobRunner.cs | 12 +++------- 3 files changed, 3 insertions(+), 33 deletions(-) diff --git a/src/Runner.Common/Constants.cs b/src/Runner.Common/Constants.cs index dfb50ff4f6b..e374f36740e 100644 --- a/src/Runner.Common/Constants.cs +++ b/src/Runner.Common/Constants.cs @@ -171,7 +171,6 @@ public static class Features public static readonly string UnsupportedStopCommandTokenDisabled = "You cannot use a endToken that is an empty string, the string 'pause-logging', or another workflow command. For more information see: https://docs.github.com/actions/learn-github-actions/workflow-commands-for-github-actions#example-stopping-and-starting-workflow-commands or opt into insecure command execution by setting the `ACTIONS_ALLOW_UNSECURE_STOPCOMMAND_TOKENS` environment variable to `true`."; public static readonly string UnsupportedSummarySize = "$GITHUB_STEP_SUMMARY upload aborted, supports content up to a size of {0}k, got {1}k. For more information see: https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-markdown-summary"; public static readonly string SummaryUploadError = "$GITHUB_STEP_SUMMARY upload aborted, an error occurred when uploading the summary. For more information see: https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-markdown-summary"; - public static readonly string Node12DetectedAfterEndOfLife = "Node.js 12 actions are deprecated. Please update the following actions to use Node.js 16: {0}. For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/."; public static readonly string EnforcedNode12DetectedAfterEndOfLife = "The following actions uses node12 which is deprecated and will be forced to run on node16: {0}. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/"; public static readonly string EnforcedNode12DetectedAfterEndOfLifeEnvVariable = "Node16ForceActionsWarnings"; } diff --git a/src/Runner.Worker/Handlers/NodeScriptActionHandler.cs b/src/Runner.Worker/Handlers/NodeScriptActionHandler.cs index 4f701d7cd93..986cf6b11fa 100644 --- a/src/Runner.Worker/Handlers/NodeScriptActionHandler.cs +++ b/src/Runner.Worker/Handlers/NodeScriptActionHandler.cs @@ -136,29 +136,6 @@ public async Task RunAsync(ActionRunStage stage) // Remove environment variable that may cause conflicts with the node within the runner. Environment.Remove("NODE_ICU_DATA"); // https://github.com/actions/runner/issues/795 - if (Data.NodeVersion == "node16" && (ExecutionContext.Global.Variables.GetBoolean(Constants.Runner.Features.Node16Warning) ?? false)) - { - var repoAction = Action as RepositoryPathReference; - var warningActions = new HashSet(); - if (ExecutionContext.Global.Variables.TryGetValue("Node16ActionsWarnings", out var node16Warnings)) - { - warningActions = StringUtil.ConvertFromJson>(node16Warnings); - } - - var repoActionFullName = ""; - if (string.IsNullOrEmpty(repoAction.Name)) - { - repoActionFullName = repoAction.Path; // local actions don't have a 'Name' - } - else - { - repoActionFullName = $"{repoAction.Name}/{repoAction.Path ?? string.Empty}".TrimEnd('/') + $"@{repoAction.Ref}"; - } - - warningActions.Add(repoActionFullName); - ExecutionContext.Global.Variables.Set("Node16ActionsWarnings", StringUtil.ConvertToJson(warningActions)); - } - using (var stdoutManager = new OutputManager(ExecutionContext, ActionCommandManager)) using (var stderrManager = new OutputManager(ExecutionContext, ActionCommandManager)) { diff --git a/src/Runner.Worker/JobRunner.cs b/src/Runner.Worker/JobRunner.cs index 45a035e8fd2..5e50fd6809f 100644 --- a/src/Runner.Worker/JobRunner.cs +++ b/src/Runner.Worker/JobRunner.cs @@ -269,10 +269,10 @@ private async Task CompleteJobAsync(IRunServer runServer, IExecution { jobContext.Debug($"Finishing: {message.JobDisplayName}"); TaskResult result = jobContext.Complete(taskResult); - if (jobContext.Global.Variables.TryGetValue("Node12ActionsWarnings", out var node12Warnings)) + if (jobContext.Global.Variables.TryGetValue(Constants.Runner.EnforcedNode12DetectedAfterEndOfLifeEnvVariable, out var node16ForceWarnings)) { - var actions = string.Join(", ", StringUtil.ConvertFromJson>(node12Warnings)); - jobContext.Warning(string.Format(Constants.Runner.Node12DetectedAfterEndOfLife, actions)); + var actions = string.Join(", ", StringUtil.ConvertFromJson>(node16ForceWarnings)); + jobContext.Warning(string.Format(Constants.Runner.EnforcedNode12DetectedAfterEndOfLife, actions)); } // Make sure to clean temp after file upload since they may be pending fileupload still use the TEMP dir. @@ -368,12 +368,6 @@ private async Task CompleteJobAsync(IJobServer jobServer, IExecution } } - if (jobContext.Global.Variables.TryGetValue("Node12ActionsWarnings", out var node12Warnings)) - { - var actions = string.Join(", ", StringUtil.ConvertFromJson>(node12Warnings)); - jobContext.Warning(string.Format(Constants.Runner.Node12DetectedAfterEndOfLife, actions)); - } - if (jobContext.Global.Variables.TryGetValue(Constants.Runner.EnforcedNode12DetectedAfterEndOfLifeEnvVariable, out var node16ForceWarnings)) { var actions = string.Join(", ", StringUtil.ConvertFromJson>(node16ForceWarnings)); From eeb4cbc6ef32520ea996a3e453f3b33ea267a8c2 Mon Sep 17 00:00:00 2001 From: Tatyana Kostromskaya <32135588+takost@users.noreply.github.com> Date: Thu, 3 Aug 2023 14:11:55 +0000 Subject: [PATCH 08/13] Remove node12 from the BuildInVersions list --- src/Runner.Common/Util/NodeUtil.cs | 5 ----- src/Runner.Worker/ExecutionContext.cs | 4 ++-- src/Runner.Worker/Handlers/NodeScriptActionHandler.cs | 8 +------- 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/src/Runner.Common/Util/NodeUtil.cs b/src/Runner.Common/Util/NodeUtil.cs index a9cbfc6df21..e39031cba50 100644 --- a/src/Runner.Common/Util/NodeUtil.cs +++ b/src/Runner.Common/Util/NodeUtil.cs @@ -6,12 +6,7 @@ namespace GitHub.Runner.Common.Util public static class NodeUtil { private const string _defaultNodeVersion = "node16"; - -#if (OS_OSX || OS_WINDOWS) && ARM64 public static readonly ReadOnlyCollection BuiltInNodeVersions = new(new[] { "node16" }); -#else - public static readonly ReadOnlyCollection BuiltInNodeVersions = new(new[] { "node12", "node16" }); -#endif public static string GetInternalNodeVersion() { diff --git a/src/Runner.Worker/ExecutionContext.cs b/src/Runner.Worker/ExecutionContext.cs index dce933c8b4d..9ed9faeb024 100644 --- a/src/Runner.Worker/ExecutionContext.cs +++ b/src/Runner.Worker/ExecutionContext.cs @@ -807,9 +807,9 @@ public void InitializeJob(Pipelines.AgentJobRequestMessage message, Cancellation Global.Variables = new Variables(HostContext, variables); - if (Global.Variables.GetBoolean("DistributedTask.ForceInternalNodeVersionOnRunnerTo12") ?? false) + if (Global.Variables.GetBoolean("DistributedTask.ForceInternalNodeVersionOnRunnerTo16") ?? false) { - Environment.SetEnvironmentVariable(Constants.Variables.Agent.ForcedInternalNodeVersion, "node12"); + Environment.SetEnvironmentVariable(Constants.Variables.Agent.ForcedInternalNodeVersion, "node16"); } // Environment variables shared across all actions diff --git a/src/Runner.Worker/Handlers/NodeScriptActionHandler.cs b/src/Runner.Worker/Handlers/NodeScriptActionHandler.cs index ea84b3bdb41..2388ee02247 100644 --- a/src/Runner.Worker/Handlers/NodeScriptActionHandler.cs +++ b/src/Runner.Worker/Handlers/NodeScriptActionHandler.cs @@ -102,18 +102,12 @@ public async Task RunAsync(ActionRunStage stage) workingDirectory = HostContext.GetDirectory(WellKnownDirectory.Work); } -#if OS_OSX || OS_WINDOWS if (string.Equals(Data.NodeVersion, "node12", StringComparison.OrdinalIgnoreCase) && Constants.Runner.PlatformArchitecture.Equals(Constants.Architecture.Arm64)) { -#if OS_OSX - ExecutionContext.Output($"The node12 is not supported on macOS ARM64 platform. Use node16 instead."); -#elif OS_WINDOWS - ExecutionContext.Output($"The node12 is not supported on windows ARM64 platform. Use node16 instead."); -#endif + ExecutionContext.Output($"The node12 is not supported. Use node16 instead."); Data.NodeVersion = "node16"; } -#endif string forcedNodeVersion = System.Environment.GetEnvironmentVariable(Constants.Variables.Agent.ForcedActionsNodeVersion); if (forcedNodeVersion == "node16" && Data.NodeVersion != "node16") From 3876507609aefce46085a2d517b90b18dc24394d Mon Sep 17 00:00:00 2001 From: Tatyana Kostromskaya <32135588+takost@users.noreply.github.com> Date: Wed, 9 Aug 2023 10:56:56 +0000 Subject: [PATCH 09/13] fix externls hash --- src/Misc/contentHash/externals/linux-arm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Misc/contentHash/externals/linux-arm b/src/Misc/contentHash/externals/linux-arm index 40b1568c9a3..6b7b0e28544 100644 --- a/src/Misc/contentHash/externals/linux-arm +++ b/src/Misc/contentHash/externals/linux-arm @@ -1 +1 @@ -205b567a8c3a5117e5f405dc807b2f30d92634ce3c1a542736b2ad626411d3f5 \ No newline at end of file +209a3b07522d883b745945ec8b1bfa57c0bce769573c3e79206b62959686c0d3 \ No newline at end of file From 6b6a3cfe154a4c08fec73e4e010c770528f4dece Mon Sep 17 00:00:00 2001 From: Tatyana Kostromskaya <32135588+takost@users.noreply.github.com> Date: Wed, 9 Aug 2023 10:59:31 +0000 Subject: [PATCH 10/13] fix externls hash --- src/Misc/contentHash/externals/linux-arm64 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Misc/contentHash/externals/linux-arm64 b/src/Misc/contentHash/externals/linux-arm64 index 1d3d7cf1c2e..5793cdfeca4 100644 --- a/src/Misc/contentHash/externals/linux-arm64 +++ b/src/Misc/contentHash/externals/linux-arm64 @@ -1 +1 @@ -3fb61ee5226e14d2ff8e4415d32da311f72243a8ba68ad280e85aef6f3950329 \ No newline at end of file +1dd7654995ab54ce0d06519ad84c25029f0924f8313f0f5b7811c3631982a5e5 \ No newline at end of file From 79e8887fe0f9023df52dc13dc77dc2ab464f21b6 Mon Sep 17 00:00:00 2001 From: Tatyana Kostromskaya <32135588+takost@users.noreply.github.com> Date: Wed, 9 Aug 2023 11:08:51 +0000 Subject: [PATCH 11/13] fix externls hash --- src/Misc/contentHash/externals/linux-x64 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Misc/contentHash/externals/linux-x64 b/src/Misc/contentHash/externals/linux-x64 index e96e2a2c8e0..f940a46b500 100644 --- a/src/Misc/contentHash/externals/linux-x64 +++ b/src/Misc/contentHash/externals/linux-x64 @@ -1 +1 @@ -88cdd58d606bff13857a09fd13f207f0e9360820d036fc8b53b34759abd9baa8 \ No newline at end of file +9a06b2be3c18a06d2e676774d8b6d2869854f23f982433e9346bc7bdcb08f362 \ No newline at end of file From 49235a114b6a526278b8629ce4583c6922724c8d Mon Sep 17 00:00:00 2001 From: Tatyana Kostromskaya <32135588+takost@users.noreply.github.com> Date: Wed, 9 Aug 2023 12:04:44 +0000 Subject: [PATCH 12/13] fix externals hash --- src/Misc/contentHash/externals/win-x64 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Misc/contentHash/externals/win-x64 b/src/Misc/contentHash/externals/win-x64 index cc984a30b0e..4948aeb1202 100644 --- a/src/Misc/contentHash/externals/win-x64 +++ b/src/Misc/contentHash/externals/win-x64 @@ -1 +1 @@ -b671357b482eba5a3b166303f4943372e908ab8b243f122afc8ee08903a22ab0 +e2fa2229ed5bc8857acdd264c2f3964454fd710c776efdfb5dc0b40b7a75065a \ No newline at end of file From b69fcc4fda126a67b0c74685e07109092e8d4861 Mon Sep 17 00:00:00 2001 From: Tatyana Kostromskaya <32135588+takost@users.noreply.github.com> Date: Wed, 9 Aug 2023 12:21:34 +0000 Subject: [PATCH 13/13] fix externals hash --- src/Misc/contentHash/externals/osx-x64 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Misc/contentHash/externals/osx-x64 b/src/Misc/contentHash/externals/osx-x64 index a2809211f4b..4d9d1495739 100644 --- a/src/Misc/contentHash/externals/osx-x64 +++ b/src/Misc/contentHash/externals/osx-x64 @@ -1 +1 @@ -c6267cf59873f58c9d6fa23e2fe72ea41ca578452c8ae60f6cdb599ae7674eb0 +fc5efd1df9c75f01d7b6a43018ba49257bdc0d65e743ddd1ae753802a5ddb736