From 89a13db2c3b72e87d7c42798f39edb16df822f31 Mon Sep 17 00:00:00 2001 From: Ethan Chiu <17chiue@gmail.com> Date: Wed, 29 Jul 2020 15:12:15 -0400 Subject: [PATCH] Remove TESTING_COMPOSITE_ACTIONS_ALPHA Env Variable (#624) --- src/Runner.Worker/ActionManager.cs | 4 ++-- src/Runner.Worker/ActionManifestManager.cs | 21 ++++++--------------- 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/src/Runner.Worker/ActionManager.cs b/src/Runner.Worker/ActionManager.cs index 1a730130a67..da4af0b6705 100644 --- a/src/Runner.Worker/ActionManager.cs +++ b/src/Runner.Worker/ActionManager.cs @@ -395,7 +395,7 @@ public Definition LoadAction(IExecutionContext executionContext, Pipelines.Actio Trace.Info($"Action cleanup plugin: {plugin.PluginTypeName}."); } } - else if (definition.Data.Execution.ExecutionType == ActionExecutionType.Composite && !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("TESTING_COMPOSITE_ACTIONS_ALPHA"))) + else if (definition.Data.Execution.ExecutionType == ActionExecutionType.Composite) { var compositeAction = definition.Data.Execution as CompositeActionExecutionData; Trace.Info($"Load {compositeAction.Steps?.Count ?? 0} action steps."); @@ -1048,7 +1048,7 @@ private ActionContainer PrepareRepositoryActionAsync(IExecutionContext execution Trace.Info($"Action plugin: {(actionDefinitionData.Execution as PluginActionExecutionData).Plugin}, no more preparation."); return null; } - else if (actionDefinitionData.Execution.ExecutionType == ActionExecutionType.Composite && !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("TESTING_COMPOSITE_ACTIONS_ALPHA"))) + else if (actionDefinitionData.Execution.ExecutionType == ActionExecutionType.Composite) { Trace.Info($"Action composite: {(actionDefinitionData.Execution as CompositeActionExecutionData).Steps}, no more preparation."); return null; diff --git a/src/Runner.Worker/ActionManifestManager.cs b/src/Runner.Worker/ActionManifestManager.cs index aa6637f858d..04ce2775e38 100644 --- a/src/Runner.Worker/ActionManifestManager.cs +++ b/src/Runner.Worker/ActionManifestManager.cs @@ -105,12 +105,7 @@ public ActionDefinitionData Load(IExecutionContext executionContext, string mani break; case "outputs": - if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("TESTING_COMPOSITE_ACTIONS_ALPHA"))) - { - actionOutputs = actionPair.Value.AssertMapping("outputs"); - break; - } - Trace.Info($"Ignore action property outputs. Outputs for a whole action is not supported yet."); + actionOutputs = actionPair.Value.AssertMapping("outputs"); break; case "description": @@ -423,14 +418,10 @@ private ActionExecutionData ConvertRuns( preIfToken = run.Value.AssertString("pre-if"); break; case "steps": - if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("TESTING_COMPOSITE_ACTIONS_ALPHA"))) - { - var stepsToken = run.Value.AssertSequence("steps"); - steps = PipelineTemplateConverter.ConvertToSteps(templateContext, stepsToken); - templateContext.Errors.Check(); - break; - } - throw new Exception("You aren't supposed to be using Composite Actions yet!"); + var stepsToken = run.Value.AssertSequence("steps"); + steps = PipelineTemplateConverter.ConvertToSteps(templateContext, stepsToken); + templateContext.Errors.Check(); + break; default: Trace.Info($"Ignore run property {runsKey}."); break; @@ -478,7 +469,7 @@ private ActionExecutionData ConvertRuns( }; } } - else if (string.Equals(usingToken.Value, "composite", StringComparison.OrdinalIgnoreCase) && !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("TESTING_COMPOSITE_ACTIONS_ALPHA"))) + else if (string.Equals(usingToken.Value, "composite", StringComparison.OrdinalIgnoreCase)) { if (steps == null) {