Closed slavizh closed 1 year ago
Should we simply add the properties of the deployment object directly to the stack?
@bmoore-msft yes if you ask me. New-AzSubscriptionDeploymentStack should behave and have the same output as New-AzDeployment but with the additional stuff to stacks, including -verbose functionality.
@slavizh - ack on the output - are there other spots where they don't behave the same? (and maybe enter new issues for those)
@bmoore-msft no, I do not think so. I think in this issue I have described all the things that are currently different between those and should be the same.
Grabbing this along with #11
@slavizh Just released a new Powershell build that attempts to match stack outputs with deployment outputs. https://github.com/Azure/deployment-stacks/releases/tag/v0.1.5
@harshpatel17 awesome. I will try to test it in the next days and provide feedback.
@harshpatel17 I am not sure if I spot the change. You say that the output matches the output of regular deployment but I do not see that. I do not see input parameters or output data being displayed at the end of deployment stack. When I read the release notes it says only the error output. But even in that I see some inconsistencies when we compare deployment stack vs deployment error:
Deployment stacks
New-AzSubscriptionDeploymentStack: 15:48:38 - The deployment 'lz-analysis-services-monitoring' failed with error(s). Showing 3 out of 3 error(s).
Error: Code=DeploymentStackUpdateFailed; Message=One or more stages of the deploymentStack failed. See snapshot '/subscriptions/<sub id>/providers/Microsoft.Resources/deploymentStacks/lz-analysis-services-monitoring/snapshots/2022-06-23-12-47-50-86fa7' for more details. Correlation id: 'e91659fa-df37-4f04-b0be-e9ef74473b24'
Error: Code=DeploymentFailed; Message=At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.
Error: Code=DeploymentFailed; Message=At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.
deployment
New-AzDeployment: 15:50:33 - The deployment 'stan343' failed with error(s). Showing 2 out of 2 error(s).
Status Message: {
"error": {
"code": "InvalidRequestContent",
"message": "The request content was invalid and could not be deserialized: 'Frequency of 16 minutes is not supported. Supported Frequencies are: 1, 5, 10, 15, 30, 45, 60, 120, 180, 240, 300, 360, 1440'"
}
} (Code:BadRequest)
Status Message: At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details. (Code: DeploymentFailed)
- {
"status": "Failed",
"error": {
"code": "ResourceDeploymentFailure",
"message": "The resource operation completed with terminal provisioning state 'Failed'.",
"details": [
{
"code": "DeploymentFailed",
"message": "At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.",
"details": [
{
"code": "BadRequest",
"message": "{\r\n \"error\": {\r\n \"code\": \"BadRequest\",\r\n \"message\": \"{\\r\\n \\\"error\\\": {\\r\\n \\\"code\\\": \\\"InvalidRequestContent\\\",\\r\\n \\\"message\\\": \\\"The request content was invalid and could not be deserialized: 'Frequency of 16 minutes is not supported. Supported Frequencies are: 1, 5, 10, 15, 30, 45, 60, 120, 180, 240, 300, 360, 1440'\\\"\\r\\n }\\r\\n}\"\r\n }\r\n}"
}
]
}
]
}
} (Code:Conflict)
CorrelationId: 37f50c38-acf1-4203-a30f-8be94ed4dba7
You can clearly see how deployment is able to expose the actual error at least where deployment stack fails.
I have unzipped the new bits, uninstalled previous version and installed the new one.
@slavizh - do you have a template and params file you can share - the "bad request" path is always trick (even if too common) - I want see see the code path the service takes to get you there...
@bmoore-msft will send e-mail with the code.
@harshpatel17 any update after providing the template?
@harshpatel17 - is on vacation for a few weeks, IDK how far he got before he left... hang tight.
ok, no problem. Relaxing vacation.
@harshpatel17 any update?
@slavizh Sorry about the late response. I'll take another look at the template and will get back to you by EoD tomorrow.
@harshpatel17 any update? Overall should we expect any updates on the proposed behavior for New-AzSubscriptionDeploymentStack or currently focus is the next milestone for deployment stacks and after that work on the tooling experience?
Hi @slavizh, yes my goal is to have the changes requested in by the end of this milestone. My estimate would be the changes should get in within this month.
@slavizh we updated the stack view in the new version to more closely match deployments. Could you take a look and get back to us if anything still seems to be missing?
Also, there is still an issue we are dealing with on the error (the entity error in stacks may be not as descriptive as deployments) related to https://github.com/Azure/deployment-stacks/issues/78. I am still looking into this. Hoping to get your feedback on everything besides the error here and we can keep the error discussion in the other issue.
@dantedallag Unfortunately I do not see any difference at all.
Here is what I saw as error in January release:
New-AzSubscriptionDeploymentStack: 15:48:38 - The deployment 'lz-analysis-services-monitoring' failed with error(s). Showing 3 out of 3 error(s).
Error: Code=DeploymentStackUpdateFailed; Message=One or more stages of the deploymentStack failed. See snapshot '/subscriptions/<sub id>/providers/Microsoft.Resources/deploymentStacks/lz-analysis-services-monitoring/snapshots/2022-06-23-12-47-50-86fa7' for more details. Correlation id: 'e91659fa-df37-4f04-b0be-e9ef74473b24'
Error: Code=DeploymentFailed; Message=At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.
Error: Code=DeploymentFailed; Message=At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.
Here is the March release:
New-AzSubscriptionDeploymentStack: 14:09:14 - The deployment 'lz-analysis-services-monitoring' failed with error(s). Showing 3 out of 3 error(s).
Error: Code=DeploymentStackUpdateFailed; Message=One or more stages of the deploymentStack failed. Correlation id: 'b4e88da9-0655-4444-b05c-9a881e411ea0'
Error: Code=DeploymentFailed; Message=At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-deployment-operations for usage details.
Error: Code=DeploymentFailed; Message=At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-deployment-operations for usage details.
Screenshot as well:
As you can see no difference at all between those releases.
Here is what New-AzSubscriptionDeployment outputs as error:
New-AzDeployment: 14:15:06 - The deployment 'lz-analysis-services-monitoring' failed with error(s). Showing 2 out of 2 error(s).
Status Message: Deployment template validation failed: 'The template resource '[items(parameters('analysisServiceMonitoring').alertRules)[copyIndex()].value.id]' at line '1' and column '8050' is not valid: The language expression property 'id' doesn't exist, available properties are 'deploy, frequencyInMinutes, timeWindowInMinutes, description'.. Please see https://aka.ms/arm-functions for usage details.'. (Code:InvalidTemplate)
Status Message: At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-deployment-operations for usage details. (Code: DeploymentFailed)
- {
"error": {
"code": "InvalidTemplate",
"message": "Deployment template validation failed: 'The template resource '[items(parameters('analysisServiceMonitoring').alertRules)[copyIndex()].value.id]' at line '1' and column '8050' is not valid: The language expression property 'id' doesn't exist, available properties are 'deploy, frequencyInMinutes, timeWindowInMinutes, description'.. Please see https://aka.ms/arm-functions for usage details.'.",
"additionalInfo": [
{
"type": "TemplateViolation",
"info": {
"lineNumber": 1,
"linePosition": 8050,
"path": "properties.template.resources[0]"
}
}
]
}
} (Code:BadRequest)
CorrelationId: 9c6e2db3-859c-4342-ac19-eb8a2b109d3a
Screenshot as well:
@slavizh I'm going to close this one as well as this issue involves multiple things, many of which have been fixed or have their own issue being tracked. Please create a new issue for anything you feel has not been addressed with the current release.
Is your feature request related to a problem? Please describe. New-AzSubscriptionDeploymentStack should have the same features that New-AzDeployment has + the additional Deployment stacks feature. For example the things that are currently missing:
Deployment stacks error
Deployments error:
Describe the solution you'd like Mock up of what would the end result should be. Note that in the mock up I have shown both error and successful (as there is output) deployed stack.