Skip to content

Conversation

@zhoxing-ms
Copy link
Contributor

@zhoxing-ms zhoxing-ms commented May 6, 2020

Issue: #13317 #12890 #12990

Description
This problem is caused by the simultaneous values of the template and template_link parameters in the DeploymentProperties when handling --handle-extended-json-format:
The service API returns templateLink only if the request parameter is templateLink.

When both template_link and template have values in DeploymentProperties, the Python SDK will take the data of template as the main data, and the request body for service API are:

{"properties": {"parameters": {}, "mode": "Incremental", template:{
    "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
    "contentVersion": "1.0.0.0",
    "resources": [],
    "outputs": {
        "deploymentOutput": {
            "value": "[deployment()]",
            "type" : "object"
        }
    }
}}}

Therefore, the service API does not return templateLink.

And When there is only templatelink in DeploymentProperties,the request body for service API are:

{"properties": {"templateLink": {"uri": "https://devtestzipacc.blob.core.windows.net/test/mainTemplate.json"}, "parameters": {}, "mode": "Incremental"}}

In this case, the service API will return templateLink

By the way, if the request parameter in DeploymentProperties is only templateLink, there is no need to change the configuration of the deployment_client that sent the parameter as JSON template, otherwise the service API will report an error.

Testing Guide
When deploying or validating the ARM template, please use the --template-uri parameter to see if tempalteLink will be returned.

History Notes

[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change.
[Component Name 2] az command b: Add some customer-facing feature.


This checklist is used to make sure that common guidelines for a pull request are followed.

@zhoxing-ms zhoxing-ms changed the title [ARM] az deployment: Fix the problem that the templateLink will not be returned when template-uri was deployed/validate (#13317) [ARM] az deployment: Fix the problem that the templateLink will not be returned when template-uri is deployed/validate (#13317) May 6, 2020
@zhoxing-ms zhoxing-ms changed the title [ARM] az deployment: Fix the problem that the templateLink will not be returned when template-uri is deployed/validate (#13317) [ARM] az deployment: Fix the problem that the templateLink will not be returned when deploying or validating template-uri (#13317) May 6, 2020
Copy link
Member

@qianwens qianwens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@yonzhan yonzhan added this to the S169 - For Build milestone May 6, 2020
@yonzhan
Copy link
Collaborator

yonzhan commented May 6, 2020

add to S169

@zhoxing-ms zhoxing-ms merged commit aa9c4c1 into Azure:dev May 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants