Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 1.4k
Node 24 enforcement + Linux ARM32 deprecation support#4303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
salmanmkc
merged 7 commits into
main
from
salmanmkc/node24-enforcement-arm32-deprecationMar 17, 2026
Uh oh!
There was an error while loading. Please reload this page.
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
4c5eac9
Node 24 enforcement + Linux ARM32 deprecation support
salmanmkc 3bd3bff
Add support for tracking actions on Node.js 20 due to ARM32 limitations
salmanmkc e2e0705
Add migration dates, consolidate ARM32 to use Node20RemovalDate
salmanmkc 3f201cb
Read migration dates from job variables with hardcoded fallbacks
salmanmkc 35c2831
Fix formatting and minor cleanup in HandlerFactory and tests
salmanmkc 9a23688
Guard against empty string date overrides from server
salmanmkc b51675c
Merge branch 'main' into salmanmkc/node24-enforcement-arm32-deprecation
salmanmkc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -25,6 +25,14 @@ IHandler Create( | ||
| public sealed class HandlerFactory : RunnerService, IHandlerFactory | ||
| { | ||
| internal static bool ShouldTrackAsArm32Node20(bool deprecateArm32, string preferredNodeVersion, string finalNodeVersion, string platformWarningMessage) | ||
| { | ||
| return deprecateArm32 && | ||
| !string.IsNullOrEmpty(platformWarningMessage) && | ||
| string.Equals(preferredNodeVersion, Constants.Runner.NodeMigration.Node24, StringComparison.OrdinalIgnoreCase) && | ||
| string.Equals(finalNodeVersion, Constants.Runner.NodeMigration.Node20, StringComparison.OrdinalIgnoreCase); | ||
| } | ||
| public IHandler Create( | ||
| IExecutionContext executionContext, | ||
| Pipelines.ActionStepDefinitionReference action, | ||
| @@ -65,19 +73,12 @@ public IHandler Create( | ||
| nodeData.NodeVersion = Common.Constants.Runner.NodeMigration.Node20; | ||
| } | ||
| // Track Node.js 20 actions for deprecation annotation | ||
| if (string.Equals(nodeData.NodeVersion, Constants.Runner.NodeMigration.Node20, StringComparison.InvariantCultureIgnoreCase)) | ||
| { | ||
| bool warnOnNode20 = executionContext.Global.Variables?.GetBoolean(Constants.Runner.NodeMigration.WarnOnNode20Flag) ?? false; | ||
| if (warnOnNode20) | ||
| { | ||
| string actionName = GetActionName(action); | ||
| if (!string.IsNullOrEmpty(actionName)) | ||
| { | ||
| executionContext.Global.DeprecatedNode20Actions?.Add(actionName); | ||
| } | ||
| } | ||
| } | ||
| // Read flags early; actionName is also resolved up front for tracking after version is determined | ||
| bool warnOnNode20 = executionContext.Global.Variables?.GetBoolean(Constants.Runner.NodeMigration.WarnOnNode20Flag) ?? false; | ||
| bool deprecateArm32 = executionContext.Global.Variables?.GetBoolean(Constants.Runner.NodeMigration.DeprecateLinuxArm32Flag) ?? false; | ||
| bool killArm32 = executionContext.Global.Variables?.GetBoolean(Constants.Runner.NodeMigration.KillLinuxArm32Flag) ?? false; | ||
| string node20RemovalDate = executionContext.Global.Variables?.Get(Constants.Runner.NodeMigration.Node20RemovalDateVariable); | ||
| string actionName = GetActionName(action); | ||
| // Check if node20 was explicitly specified in the action | ||
| // We don't modify if node24 was explicitly specified | ||
| @@ -87,7 +88,15 @@ public IHandler Create( | ||
| bool requireNode24 = executionContext.Global.Variables?.GetBoolean(Constants.Runner.NodeMigration.RequireNode24Flag) ?? false; | ||
| var (nodeVersion, configWarningMessage) = NodeUtil.DetermineActionsNodeVersion(environment, useNode24ByDefault, requireNode24); | ||
| var (finalNodeVersion, platformWarningMessage) = NodeUtil.CheckNodeVersionForLinuxArm32(nodeVersion); | ||
| var (finalNodeVersion, platformWarningMessage) = NodeUtil.CheckNodeVersionForLinuxArm32(nodeVersion, deprecateArm32, killArm32, node20RemovalDate); | ||
salmanmkc marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| // ARM32 kill switch: fail the step | ||
| if (finalNodeVersion == null) | ||
| { | ||
| executionContext.Error(platformWarningMessage); | ||
| throw new InvalidOperationException(platformWarningMessage); | ||
| } | ||
| nodeData.NodeVersion = finalNodeVersion; | ||
| if (!string.IsNullOrEmpty(configWarningMessage)) | ||
| @@ -100,6 +109,26 @@ public IHandler Create( | ||
| executionContext.Warning(platformWarningMessage); | ||
| } | ||
| // Track actions based on their final node version | ||
| if (!string.IsNullOrEmpty(actionName)) | ||
| { | ||
| if (string.Equals(finalNodeVersion, Constants.Runner.NodeMigration.Node24, StringComparison.OrdinalIgnoreCase)) | ||
| { | ||
| // Action was upgraded from node20 to node24 | ||
| executionContext.Global.UpgradedToNode24Actions?.Add(actionName); | ||
| } | ||
| else if (ShouldTrackAsArm32Node20(deprecateArm32, nodeVersion, finalNodeVersion, platformWarningMessage)) | ||
| { | ||
| // Action is on node20 because ARM32 can't run node24 | ||
| executionContext.Global.Arm32Node20Actions?.Add(actionName); | ||
| } | ||
| else if (warnOnNode20) | ||
| { | ||
| // Action is still running on node20 (general case) | ||
| executionContext.Global.DeprecatedNode20Actions?.Add(actionName); | ||
| } | ||
| } | ||
| // Show information about Node 24 migration in Phase 2 | ||
| if (useNode24ByDefault && !requireNode24 && string.Equals(finalNodeVersion, Constants.Runner.NodeMigration.Node24, StringComparison.OrdinalIgnoreCase)) | ||
| { | ||
| @@ -109,6 +138,30 @@ public IHandler Create( | ||
| executionContext.Output(infoMessage); | ||
| } | ||
| } | ||
| else if (string.Equals(nodeData.NodeVersion, Constants.Runner.NodeMigration.Node24, StringComparison.InvariantCultureIgnoreCase)) | ||
| { | ||
| var (finalNodeVersion, platformWarningMessage) = NodeUtil.CheckNodeVersionForLinuxArm32(nodeData.NodeVersion, deprecateArm32, killArm32, node20RemovalDate); | ||
| // ARM32 kill switch: fail the step | ||
| if (finalNodeVersion == null) | ||
| { | ||
| executionContext.Error(platformWarningMessage); | ||
| throw new InvalidOperationException(platformWarningMessage); | ||
| } | ||
| var preferredVersion = nodeData.NodeVersion; | ||
| nodeData.NodeVersion = finalNodeVersion; | ||
| if (!string.IsNullOrEmpty(platformWarningMessage)) | ||
| { | ||
| executionContext.Warning(platformWarningMessage); | ||
| } | ||
| if (!string.IsNullOrEmpty(actionName) && ShouldTrackAsArm32Node20(deprecateArm32, preferredVersion, finalNodeVersion, platformWarningMessage)) | ||
| { | ||
| executionContext.Global.Arm32Node20Actions?.Add(actionName); | ||
| } | ||
| } | ||
| (handler as INodeScriptActionHandler).Data = nodeData; | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.