Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Runner.Common/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ public static class Features
public static readonly string SnapshotPreflightImageGenPoolCheck = "actions_snapshot_preflight_image_gen_pool_check";
public static readonly string CompareWorkflowParser = "actions_runner_compare_workflow_parser";
public static readonly string SetOrchestrationIdEnvForActions = "actions_set_orchestration_id_env_for_actions";
public static readonly string SendJobLevelAnnotations = "actions_send_job_level_annotations";
}

// Node version migration related constants
Expand Down
21 changes: 20 additions & 1 deletion src/Runner.Worker/ExecutionContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ public TaskResult Complete(TaskResult? result = null, string currentOperation =

PublishStepTelemetry();

if (_record.RecordType == "Task")
if (_record.RecordType == ExecutionContextType.Task)
{
var stepResult = new StepResult
{
Expand Down Expand Up @@ -532,6 +532,25 @@ public TaskResult Complete(TaskResult? result = null, string currentOperation =
Global.StepsResult.Add(stepResult);
}

if (Global.Variables.GetBoolean(Constants.Runner.Features.SendJobLevelAnnotations) ?? false)
{
if (_record.RecordType == ExecutionContextType.Job)
{
_record.Issues?.ForEach(issue =>
{
var annotation = issue.ToAnnotation();
if (annotation != null)
{
Global.JobAnnotations.Add(annotation.Value);
if (annotation.Value.IsInfrastructureIssue && string.IsNullOrEmpty(Global.InfrastructureFailureCategory))
{
Global.InfrastructureFailureCategory = issue.Category;
}
}
});
Comment thread
TingluoHuang marked this conversation as resolved.
}
Comment thread
TingluoHuang marked this conversation as resolved.
}
Comment thread
TingluoHuang marked this conversation as resolved.

if (Root != this)
{
// only dispose TokenSource for step level ExecutionContext
Expand Down
Loading