mirror of
https://github.com/actions/runner.git
synced 2025-12-12 05:37:01 +00:00
preserve workflow file/line/column for better error messages (#356)
This commit is contained in:
@@ -39,7 +39,8 @@ namespace GitHub.DistributedTask.Pipelines
|
||||
DictionaryContextData contextData,
|
||||
WorkspaceOptions workspaceOptions,
|
||||
IEnumerable<JobStep> steps,
|
||||
IEnumerable<ContextScope> scopes)
|
||||
IEnumerable<ContextScope> scopes,
|
||||
IList<String> fileTable)
|
||||
{
|
||||
this.MessageType = JobRequestMessageTypes.PipelineAgentJobRequest;
|
||||
this.Plan = plan;
|
||||
@@ -74,6 +75,11 @@ namespace GitHub.DistributedTask.Pipelines
|
||||
this.ContextData[pair.Key] = pair.Value;
|
||||
}
|
||||
}
|
||||
|
||||
if (fileTable?.Count > 0)
|
||||
{
|
||||
m_fileTable = new List<String>(fileTable);
|
||||
}
|
||||
}
|
||||
|
||||
[DataMember]
|
||||
@@ -237,6 +243,18 @@ namespace GitHub.DistributedTask.Pipelines
|
||||
}
|
||||
}
|
||||
|
||||
public IList<String> FileTable
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_fileTable == null)
|
||||
{
|
||||
m_fileTable = new List<String>();
|
||||
}
|
||||
return m_fileTable;
|
||||
}
|
||||
}
|
||||
|
||||
// todo: remove after feature-flag DistributedTask.EvaluateContainerOnRunner is enabled everywhere
|
||||
public void SetJobSidecarContainers(IDictionary<String, String> value)
|
||||
{
|
||||
@@ -345,6 +363,11 @@ namespace GitHub.DistributedTask.Pipelines
|
||||
m_environmentVariables = null;
|
||||
}
|
||||
|
||||
if (m_fileTable?.Count == 0)
|
||||
{
|
||||
m_fileTable = null;
|
||||
}
|
||||
|
||||
if (m_maskHints?.Count == 0)
|
||||
{
|
||||
m_maskHints = null;
|
||||
@@ -374,6 +397,9 @@ namespace GitHub.DistributedTask.Pipelines
|
||||
[DataMember(Name = "EnvironmentVariables", EmitDefaultValue = false)]
|
||||
private List<TemplateToken> m_environmentVariables;
|
||||
|
||||
[DataMember(Name = "FileTable", EmitDefaultValue = false)]
|
||||
private List<String> m_fileTable;
|
||||
|
||||
[DataMember(Name = "Mask", EmitDefaultValue = false)]
|
||||
private List<MaskHint> m_maskHints;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user