From 2884b853861c3a9bf80a6c984612c669fa4394fe Mon Sep 17 00:00:00 2001 From: Ismayil Ismayilov Date: Tue, 12 Dec 2023 02:10:12 +0400 Subject: [PATCH 1/2] Remove UseNode16 knob --- src/Agent.Sdk/Knob/AgentKnobs.cs | 7 ------- src/Agent.Worker/Handlers/NodeHandler.cs | 7 ------- 2 files changed, 14 deletions(-) diff --git a/src/Agent.Sdk/Knob/AgentKnobs.cs b/src/Agent.Sdk/Knob/AgentKnobs.cs index 2b84329cac..213c79ecd0 100644 --- a/src/Agent.Sdk/Knob/AgentKnobs.cs +++ b/src/Agent.Sdk/Knob/AgentKnobs.cs @@ -152,13 +152,6 @@ public class AgentKnobs new EnvironmentKnobSource("AGENT_USE_NODE10"), new BuiltInDefaultKnobSource("false")); - public static readonly Knob UseNode16 = new Knob( - nameof(UseNode16), - "Forces the agent to use Node 16 handler for all Node-based tasks", - new RuntimeKnobSource("AGENT_USE_NODE16"), - new EnvironmentKnobSource("AGENT_USE_NODE16"), - new BuiltInDefaultKnobSource("false")); - public static readonly Knob UseNode20_1 = new Knob( nameof(UseNode20_1), "Forces the agent to use Node 20 handler for all Node-based tasks", diff --git a/src/Agent.Worker/Handlers/NodeHandler.cs b/src/Agent.Worker/Handlers/NodeHandler.cs index 35fd13d3ea..bbd661f7cc 100644 --- a/src/Agent.Worker/Handlers/NodeHandler.cs +++ b/src/Agent.Worker/Handlers/NodeHandler.cs @@ -262,7 +262,6 @@ private async Task CheckIfNode20ResultsInGlibCError() public string GetNodeLocation(bool node20ResultsInGlibCError, bool inContainer) { bool useNode10 = AgentKnobs.UseNode10.GetValue(ExecutionContext).AsBoolean(); - bool useNode16 = AgentKnobs.UseNode16.GetValue(ExecutionContext).AsBoolean(); bool useNode20_1 = AgentKnobs.UseNode20_1.GetValue(ExecutionContext).AsBoolean(); bool UseNode20InUnsupportedSystem = AgentKnobs.UseNode20InUnsupportedSystem.GetValue(ExecutionContext).AsBoolean(); bool taskHasNode10Data = Data is Node10HandlerData; @@ -317,12 +316,6 @@ public string GetNodeLocation(bool node20ResultsInGlibCError, bool inContainer) } } - if (useNode16) - { - Trace.Info($"Found UseNode16 knob, using node16 for node tasks {useNode16}"); - nodeFolder = NodeHandler.Node16Folder; - } - if (useNode10) { Trace.Info($"Found UseNode10 knob, use node10 for node tasks: {useNode10}"); From 2e0da177f24f0fa24d515290ce6611a881fc7d95 Mon Sep 17 00:00:00 2001 From: azure-pipelines-bot Date: Fri, 5 Apr 2024 14:13:31 +0400 Subject: [PATCH 2/2] Add Pipelineurl as RESOURCE_URIS if this is empty --- src/Agent.Worker/TestResults/Utils/TestResultUtils.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Agent.Worker/TestResults/Utils/TestResultUtils.cs b/src/Agent.Worker/TestResults/Utils/TestResultUtils.cs index 5794409a42..f99a6e944a 100644 --- a/src/Agent.Worker/TestResults/Utils/TestResultUtils.cs +++ b/src/Agent.Worker/TestResults/Utils/TestResultUtils.cs @@ -89,6 +89,11 @@ private static string[] GetResourceUris(IExecutionContext executionContext) { resourceUris = resourceUrisEnvVar.Split(','); } + + if (resourceUris.Length == 0) + { + resourceUris = new string[] { GetPipelinesUrl(executionContext) }; + } } catch (Exception ex) {