From 04d77df0c783b455782444f462a6b299b770c757 Mon Sep 17 00:00:00 2001 From: eric sciple Date: Thu, 18 Dec 2025 14:53:43 -0600 Subject: [PATCH] Cleanup feature flag actions_container_action_runner_temp (#4163) --- src/Runner.Common/Constants.cs | 7 +++---- src/Runner.Worker/FeatureManager.cs | 5 ----- src/Runner.Worker/Handlers/ContainerActionHandler.cs | 10 ++-------- 3 files changed, 5 insertions(+), 17 deletions(-) diff --git a/src/Runner.Common/Constants.cs b/src/Runner.Common/Constants.cs index d3bce0a06..ae2b08630 100644 --- a/src/Runner.Common/Constants.cs +++ b/src/Runner.Common/Constants.cs @@ -169,23 +169,22 @@ namespace GitHub.Runner.Common public static readonly string AllowRunnerContainerHooks = "DistributedTask.AllowRunnerContainerHooks"; public static readonly string AddCheckRunIdToJobContext = "actions_add_check_run_id_to_job_context"; public static readonly string DisplayHelpfulActionsDownloadErrors = "actions_display_helpful_actions_download_errors"; - public static readonly string ContainerActionRunnerTemp = "actions_container_action_runner_temp"; public static readonly string SnapshotPreflightHostedRunnerCheck = "actions_snapshot_preflight_hosted_runner_check"; public static readonly string SnapshotPreflightImageGenPoolCheck = "actions_snapshot_preflight_image_gen_pool_check"; public static readonly string CompareWorkflowParser = "actions_runner_compare_workflow_parser"; } - + // Node version migration related constants public static class NodeMigration { // Node versions public static readonly string Node20 = "node20"; public static readonly string Node24 = "node24"; - + // Environment variables for controlling node version selection public static readonly string ForceNode24Variable = "FORCE_JAVASCRIPT_ACTIONS_TO_NODE24"; public static readonly string AllowUnsecureNodeVersionVariable = "ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION"; - + // Feature flags for controlling the migration phases public static readonly string UseNode24ByDefaultFlag = "actions.runner.usenode24bydefault"; public static readonly string RequireNode24Flag = "actions.runner.requirenode24"; diff --git a/src/Runner.Worker/FeatureManager.cs b/src/Runner.Worker/FeatureManager.cs index 499995d13..98f49e8fd 100644 --- a/src/Runner.Worker/FeatureManager.cs +++ b/src/Runner.Worker/FeatureManager.cs @@ -11,10 +11,5 @@ namespace GitHub.Runner.Worker var isContainerHooksPathSet = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable(Constants.Hooks.ContainerHooksPath)); return isContainerHookFeatureFlagSet && isContainerHooksPathSet; } - - public static bool IsContainerActionRunnerTempEnabled(Variables variables) - { - return variables?.GetBoolean(Constants.Runner.Features.ContainerActionRunnerTemp) ?? false; - } } } diff --git a/src/Runner.Worker/Handlers/ContainerActionHandler.cs b/src/Runner.Worker/Handlers/ContainerActionHandler.cs index f61344869..399fac780 100644 --- a/src/Runner.Worker/Handlers/ContainerActionHandler.cs +++ b/src/Runner.Worker/Handlers/ContainerActionHandler.cs @@ -191,19 +191,13 @@ namespace GitHub.Runner.Worker.Handlers ArgUtil.Directory(tempWorkflowDirectory, nameof(tempWorkflowDirectory)); container.MountVolumes.Add(new MountVolume("/var/run/docker.sock", "/var/run/docker.sock")); - if (FeatureManager.IsContainerActionRunnerTempEnabled(ExecutionContext.Global.Variables)) - { - container.MountVolumes.Add(new MountVolume(tempDirectory, "/github/runner_temp")); - } + container.MountVolumes.Add(new MountVolume(tempDirectory, "/github/runner_temp")); container.MountVolumes.Add(new MountVolume(tempHomeDirectory, "/github/home")); container.MountVolumes.Add(new MountVolume(tempWorkflowDirectory, "/github/workflow")); container.MountVolumes.Add(new MountVolume(tempFileCommandDirectory, "/github/file_commands")); container.MountVolumes.Add(new MountVolume(defaultWorkingDirectory, "/github/workspace")); - if (FeatureManager.IsContainerActionRunnerTempEnabled(ExecutionContext.Global.Variables)) - { - container.AddPathTranslateMapping(tempDirectory, "/github/runner_temp"); - } + container.AddPathTranslateMapping(tempDirectory, "/github/runner_temp"); container.AddPathTranslateMapping(tempHomeDirectory, "/github/home"); container.AddPathTranslateMapping(tempWorkflowDirectory, "/github/workflow"); container.AddPathTranslateMapping(tempFileCommandDirectory, "/github/file_commands");