azure-pipelines-agent: [BUG]: Warning in build after agent upgrade: Failed to get FF TestManagement.Server.EnableAzureTestPlanTaskFlow Value

What happened?

After upgrading the build agent to the latest version, we are getting build warnings like this

##[warning]Failed to get FF TestManagement.Server.EnableAzureTestPlanTaskFlow Value. Error: System.AggregateException: One or more errors occurred. (TestManagement.Server.EnableAzureTestPlanTaskFlow)
 ---> Microsoft.VisualStudio.Services.Common.VssServiceException: TestManagement.Server.EnableAzureTestPlanTaskFlow
   at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.HandleResponseAsync(HttpResponseMessage response, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.SendAsync(HttpRequestMessage message, HttpCompletionOption completionOption, Object userState, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.SendAsync[T](HttpRequestMessage message, Object userState, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.SendAsync[T](HttpMethod method, IEnumerable`1 additionalHeaders, Guid locationId, Object routeValues, ApiResourceVersion version, HttpContent content, IEnumerable`1 queryParameters, Object userState, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at System.Threading.Tasks.Task`1.get_Result()
   at Microsoft.VisualStudio.Services.Agent.Worker.TestResults.Utils.FeatureFlagService.GetFeatureFlagState(String featureFlagName, Guid serviceInstanceId) in D:\a\_work\1\s\src\Agent.Worker\TestResults\Utils\FeatureFlagService.cs:line 39

Versions

Azure Pipelines Agent 3.241.0

Environment type (Please select at least one enviroment where you face this issue)

  • Self-Hosted
  • Microsoft Hosted
  • VMSS Pool
  • Container

Azure DevOps Server type

Azure DevOps Server (Please specify exact version in the textbox below)

Azure DevOps Server Version (if applicable)

Version Azure DevOps Server 2022.2 (AzureDevopsServer_20240702.1)

Operation system

Windows Server 2016 Standard

Version controll system

git

Relevant log output

No response

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Reactions: 7
  • Comments: 15 (3 by maintainers)

Most upvoted comments

Hi @ValentijnMakkenze @JeremyJeanson @lars-lange, I also contacted the team responsible for the related FF and they provided the following mitigation steps.

To avoid the warning it is required to register the TestManagement.Server.EnableAzureTestPlanTaskFlow Feature Flag on the Server.

Please execute the following queue in the config database.

INSERT INTO tbl_RegistryItems (PartitionId, ParentPath, ChildItem, RegValue)

VALUES
(1,'#\FeatureAvailability\Definitions\TestManagement.Server.EnableAzureTestPlanTaskFlow\', 'Description\', 'Flag for controlling enabling of association to testcase workflows with modified Fully Qualified Name'),
(1,'#\FeatureAvailability\Definitions\TestManagement.Server.EnableAzureTestPlanTaskFlow\', 'Name\', 'TestManagement.Server.EnableAzureTestPlanTaskFlow'),
(1,'#\FeatureAvailability\Definitions\TestManagement.Server.EnableAzureTestPlanTaskFlow\', 'Owner\', 'tfs')

And restart IIS Web App for the Azure DevOps collection.

I also clarified where the mentioned FF will be registered on the Server side, and it will happen only with the next major update for on-prem Server, which is planned for mid 2025. So, to resolve this issue until the next release we are preparing additional PR for the agent that will hide this FF under the agent knob, which will be disabled by default, and can be enabled by setting the environment variable. It will be published soon.

Will this topic somewhen fixed with an AzDO Patch, or will it remain open forever 😉

Unfortunately the reg values will be removed after applying the current AzDO patches

I registered the featureflag and the warning is now gone, thanks

We have a self-hosted environment, I changed the url to this https://tfs.vicrea.nl/Vicrea/_apis/FeatureFlags/TestManagement.Server.EnableAzureTestPlanTaskFlow,

and got this as response

{
    "$id": "1",
    "innerException": null,
    "message": "",
    "typeName": "Microsoft.TeamFoundation.Framework.Server.InvalidFeatureNameException, Microsoft.TeamFoundation.Framework.Server",
    "typeKey": "InvalidFeatureNameException",
    "errorCode": 0,
    "eventId": 3000
}