Skip to content

Commit 3424e3a

Browse files
committed
Revert "Update default version to node20 (#2844)" (#2918)
This reverts commit acdc6ed.
1 parent 6b9ba79 commit 3424e3a

File tree

6 files changed

+9
-13
lines changed

6 files changed

+9
-13
lines changed

docs/checks/nodejs.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
Make sure the built-in node.js has access to GitHub.com or GitHub Enterprise Server.
66

7-
The runner carries its own copy of node.js executable under `<runner_root>/externals/node20/`.
7+
The runner carries its own copy of node.js executable under `<runner_root>/externals/node16/`.
88

9-
All javascript base Actions will get executed by the built-in `node` at `<runner_root>/externals/node20/`.
9+
All javascript base Actions will get executed by the built-in `node` at `<runner_root>/externals/node16/`.
1010

1111
> Not the `node` from `$PATH`
1212

src/Misc/layoutbin/runsvc.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ if [ -f ".path" ]; then
1010
echo ".path=${PATH}"
1111
fi
1212

13-
nodever=${GITHUB_ACTIONS_RUNNER_FORCED_NODE_VERSION:-node20}
13+
nodever=${GITHUB_ACTIONS_RUNNER_FORCED_NODE_VERSION:-node16}
1414

1515
# insert anything to setup env when running as a service
1616
# run the host process which keep the listener alive

src/Misc/layoutbin/update.sh.template

+3-8
Original file line numberDiff line numberDiff line change
@@ -135,17 +135,12 @@ if [[ "$currentplatform" == 'darwin' && restartinteractiverunner -eq 0 ]]; then
135135
then
136136
# inspect the open file handles to find the node process
137137
# we can't actually inspect the process using ps because it uses relative paths and doesn't follow symlinks
138-
nodever="node20"
138+
nodever="node16"
139139
path=$(lsof -a -g "$procgroup" -F n | grep $nodever/bin/node | grep externals | tail -1 | cut -c2-)
140-
if [[ $? -ne 0 || -z "$path" ]] # Fallback if RunnerService.js was started with node16
140+
if [[ $? -ne 0 || -z "$path" ]] # Fallback if RunnerService.js was started with node12
141141
then
142-
nodever="node16"
142+
nodever="node12"
143143
path=$(lsof -a -g "$procgroup" -F n | grep $nodever/bin/node | grep externals | tail -1 | cut -c2-)
144-
if [[ $? -ne 0 || -z "$path" ]] # Fallback if RunnerService.js was started with node12
145-
then
146-
nodever="node12"
147-
path=$(lsof -a -g "$procgroup" -F n | grep $nodever/bin/node | grep externals | tail -1 | cut -c2-)
148-
fi
149144
fi
150145
if [[ $? -eq 0 && -n "$path" ]]
151146
then

src/Runner.Common/Constants.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ public static class Agent
257257
{
258258
public static readonly string ToolsDirectory = "agent.ToolsDirectory";
259259

260-
// 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.
260+
// 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.
261261
public static readonly string ForcedInternalNodeVersion = "ACTIONS_RUNNER_FORCED_INTERNAL_NODE_VERSION";
262262
public static readonly string ForcedActionsNodeVersion = "ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION";
263263
public static readonly string PrintLogToStdout = "ACTIONS_RUNNER_PRINT_LOG_TO_STDOUT";

src/Runner.Common/Util/NodeUtil.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ namespace GitHub.Runner.Common.Util
55
{
66
public static class NodeUtil
77
{
8-
private const string _defaultNodeVersion = "node20";
8+
private const string _defaultNodeVersion = "node16";
99
public static readonly ReadOnlyCollection<string> BuiltInNodeVersions = new(new[] { "node16", "node20" });
1010
public static string GetInternalNodeVersion()
1111
{

src/Runner.Worker/ExecutionContext.cs

+1
Original file line numberDiff line numberDiff line change
@@ -836,6 +836,7 @@ public void InitializeJob(Pipelines.AgentJobRequestMessage message, Cancellation
836836
// Actions environment
837837
ActionsEnvironment = message.ActionsEnvironment;
838838

839+
839840
// Service container info
840841
Global.ServiceContainers = new List<ContainerInfo>();
841842

0 commit comments

Comments
 (0)