Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Warning in build after agent upgrade: Failed to get FF TestManagement.Server.EnableAzureTestPlanTaskFlow Value #4896

Open
1 of 4 tasks
ValentijnMakkenze opened this issue Jul 16, 2024 · 11 comments
Assignees

Comments

@ValentijnMakkenze
Copy link

ValentijnMakkenze commented Jul 16, 2024

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

@vmapetr
Copy link
Contributor

vmapetr commented Jul 24, 2024

Hi @ValentijnMakkenze thank you for reporting this issue!
According to the error message, looks like the EnableAzureTestPlanTaskFlow is unavailable for some reason, despite that it still exists on the agent and ADO side.
Could you please provide output from the following URL:
https://dev.azure.com/$ORG_NAME/_apis/FeatureFlags/TestManagement.Server.EnableAzureTestPlanTaskFlow, where $ORG_NAME is the name of your organization in ADO.

@ValentijnMakkenze
Copy link
Author

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
}

@vmapetr vmapetr self-assigned this Jul 25, 2024
@lars-lange
Copy link

Same here, we have a self-hosted environmen and we updated to Azure DevOps 2022.1 and AgentVersion 3.243.0

..._apis/FeatureFlags/TestManagement.Server.EnableAzureTestPlanTaskFlow
responsed
{
"$id": "1",
"innerException": null,
"message": "TestManagement.Server.EnableAzureTestPlanTaskFlow",
"typeName": "Microsoft.TeamFoundation.Framework.Server.MissingFeatureException, Microsoft.TeamFoundation.Framework.Server",
"typeKey": "MissingFeatureException",
"errorCode": 0,
"eventId": 3000
}

@vmapetr
Copy link
Contributor

vmapetr commented Aug 21, 2024

Hi @ValentijnMakkenze,
According to the output it's looks like the TestManagement.Server.EnableAzureTestPlanTaskFlow Feature Flag is not registered on the Server side, expected response should look like this:

{
    "name": "TestManagement.Server.EnableAzureTestPlanTaskFlow",
    "description": "Flag for enabling linkage of manual test point information to automated test result in resultspublish command flow.",
    "uri": "_apis/FeatureFlags/TestManagement.Server.EnableAzureTestPlanTaskFlow",
    "effectiveState": "Off",
    "explicitState": "Undefined"
}

Could you please try to install the latest updates for Azure DevOps server and check if the issue still happens?

In case if the issue still occurs could you please open a ticket on the https://developercommunity.visualstudio.com/AzureDevOpsServerTFS, since this repo is related to the agent issues, and it's look like a problem on the Azure DevOps Server side.

@JeremyJeanson
Copy link

Hi @vmapetr,

We are using Azure DevOps Server 2022.2 (AzureDevopsServer_20240702.1). The agent version is 3.242.1.
We are in the same situation

##[warning]Failed to get FF TestManagement.Server.EnableAzureTestPlanTaskFlow Value. Error: System.AggregateException: One or more errors occurred. (TestManagement.Server.EnableAzureTestPlanTaskFlow)
{
    "$id": "1",
    "innerException": null,
    "message": "",
    "typeName": "Microsoft.TeamFoundation.Framework.Server.InvalidFeatureNameException, Microsoft.TeamFoundation.Framework.Server",
    "typeKey": "InvalidFeatureNameException",
    "errorCode": 0,
    "eventId": 3000
}

@ValentijnMakkenze
Copy link
Author

@vmapetr
Copy link
Contributor

vmapetr commented Aug 22, 2024

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.

@JeremyJeanson
Copy link

Thank you.
I will apply this Monday.

@ValentijnMakkenze
Copy link
Author

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

@michha
Copy link

michha commented Sep 4, 2024

@vmapetr Could you notify in this issue, when a agent version is released, that has this knob?
At least v3.243.1 still has this issue
Thank you

@AkisParousis
Copy link

Hello I have faced the similar issue on our self-hosted agent

Can someone guide how can I register the TestManagement.Server.EnableAzureTestPlanTaskFlow Feature Flag on the Server, because I have no idea how to perform it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants