Skip to content

Commit

Permalink
remove job summary feature flag (actions#1936)
Browse files Browse the repository at this point in the history
  • Loading branch information
robherley authored and kamilrakoczy committed Nov 30, 2022
1 parent 9acbc14 commit b171d43
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 26 deletions.
6 changes: 0 additions & 6 deletions src/Runner.Worker/FileCommandManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -275,12 +275,6 @@ public sealed class CreateStepSummaryCommand : RunnerService, IFileCommandExtens

public void ProcessCommand(IExecutionContext context, string filePath, ContainerInfo container)
{
if (!context.Global.Variables.GetBoolean("DistributedTask.UploadStepSummary") ?? true)
{
Trace.Info("Step Summary is disabled; skipping attachment upload");
return;
}

if (String.IsNullOrEmpty(filePath) || !File.Exists(filePath))
{
Trace.Info($"Step Summary file ({filePath}) does not exist; skipping attachment upload");
Expand Down
22 changes: 2 additions & 20 deletions src/Test/L0/Worker/CreateStepSummaryCommandL0.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,6 @@ public sealed class CreateStepSummaryCommandL0
private CreateStepSummaryCommand _createStepCommand;
private ITraceWriter _trace;

[Fact]
[Trait("Level", "L0")]
[Trait("Category", "Worker")]
public void CreateStepSummaryCommand_FeatureDisabled()
{
using (var hostContext = Setup(featureFlagState: "false"))
{
var stepSummaryFile = Path.Combine(_rootDirectory, "feature-off");

_createStepCommand.ProcessCommand(_executionContext.Object, stepSummaryFile, null);
_jobExecutionContext.Complete();

_jobServerQueue.Verify(x => x.QueueFileUpload(It.IsAny<Guid>(), It.IsAny<Guid>(), It.IsAny<string>(), It.IsAny<string>(), It.IsAny<string>(), It.IsAny<bool>()), Times.Never());
Assert.Equal(0, _issues.Count);
}
}

[Fact]
[Trait("Level", "L0")]
[Trait("Category", "Worker")]
Expand Down Expand Up @@ -199,7 +182,7 @@ private void WriteContent(
File.WriteAllText(path, contentStr, encoding);
}

private TestHostContext Setup([CallerMemberName] string name = "", string featureFlagState = "true")
private TestHostContext Setup([CallerMemberName] string name = "")
{
var hostContext = new TestHostContext(this, name);

Expand Down Expand Up @@ -241,7 +224,6 @@ private TestHostContext Setup([CallerMemberName] string name = "", string featur
_variables = new Variables(hostContext, new Dictionary<string, VariableValue>
{
{ "MySecretName", new VariableValue("My secret value", true) },
{ "DistributedTask.UploadStepSummary", featureFlagState },
});

// Directory for test data
Expand Down Expand Up @@ -286,4 +268,4 @@ private TestHostContext Setup([CallerMemberName] string name = "", string featur
return hostContext;
}
}
}
}

0 comments on commit b171d43

Please sign in to comment.