azure-pipelines-tasks: AzureResourceGroupDeployment task fails validations if a HTTP 202 Accepted is encountered

Required Information

Entering this information will route you directly to the right team and expedite traction.

Question, Bug, or Feature?
Type: Bug

Enter Task Name: AzureResourceManagerTemplateDeployment

https://github.com/microsoft/azure-pipelines-tasks/tree/master/Tasks/AzureResourceManagerTemplateDeploymentV3

Environment

  • Server - Azure Pipelines or TFS on-premises? Azure Pipelines

    account : bright-health team project name: Cognitive Services build definition name/build number: 416 / 20211027.5 [multiple]

  • Agent - Hosted or Private:

Hosted

Pool: Azure Pipelines
Image: windows-2019
Agent name: 'Azure Pipelines 2'
Agent machine name: 'WIN-ANKMHTL9CPF'
Current agent version: '2.193.1'
##[group]Operating System
Microsoft Windows Server 2019
10.0.17763
Datacenter
Environment: windows-2019
Version: 20211018.0

Issue Description

When the AzureResourceGroupDeployment task is executed with deploymentMode: Validation it fails if it receives a 202 Accepted response, even if the request is ultimately successful.

image The AzureResourceGroupDeployment code creates an error when encountering a 202 Accepted response, even though the ultimate validation is successful. This causes pipelines with a vlidation stage to fail. image

image

Task logs

2021-10-27T16:27:13.5468767Z Deployment name is template-20211027-162713-3dc7
2021-10-27T16:27:13.5481885Z ##[debug][POST]https://management.azure.com***/providers/Microsoft.Resources/deployments/template-20211027-162713-3dc7/validate?api-version=2021-04-01
2021-10-27T16:27:23.1401722Z ##[debug]Correlation ID from ARM api call response : 999fe4cf-a0ff-48ed-a3bd-1caf39269389
2021-10-27T16:27:23.1403879Z ##[debug]https://management.azure.com***/providers/Microsoft.Resources/deployments/template-20211027-162713-3dc7/validate?api-version=2021-04-01 ==> undefined
2021-10-27T16:27:23.1436266Z ##[error]Check out the troubleshooting guide to see if your issue is addressed: https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/deploy/azure-resource-group-deployment?view=azure-devops#troubleshooting
2021-10-27T16:27:23.1449505Z ##[debug]Processed: ##vso[task.issue type=error;]Check out the troubleshooting guide to see if your issue is addressed: https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/deploy/azure-resource-group-deployment?view=azure-devops#troubleshooting
2021-10-27T16:27:23.1451213Z ##[debug]task result: Failed
2021-10-27T16:27:23.1452212Z ##[error]Template validation failed. Error: {"statusCode":202}.
2021-10-27T16:27:23.1453093Z ##[debug]Processed: ##vso[task.issue type=error;]Template validation failed. Error: {"statusCode":202}.
2021-10-27T16:27:23.1461994Z ##[debug]Processed: ##vso[task.complete result=Failed;]Template validation failed. Error: {"statusCode":202}.
2021-10-27T16:27:23.1504566Z ##[section]Finishing: Validate ARM Template Parameters

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 15
  • Comments: 21

Most upvoted comments

Any update?