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

{ARM} Bump azure-mgmt-resource from v2019-07-01 to v2020-06-01 #14344

Merged
merged 1 commit into from
Jul 28, 2020

Conversation

zhoxing-ms
Copy link
Contributor

@zhoxing-ms zhoxing-ms commented Jul 14, 2020

Description

Bump azure-mgmt-resource from v2019-07-01 to v2020-06-01
For PR: #13429 #14241
At the same time, some compatibility logic was made for the breaking change of SDK to ensure that breaking will not be produced on the CLI side, such as: click

Testing Guide

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.

@yonzhan
Copy link
Collaborator

yonzhan commented Jul 14, 2020

add to S173

@zhoxing-ms zhoxing-ms force-pushed the mgmt-resource-bump-api-version branch from 80a33c2 to ec4016c Compare July 15, 2020 01:58
Copy link
Member

@qwordy qwordy left a comment

Choose a reason for hiding this comment

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

I am OK with vm module

@zhoxing-ms zhoxing-ms changed the title {ARM} Bump azure-mgmt-resource from v2019-07-01 to v2020-06-01 WIP {ARM} Bump azure-mgmt-resource from v2019-07-01 to v2020-06-01 Jul 15, 2020
@zhoxing-ms zhoxing-ms force-pushed the mgmt-resource-bump-api-version branch 3 times, most recently from ca579f1 to ebcd759 Compare July 20, 2020 11:26
@zhoxing-ms zhoxing-ms changed the title WIP {ARM} Bump azure-mgmt-resource from v2019-07-01 to v2020-06-01 {ARM} Bump azure-mgmt-resource from v2019-07-01 to v2020-06-01 Jul 20, 2020
@@ -5973,12 +5984,16 @@ def create_vpn_connection(cmd, resource_group_name, connection_name, vnet_gatewa
deployment_name = 'vpn_connection_deploy_' + random_string(32)
client = get_mgmt_service_client(cmd.cli_ctx, ResourceType.MGMT_RESOURCE_RESOURCES).deployments
properties = DeploymentProperties(template=template, parameters=parameters, mode='incremental')
deployment = Deployment(properties=properties)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it a breaking change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it is a breaking change of SDK, and we did made some compatibility logic to ensure that the CLI will not be broken

@zhoxing-ms zhoxing-ms force-pushed the mgmt-resource-bump-api-version branch 4 times, most recently from 47b21b8 to 2374d54 Compare July 24, 2020 03:39
Comment on lines 436 to 472
def _deploy_arm_template_at_subscription_scope(cli_ctx,
def _deploy_arm_template_at_subscription_scope(cmd,
template_file=None, template_uri=None, parameters=None,
deployment_name=None, deployment_location=None, validate_only=False,
no_wait=False, no_prompt=False):
deployment_properties = _prepare_deployment_properties_unmodified(cli_ctx=cli_ctx, template_file=template_file,
deployment_properties = _prepare_deployment_properties_unmodified(cli_ctx=cmd.cli_ctx, template_file=template_file,
template_uri=template_uri, parameters=parameters,
mode='Incremental',
no_prompt=no_prompt)

mgmt_client = _get_deployment_management_client(cli_ctx, plug_pipeline=(template_uri is None))
mgmt_client = _get_deployment_management_client(cmd.cli_ctx, plug_pipeline=(template_uri is None))

validation_result = mgmt_client.validate_at_subscription_scope(deployment_name=deployment_name, properties=deployment_properties, location=deployment_location)
if cmd.supported_api_version(min_api='2019-10-01'):
Deployment = cmd.get_models('Deployment')
deployment = Deployment(properties=deployment_properties, location=deployment_location)
validation_poller = mgmt_client.validate_at_subscription_scope(deployment_name, deployment)
validation_result = LongRunningOperation(cmd.cli_ctx)(validation_poller)
else:
validation_result = mgmt_client.validate_at_subscription_scope(deployment_name, deployment_properties, deployment_location)

if validation_result and validation_result.error:
err_message = _build_preflight_error_message(validation_result.error)
raise CLIError(err_message)
if validate_only:
return validation_result

return sdk_no_wait(no_wait, mgmt_client.create_or_update_at_subscription_scope,
deployment_name, deployment_properties, deployment_location)
if cmd.supported_api_version(min_api='2019-10-01'):
return sdk_no_wait(no_wait, mgmt_client.create_or_update_at_subscription_scope, deployment_name, deployment)
return sdk_no_wait(no_wait, mgmt_client.create_or_update_at_subscription_scope, deployment_name,
deployment_properties, deployment_location)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Compatibility logic for breaking change from SDK

Copy link
Contributor

@mmyyrroonn mmyyrroonn left a comment

Choose a reason for hiding this comment

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

Approved for monitor commands

Copy link
Contributor

@Juliehzl Juliehzl left a comment

Choose a reason for hiding this comment

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

approve for storage part

@zhoxing-ms zhoxing-ms force-pushed the mgmt-resource-bump-api-version branch 6 times, most recently from d7b4f58 to 515ac0d Compare July 24, 2020 15:15
Copy link
Member

@v-Ajnava v-Ajnava left a comment

Choose a reason for hiding this comment

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

LGTM for Eventhub and Servicebus

Copy link
Contributor

@arrownj arrownj left a comment

Choose a reason for hiding this comment

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

For VM module, it's good.

@zhoxing-ms
Copy link
Contributor Author

@samkreter Could you please help to review this PR for your part~

@@ -1,4 +1,4 @@
#Wed Jul 22 11:25:50 Pacific Daylight Time 2020
#Fri Jul 24 17:56:48 China Standard Time 2020
Copy link
Member

@jsntcy jsntcy Jul 27, 2020

Choose a reason for hiding this comment

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

Does this comments affect test result? #Closed

Copy link
Contributor Author

@zhoxing-ms zhoxing-ms Jul 27, 2020

Choose a reason for hiding this comment

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

This is automatically generated and should not affect the test results #Closed

Copy link
Member

@jsntcy jsntcy left a comment

Choose a reason for hiding this comment

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

:shipit:

@zhoxing-ms zhoxing-ms force-pushed the mgmt-resource-bump-api-version branch 2 times, most recently from b5dde9b to 3f120b8 Compare July 28, 2020 01:44
@zhoxing-ms zhoxing-ms force-pushed the mgmt-resource-bump-api-version branch from 3f120b8 to a043ea6 Compare July 28, 2020 01:50
@zhoxing-ms
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

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.