mirror of
https://github.com/actions/runner.git
synced 2025-12-10 20:36:49 +00:00
Added execution context error
This will make a failed health check more visible in the UI without disrupting the execution of the program.
This commit is contained in:
@@ -429,8 +429,9 @@ namespace GitHub.Runner.Worker
|
||||
}
|
||||
else
|
||||
{
|
||||
executionContext.Output($"##[group] Container {container.ContainerImage} failed healthchecks, printing logs:");
|
||||
executionContext.Output($"##[group]Container {container.ContainerImage} failed healthchecks, printing logs:");
|
||||
await _dockerManager.DockerLogs(context: executionContext, containerId: container.ContainerId);
|
||||
executionContext.Error($"Failed to initialize container {container.ContainerImage}");
|
||||
executionContext.Output("##[endgroup]");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace GitHub.Runner.Common.Tests.Worker
|
||||
|
||||
//Assert
|
||||
_ec.Verify(dm => dm.Write(It.IsAny<string>(), It.IsAny<string>()), Times.Exactly(2));
|
||||
_ec.Verify(dm => dm.Write(null, $"##[group] Container {containerInfo.ContainerImage} failed healthchecks, printing logs:"), Times.AtLeastOnce());
|
||||
_ec.Verify(dm => dm.Write(null, $"##[group]Container {containerInfo.ContainerImage} failed healthchecks, printing logs:"), Times.AtLeastOnce());
|
||||
_ec.Verify(dm => dm.Write(null, "##[endgroup]"), Times.AtLeastOnce());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user