Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
00b9235
{Docs} Remove stale reference in README to closed issue about extensi…
dkmiller Apr 27, 2020
ab16df0
Merge remote-tracking branch 'upstream/release'
azclibot Apr 28, 2020
03436bc
Merge remote-tracking branch 'upstream/release'
azclibot Apr 30, 2020
7d98b1f
Merge remote-tracking branch 'upstream/release'
azclibot May 19, 2020
06f6ec5
Merge remote-tracking branch 'upstream/release'
azclibot Jun 2, 2020
adab2d2
Merge remote-tracking branch 'upstream/release'
azclibot Jun 23, 2020
c7b9f98
Merge remote-tracking branch 'upstream/release'
azclibot Jul 14, 2020
18e8b8d
Merge remote-tracking branch 'upstream/release'
azclibot Jul 16, 2020
1eb5074
Merge remote-tracking branch 'upstream/release'
azclibot Aug 4, 2020
cc3a159
Merge remote-tracking branch 'upstream/release' into master
azclibot Aug 6, 2020
af8f98e
Merge remote-tracking branch 'upstream/release' into master
azclibot Aug 26, 2020
0f904b9
Merge remote-tracking branch 'upstream/release' into master
azclibot Aug 28, 2020
d17a993
Merge remote-tracking branch 'upstream/release' into master
azclibot Sep 22, 2020
331b406
Merge branch 'master' of github.com:Azure/azure-cli into dev
Sep 24, 2020
c98c195
Merge branch 'dev' of github.com:Azure/azure-cli into dev
Sep 25, 2020
ee648a0
Merge branch 'dev' of github.com:Azure/azure-cli into dev
Nov 5, 2020
d2faa9f
Merge branch 'dev' of github.com:Azure/azure-cli into dev
Nov 9, 2020
64d0de4
Merge branch 'dev' of github.com:Azure/azure-cli into dev
Nov 10, 2020
7b250f5
Merge branch 'dev' of github.com:Azure/azure-cli into dev
Nov 18, 2020
03c8785
Merge branch 'dev' of github.com:Azure/azure-cli into dev
Dec 1, 2020
2f814b1
Merge branch 'dev' of github.com:Azure/azure-cli into dev
Dec 7, 2020
82ce0cc
Merge branch 'dev' of github.com:Azure/azure-cli into dev
Jan 29, 2021
3731883
Merge branch 'dev' of github.com:Azure/azure-cli into dev
Mar 18, 2021
1e48381
Merge branch 'dev' of github.com:Azure/azure-cli into dev
Apr 2, 2021
b50a530
Merge branch 'dev' of github.com:Azure/azure-cli into dev
Apr 25, 2021
15a1cef
Merge branch 'dev' of github.com:Azure/azure-cli into dev
Apr 26, 2021
a7fb6f7
Merge branch 'dev' of github.com:Azure/azure-cli into dev
May 11, 2021
ebaf9ce
Using API to get default sku
Apr 2, 2021
45825e1
Fix style error
Apr 7, 2021
5385a09
Use standard CLI error
Apr 7, 2021
bdea8f7
Update test record to solve conflict
Apr 26, 2021
193217e
Mark two tests as record only because them require specific dependenc…
May 11, 2021
af85c40
disable virtual machine test
May 13, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions src/azure-cli/azure/cli/command_modules/hdinsight/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------

from knack.log import get_logger
from knack.prompting import prompt_pass, NoTTYException
from knack.util import CLIError
from azure.cli.core.util import sdk_no_wait, user_confirmation
from azure.cli.core.azclierror import RequiredArgumentMissingError

logger = get_logger(__name__)

Expand All @@ -15,7 +15,7 @@
def create_cluster(cmd, client, cluster_name, resource_group_name, cluster_type,
location=None, tags=None, no_wait=False, cluster_version='default', cluster_tier=None,
cluster_configurations=None, component_version=None,
headnode_size='large', workernode_size='large', zookeepernode_size=None, edgenode_size=None,
Copy link
Contributor

@Juliehzl Juliehzl Apr 7, 2021

Choose a reason for hiding this comment

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

In this way, you will change default value for your CLI parameter, which is breaking. Is it by design?

Copy link
Member Author

@aim-for-better aim-for-better Apr 7, 2021

Choose a reason for hiding this comment

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

In this way, you will change default value for your CLI parameter, which is breaking. Is it by design?

Yes, we want to do this, but I forget it is a breaking change. This change will not have any impact on existing scripts, yes but it will change the parameter help info. Can we check in in this release cycle?

Copy link
Contributor

Choose a reason for hiding this comment

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

It is not a good experience for customer to have such breaking change in stable azure cli. Is there strong business justification for such breaking change?

Copy link
Member Author

@aim-for-better aim-for-better Apr 8, 2021

Choose a reason for hiding this comment

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

It is not a good experience for customer to have such breaking change in stable azure cli. Is there strong business justification for such breaking change?

Because at before the default value is large, and it will be converted into some concrete value. As time goes, we will deprecate some vm size this will cause issue. If it is not acceptable for this release, it also makes sense for us. And when is the next release which accepts breaking change?

Copy link
Collaborator

Choose a reason for hiding this comment

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

S187 - 05/25/2021 release cycle could accept breaking change. CLI only accepts breaking change twice a year.

Copy link
Member Author

@aim-for-better aim-for-better Apr 8, 2021

Choose a reason for hiding this comment

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

S187 - 05/25/2021 release cycle could accept breaking change. CLI only accepts breaking change twice a year.

Hi @yonzhan Thanks. Then this PR will target at S187, and I will announce there will be breaking change in S186. You can skip this PR in this S185. Thank you~

Copy link
Contributor

Choose a reason for hiding this comment

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

LGTM.

headnode_size=None, workernode_size=None, zookeepernode_size=None, edgenode_size=None,
kafka_management_node_size=None, kafka_management_node_count=2,
kafka_client_group_id=None, kafka_client_group_name=None,
workernode_count=3, workernode_data_disks_per_node=None,
Expand All @@ -39,7 +39,7 @@ def create_cluster(cmd, client, cluster_name, resource_group_name, cluster_type,
resource_provider_connection=None, enable_private_link=None, enable_compute_isolation=None,
host_sku=None, no_validation_timeout=False):
from .util import build_identities_info, build_virtual_network_profile, parse_domain_name, \
get_storage_account_endpoint, validate_esp_cluster_create_params
get_storage_account_endpoint, validate_esp_cluster_create_params, set_vm_size
from azure.mgmt.hdinsight.models import ClusterCreateParametersExtended, ClusterCreateProperties, OSType, \
ClusterDefinition, ComputeProfile, HardwareProfile, Role, OsProfile, LinuxOperatingSystemProfile, \
StorageProfile, StorageAccount, DataDisksGroups, SecurityProfile, \
Expand Down Expand Up @@ -197,6 +197,16 @@ def create_cluster(cmd, client, cluster_name, resource_group_name, cluster_type,
)
]

# call get default vm size api to set vm size if customer does not provide the value
if not (workernode_size and headnode_size):
headnode_size, workernode_size = set_vm_size(cmd.cli_ctx, location, cluster_type, headnode_size,
workernode_size)

if not headnode_size:
raise RequiredArgumentMissingError('Please specify --headnode-size explicitly.')
if not workernode_size:
raise RequiredArgumentMissingError('Please specify --workernode-size explicitly.')

os_profile = OsProfile(
linux_operating_system_profile=LinuxOperatingSystemProfile(
username=ssh_username,
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,24 @@ interactions:
ParameterSetName:
- -l
User-Agent:
- python/3.7.2 (Windows-10-10.0.17763-SP0) msrest/0.6.7 msrest_azure/0.6.1 azure-mgmt-hdinsight/0.2.1
Azure-SDK-For-Python AZURECLI/2.0.69
- python/3.7.2 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3
azure-mgmt-hdinsight/2.2.0 Azure-SDK-For-Python AZURECLI/2.22.1
accept-language:
- en-US
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.HDInsight/locations/eastus2/usages?api-version=2018-06-01-preview
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.HDInsight/locations/southcentralus/usages?api-version=2018-06-01-preview
response:
body:
string: '{"value":[{"unit":"Count","currentValue":0,"limit":60,"name":{"value":"cores","localizedValue":"Cores"}}]}'
string: '{"value":[{"unit":"Count","currentValue":40,"limit":3000,"name":{"value":"cores","localizedValue":"Cores"}}]}'
headers:
cache-control:
- no-cache
content-length:
- '106'
- '109'
content-type:
- application/json; charset=utf-8
date:
- Fri, 26 Jul 2019 04:16:01 GMT
- Sun, 25 Apr 2021 13:22:04 GMT
expires:
- '-1'
pragma:
Expand All @@ -44,7 +44,7 @@ interactions:
x-content-type-options:
- nosniff
x-ms-hdi-served-by:
- global
- southcentralus
status:
code: 200
message: OK
Expand Down
Loading