.NET 8 OS compatibility test (#3422)

* Revert "Warn for soon to be deprecated OS versions (#3413)"

This reverts commit ae04147f96.

* Add .NET 8 OS compatibility test

* feedback
This commit is contained in:
eric sciple
2024-08-07 16:53:00 -05:00
committed by GitHub
parent 7303cb5673
commit fb6d1adb43
20 changed files with 206 additions and 421 deletions

View File

@@ -44,7 +44,6 @@ namespace GitHub.DistributedTask.Pipelines
IList<TemplateToken> defaults,
ActionsEnvironmentReference actionsEnvironment,
TemplateToken snapshot,
IList<OSWarning> osWarnings,
String messageType = JobRequestMessageTypes.PipelineAgentJobRequest)
{
this.MessageType = messageType;
@@ -74,11 +73,6 @@ namespace GitHub.DistributedTask.Pipelines
m_defaults = new List<TemplateToken>(defaults);
}
if (osWarnings?.Count > 0)
{
m_osWarnings = new List<OSWarning>(osWarnings);
}
this.ContextData = new Dictionary<String, PipelineContextData>(StringComparer.OrdinalIgnoreCase);
if (contextData?.Count > 0)
{
@@ -294,18 +288,6 @@ namespace GitHub.DistributedTask.Pipelines
}
}
public IList<OSWarning> OSWarnings
{
get
{
if (m_osWarnings == null)
{
m_osWarnings = new List<OSWarning>();
}
return m_osWarnings;
}
}
// todo: remove after feature-flag DistributedTask.EvaluateContainerOnRunner is enabled everywhere
public void SetJobSidecarContainers(IDictionary<String, String> value)
{
@@ -443,11 +425,6 @@ namespace GitHub.DistributedTask.Pipelines
{
JobContainer = new StringToken(null, null, null, m_jobContainerResourceAlias);
}
if (m_osWarnings?.Count == 0)
{
m_osWarnings = null;
}
}
[DataMember(Name = "EnvironmentVariables", EmitDefaultValue = false)]
@@ -472,9 +449,6 @@ namespace GitHub.DistributedTask.Pipelines
[DataMember(Name = "JobSidecarContainers", EmitDefaultValue = false)]
private IDictionary<String, String> m_jobSidecarContainers;
[DataMember(Name = "OSWarnings", EmitDefaultValue = false)]
private List<OSWarning> m_osWarnings;
// todo: remove after feature-flag DistributedTask.EvaluateContainerOnRunner is enabled everywhere
[IgnoreDataMember]
private string m_jobContainerResourceAlias;

View File

@@ -1,44 +0,0 @@
using System;
using System.ComponentModel;
using System.Runtime.Serialization;
namespace GitHub.DistributedTask.Pipelines
{
/// <summary>
/// Information to check whether the OS is going to be deprecated soon
/// </summary>
[DataContract]
[EditorBrowsable(EditorBrowsableState.Never)]
public sealed class OSWarning
{
/// <summary>
/// Gets or sets the file to check
/// </summary>
[DataMember(EmitDefaultValue = false)]
public String FilePath
{
get;
set;
}
/// <summary>
/// Gets or sets the regular expression to match
/// </summary>
[DataMember(EmitDefaultValue = false)]
public String RegularExpression
{
get;
set;
}
/// <summary>
/// Gets or sets the warning annotation message, if the regular expression matches the content of the file
/// </summary>
[DataMember(EmitDefaultValue = false)]
public String Warning
{
get;
set;
}
}
}