microsoft / azure-pipelines-tasks

Tasks for Azure Pipelines
https://aka.ms/tfbuild
MIT License
3.47k stars 2.6k forks source link

AzureResourceGroupDeployment task fails validations if a HTTP 202 Accepted is encountered #15451

Open rmacedo-bh opened 2 years ago

rmacedo-bh commented 2 years ago

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

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
vijayakumary01 commented 2 years ago

Any update?

kevinaschmidt commented 2 years ago

also looking for an update on this

brunobertechini commented 2 years ago

Same issue here

sandeep-pant commented 2 years ago

Is there anything on this please?

erik-source commented 2 years ago

@rmacedo-bh seems to have thoroughly documented the issue and what needs fixed, it seems this just needs a PR? This has been a real thorn in our side for a long time.

emikri commented 2 years ago

We have this issue too

btull89 commented 2 years ago

I also have this issue

MikeFlood commented 2 years ago

Has there been any movement on this issue? Seems relatively straight forward and would fix a lot of headaches.

ethanturk commented 2 years ago

This is a very annoying problem. Please fix this.

daniaalnadir commented 2 years ago

Same issue here, very annoying, any updates

enterpriseSoftware commented 2 years ago

dido, help!

rvairavelu commented 2 years ago

Currently we are working on other priorities, will keep you posted

pervinders commented 2 years ago

Warning: Template validation failed. Creating deployment... Error: ERROR: "code": "InvalidTemplateDeployment", "message": "The template deployment 'aks-template' is not valid according to the validation procedure. The tracking id is 'XXXXXX-XXXX-XXXX-XXXX-eefXXXXXX'. See inner errors for details."

dave22000 commented 2 years ago

I am also having this issue

ivanBereznev commented 1 year ago

Same issue here

evmurphy commented 1 year ago

still seeing this issue

duyn9uyen commented 1 year ago

Is there anyway to run this same task locally? Is there a cli tool available?

trdrake-tw commented 1 year ago

Is this ever getting fixed or managed in some way? Or responded to? Acknowledged?

jeremycolson commented 1 year ago

Same problem here as well... the radio silence on this for the last 1.5 years is not very encouraging. Anyone have any work arounds for this other than some messy retryCountOnTaskFailure: NN?

github-actions[bot] commented 11 months ago

This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days

dave22000 commented 11 months ago

This is still an issue and needs to be fixed, not closed.

github-actions[bot] commented 1 month ago

This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days