Skip to content

Commit e7ed1f1

Browse files
committed
resolve code conflicts
2 parents c8c765b + ff46fd6 commit e7ed1f1

35 files changed

+25172
-11753
lines changed

.github/CODEOWNERS

Lines changed: 64 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,70 @@
11
# See for instructions on this file https://help.github.com/articles/about-codeowners/
22

3-
*help.py @kairu-ms @jiasli @jsntcy
4-
*help.yaml @kairu-ms @jiasli @jsntcy
5-
*help.yml @kairu-ms @jiasli @jsntcy
3+
*help.py @necusjz @DanielMicrosoft @ReaNAiveD @yonzhan
4+
*help.yaml @necusjz @DanielMicrosoft @ReaNAiveD @yonzhan
5+
*help.yml @necusjz @DanielMicrosoft @ReaNAiveD @yonzhan
66

7-
/linter_exclusions.yml @jsntcy @kairu-ms @yanzhudd
7+
/linter_exclusions.yml @naganandyala @bebound @YanaXu @yonzhan @wangzelin007
88

9-
/doc/ @jiasli @kairu-ms @jsntcy @necusjz @yanzhudd
10-
/tools/ @kairu-ms @jiasli @wangzelin007 @calvinhzy @bebound
11-
/tools/aaz-flow @a0x1ab @necusjz @yanzhudd
12-
/scripts/ @kairu-ms @jiasli @wangzelin007 @calvinhzy @bebound @naga-nandyala
13-
/scripts/live_test @kairu-ms @wangzelin007 @naga-nandyala
14-
/src/azure-cli-testsdk/ @jsntcy @jiasli @kairu-ms @wangzelin007 @bebound
9+
/doc/ @necusjz @DanielMicrosoft @ReaNAiveD @yonzhan
10+
/tools/ @naganandyala @bebound @YanaXu @yonzhan @wangzelin007
11+
/tools/aaz-flow @a0x1ab @necusjz @yanzhudd @naganandyala
12+
/scripts/ @naganandyala @bebound @YanaXu @yonzhan @wangzelin007
13+
/scripts/live_test @naganandyala @bebound @YanaXu @yonzhan @wangzelin007
14+
/src/azure-cli-testsdk/ @necusjz @DanielMicrosoft @ReaNAiveD @yonzhan
1515

16-
/src/azure-cli-core/ @jiasli @jsntcy @kairu-ms @yanzhudd @calvinhzy @necusjz @bebound @DanielMicrosoft @ReaNAiveD
17-
/src/azure-cli-core/azure/cli/core/_profile.py @jiasli @bebound
18-
/src/azure-cli-core/azure/cli/core/auth/ @jiasli @bebound
19-
/src/azure-cli-core/azure/cli/core/extension/ @jsntcy @kairu-ms
20-
/src/azure-cli-core/azure/cli/core/style.py @jiasli @yanzhudd
21-
/src/azure-cli-core/azure/cli/core/aaz/ @kairu-ms @necusjz @calvinhzy @jsntcy @DanielMicrosoft @ReaNAiveD
16+
/src/azure-cli-core/ @necusjz @DanielMicrosoft @ReaNAiveD @yonzhan
17+
/src/azure-cli-core/azure/cli/core/_profile.py @isra-fel @notyashhh @xuming-ms @teresaritorto
18+
/src/azure-cli-core/azure/cli/core/auth/ @isra-fel @notyashhh @xuming-ms @teresaritorto
19+
/src/azure-cli-core/azure/cli/core/extension/ @VeryEarly @Pan-Qi @jsntcy @necusjz
20+
/src/azure-cli-core/azure/cli/core/style.py @NoriZC @yanzhudd @teresaritorto
21+
/src/azure-cli-core/azure/cli/core/aaz/ @VeryEarly @Pan-Qi @jsntcy @necusjz
2222

23-
/src/azure-cli/azure/cli/command_modules/acr/ @northtyphoon @rosanch @jsntcy @yanzhudd
24-
/src/azure-cli/azure/cli/command_modules/acs/ @zqingqing1 @gtracer @xizhamsft @andyliuliming @fumingzhang @jsntcy @yanzhudd
25-
/src/azure-cli/azure/cli/command_modules/advisor/ @jsntcy @Prasanna-Padmanabhan
26-
/src/azure-cli/azure/cli/command_modules/apim/ @jsntcy @kevinhillinger @jonlester
27-
/src/azure-cli/azure/cli/command_modules/appconfig/ @jsntcy @yanzhudd @ChristineWanjau @albertofori @avanigupta @mrm9084
28-
/src/azure-cli/azure/cli/command_modules/appservice/ @jsntcy @yanzhudd @panchagnula
29-
/src/azure-cli/azure/cli/command_modules/aro/ @jsntcy @bennerv @hawkowl @jewzaam @rogbas @necusjz
30-
/src/azure-cli/azure/cli/command_modules/backup/ @jsntcy @yanzhudd @dragonfly91 @akshayneema
31-
/src/azure-cli/azure/cli/command_modules/batch/ @jsntcy @yanzhudd @cRui861 @wanghoppe @dpwatrous @wiboris
32-
/src/azure-cli/azure/cli/command_modules/batchai/ @jsntcy @AlexanderYukhanov
33-
/src/azure-cli/azure/cli/command_modules/botservice/ @jsntcy @jiaxuwu2021 @luhan2017
34-
/src/azure-cli/azure/cli/command_modules/cdn/ @jsntcy @kairu-ms @wangzelin007 @necusjz @t-bzhan
35-
/src/azure-cli/azure/cli/command_modules/cloud/ @jiasli @calvinhzy
36-
/src/azure-cli/azure/cli/command_modules/consumption/ @jsntcy @sandeepnl
37-
/src/azure-cli/azure/cli/command_modules/container/ @jsntcy @joseph-porter
38-
/src/azure-cli/azure/cli/command_modules/cosmosdb/ @calvinhzy @dmakwana @kristynhamasaki
39-
/src/azure-cli/azure/cli/command_modules/databoxedge/ @calvinhzy
40-
/src/azure-cli/azure/cli/command_modules/dls/ @jsntcy @calvinhzy @akharit @rahuldutta90
41-
/src/azure-cli/azure/cli/command_modules/dms/ @jsntcy @necusjz @temandr @binuj
42-
/src/azure-cli/azure/cli/command_modules/eventgrid/ @calvinhzy @VidyaKukke
43-
/src/azure-cli/azure/cli/command_modules/eventhubs/ @jsntcy @v-ajnava @calvinhzy
44-
/src/azure-cli/azure/cli/command_modules/extension/ @jsntcy @kairu-ms
45-
/src/azure-cli/azure/cli/command_modules/feedback/ @jiasli @kairu-ms
46-
/src/azure-cli/azure/cli/command_modules/hdinsight/ @kairu-ms @aim-for-better
47-
/src/azure-cli/azure/cli/command_modules/identity/ @jiasli @yanzhudd
48-
/src/azure-cli/azure/cli/command_modules/iot/ @yanzhudd @digimaun
49-
/src/azure-cli/azure/cli/command_modules/keyvault/ @notyashhh @jiasli @calvinhzy
50-
/src/azure-cli/azure/cli/command_modules/monitor/ @jsntcy @kairu-ms @necusjz @yanzhudd
51-
/src/azure-cli/azure/cli/command_modules/mysql/ @calvinhzy @honghr
52-
/src/azure-cli/azure/cli/command_modules/natgateway/ @jsntcy @kairu-ms @necusjz @khannarheams
53-
/src/azure-cli/azure/cli/command_modules/network/ @jsntcy @kairu-ms @wangzelin007 @necusjz @DanielMicrosoft @ReaNAiveD
54-
/src/azure-cli/azure/cli/command_modules/policyinsights/ @jsntcy @cheggert
55-
/src/azure-cli/azure/cli/command_modules/postgresql/ @calvinhzy @arde0708
56-
/src/azure-cli/azure/cli/command_modules/privatedns/ @jsntcy @kairu-ms @necusjz
57-
/src/azure-cli/azure/cli/command_modules/profile/ @jiasli @bebound
58-
/src/azure-cli/azure/cli/command_modules/rdbms/ @calvinhzy @arde0708 @alanenriqueo
59-
/src/azure-cli/azure/cli/command_modules/resource/ @jsntcy @yanzhudd
60-
/src/azure-cli/azure/cli/command_modules/role/ @jiasli @bebound
61-
/src/azure-cli/azure/cli/command_modules/search/ @kairu-ms @necusjz @huangbolun
62-
/src/azure-cli/azure/cli/command_modules/servicebus/ @yanzhudd @jsntcy @calvinhzy @v-ajnava
63-
/src/azure-cli/azure/cli/command_modules/serviceconnector/ @kairu-ms @yanzhudd @yungezz @houk-ms @xfz11
64-
/src/azure-cli/azure/cli/command_modules/servicefabric/ @jsntcy @yanzhudd @QingChenmsft
65-
/src/azure-cli/azure/cli/command_modules/sql/ @calvinhzy @jaredmoo
66-
/src/azure-cli/azure/cli/command_modules/storage/ @jsntcy @yanzhudd @calvinhzy
67-
/src/azure-cli/azure/cli/command_modules/synapse/ @jsntcy @idear1203 @zesluo @calvinhzy
68-
/src/azure-cli/azure/cli/command_modules/util/ @jiasli @yanzhudd @calvinhzy
69-
/src/azure-cli/azure/cli/command_modules/vm/ @jsntcy @wangzelin007 @yanzhudd @Drewm3 @TravisCragg-MSFT @nikhilpatel909 @sandeepraichura @hilaryw29 @GabstaMSFT @ramankumarlive @ushnaarshadkhan
70-
/src/azure-cli/azure/cli/command_modules/containerapp/ @yanzhudd @ruslany @sanchitmehta @ebencarek @JennyLawrance @howang-ms @vinisoto @chinadragon0515 @vturecek @torosent @pagariyaalok @Juliehzl @jijohn14 @Greedygre @ShichaoQiu
23+
/src/azure-cli/azure/cli/command_modules/acr/ @NoriZC @yanzhudd @teresaritorto @northtyphoon @rosanch
24+
/src/azure-cli/azure/cli/command_modules/acs/ @NoriZC @yanzhudd @teresaritorto @zqingqing1 @gtracer @xizhamsft @andyliuliming @fumingzhang
25+
/src/azure-cli/azure/cli/command_modules/advisor/ @VeryEarly @Pan-Qi @jsntcy @Prasanna-Padmanabhan
26+
/src/azure-cli/azure/cli/command_modules/apim/ @NoriZC @yanzhudd @teresaritorto @kevinhillinger @jonlester
27+
/src/azure-cli/azure/cli/command_modules/appconfig/ @VeryEarly @Pan-Qi @jsntcy @ChristineWanjau @albertofori @avanigupta @mrm9084
28+
/src/azure-cli/azure/cli/command_modules/appservice/ @NoriZC @yanzhudd @teresaritorto @panchagnula
29+
/src/azure-cli/azure/cli/command_modules/aro/ @VeryEarly @Pan-Qi @jsntcy @bennerv @hawkowl @jewzaam @rogbas @necusjz
30+
/src/azure-cli/azure/cli/command_modules/backup/ @NoriZC @yanzhudd @teresaritorto @dragonfly91 @akshayneema
31+
/src/azure-cli/azure/cli/command_modules/batch/ @NoriZC @yanzhudd @teresaritorto @cRui861 @wanghoppe @dpwatrous @wiboris
32+
/src/azure-cli/azure/cli/command_modules/batchai/ @VeryEarly @Pan-Qi @jsntcy @AlexanderYukhanov
33+
/src/azure-cli/azure/cli/command_modules/botservice/ @VeryEarly @Pan-Qi @jsntcy @jiaxuwu2021 @luhan2017
34+
/src/azure-cli/azure/cli/command_modules/cdn/ @necusjz @DanielMicrosoft @ReaNAiveD @yonzhan @t-bzhan
35+
/src/azure-cli/azure/cli/command_modules/cloud/ @isra-fel @notyashhh @xuming-ms @teresaritorto
36+
/src/azure-cli/azure/cli/command_modules/consumption/ @VeryEarly @Pan-Qi @jsntcy @sandeepnl
37+
/src/azure-cli/azure/cli/command_modules/container/ @NoriZC @yanzhudd @teresaritorto @joseph-porter
38+
/src/azure-cli/azure/cli/command_modules/cosmosdb/ @VeryEarly @Pan-Qi @jsntcy @dmakwana @kristynhamasaki
39+
/src/azure-cli/azure/cli/command_modules/databoxedge/ @VeryEarly @Pan-Qi @jsntcy
40+
/src/azure-cli/azure/cli/command_modules/dls/ @VeryEarly @Pan-Qi @jsntcy @akharit @rahuldutta90
41+
/src/azure-cli/azure/cli/command_modules/dms/ @VeryEarly @Pan-Qi @jsntcy @temandr @binuj
42+
/src/azure-cli/azure/cli/command_modules/eventgrid/ @VeryEarly @Pan-Qi @jsntcy @VidyaKukke
43+
/src/azure-cli/azure/cli/command_modules/eventhubs/ @VeryEarly @Pan-Qi @jsntcy @v-ajnava @calvinhzy
44+
/src/azure-cli/azure/cli/command_modules/extension/ @VeryEarly @Pan-Qi @jsntcy
45+
/src/azure-cli/azure/cli/command_modules/feedback/ @VeryEarly @Pan-Qi @jsntcy
46+
/src/azure-cli/azure/cli/command_modules/hdinsight/ @VeryEarly @Pan-Qi @jsntcy @aim-for-better
47+
/src/azure-cli/azure/cli/command_modules/identity/ @isra-fel @notyashhh @xuming-ms @teresaritorto
48+
/src/azure-cli/azure/cli/command_modules/iot/ @NoriZC @yanzhudd @teresaritorto @digimaun
49+
/src/azure-cli/azure/cli/command_modules/keyvault/ @notyashhh @isra-fel @xuming-ms @teresaritorto
50+
/src/azure-cli/azure/cli/command_modules/monitor/ @NoriZC @yanzhudd @teresaritorto
51+
/src/azure-cli/azure/cli/command_modules/mysql/ @VeryEarly @Pan-Qi @calvinhzy @jsntcy @honghr
52+
/src/azure-cli/azure/cli/command_modules/natgateway/ @necusjz @DanielMicrosoft @ReaNAiveD @yonzhan @khannarheams
53+
/src/azure-cli/azure/cli/command_modules/network/ @necusjz @DanielMicrosoft @ReaNAiveD @yonzhan
54+
/src/azure-cli/azure/cli/command_modules/policyinsights/ @isra-fel @notyashhh @xuming-ms @teresaritorto @cheggert
55+
/src/azure-cli/azure/cli/command_modules/postgresql/ @VeryEarly @Pan-Qi @calvinhzy @jsntcy @arde0708
56+
/src/azure-cli/azure/cli/command_modules/privatedns/ @necusjz @DanielMicrosoft @ReaNAiveD @yonzhan
57+
/src/azure-cli/azure/cli/command_modules/profile/ @isra-fel @notyashhh @xuming-ms @teresaritorto
58+
/src/azure-cli/azure/cli/command_modules/rdbms/ @VeryEarly @Pan-Qi @calvinhzy @jsntcy @arde0708 @alanenriqueo
59+
/src/azure-cli/azure/cli/command_modules/resource/ @isra-fel @notyashhh @xuming-ms @teresaritorto @ReaNAiveD
60+
/src/azure-cli/azure/cli/command_modules/role/ @isra-fel @notyashhh @xuming-ms @teresaritorto
61+
/src/azure-cli/azure/cli/command_modules/search/ @VeryEarly @Pan-Qi @jsntcy @huangbolun
62+
/src/azure-cli/azure/cli/command_modules/servicebus/ @NoriZC @yanzhudd @teresaritorto @v-ajnava
63+
/src/azure-cli/azure/cli/command_modules/serviceconnector/ @VeryEarly @Pan-Qi @jsntcy @yungezz @houk-ms @xfz11
64+
/src/azure-cli/azure/cli/command_modules/servicefabric/ @NoriZC @yanzhudd @teresaritorto @QingChenmsft
65+
/src/azure-cli/azure/cli/command_modules/sql/ @VeryEarly @Pan-Qi @calvinhzy @jsntcy @jaredmoo
66+
/src/azure-cli/azure/cli/command_modules/storage/ @VeryEarly @Pan-Qi @calvinhzy @jsntcy
67+
/src/azure-cli/azure/cli/command_modules/synapse/ @VeryEarly @Pan-Qi @jsntcy @idear1203 @zesluo @calvinhzy
68+
/src/azure-cli/azure/cli/command_modules/util/ @naganandyala @bebound @YanaXu @yonzhan @wangzelin007
69+
/src/azure-cli/azure/cli/command_modules/vm/ @NoriZC @yanzhudd @teresaritorto @Drewm3 @TravisCragg-MSFT @nikhilpatel909 @sandeepraichura @hilaryw29 @GabstaMSFT @ramankumarlive @ushnaarshadkhan
70+
/src/azure-cli/azure/cli/command_modules/containerapp/ @NoriZC @yanzhudd @teresaritorto @ruslany @sanchitmehta @ebencarek @JennyLawrance @howang-ms @vinisoto @chinadragon0515 @vturecek @torosent @pagariyaalok @Juliehzl @jijohn14 @Greedygre @ShichaoQiu

src/azure-cli-core/azure/cli/core/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,8 @@ def get(self, args):
792792
return None
793793

794794
# Get the top-level command, like `network` in `network vnet create -h`
795-
top_command = args[0]
795+
# Normalize top-level command for index lookup so mixed-case commands hit key
796+
top_command = args[0].lower()
796797
index = self.INDEX[self._COMMAND_INDEX]
797798
# Check the command index for (command: [module]) mapping, like
798799
# "network": ["azure.cli.command_modules.natgateway", "azure.cli.command_modules.network", "azext_firewall"]

src/azure-cli-core/azure/cli/core/commands/__init__.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -512,14 +512,11 @@ def execute(self, args):
512512
EVENT_INVOKER_FILTER_RESULT)
513513
from azure.cli.core.commands.events import (
514514
EVENT_INVOKER_PRE_CMD_TBL_TRUNCATE, EVENT_INVOKER_PRE_LOAD_ARGUMENTS, EVENT_INVOKER_POST_LOAD_ARGUMENTS)
515-
from azure.cli.core.util import roughly_parse_command_with_casing
516515

517-
# TODO: Can't simply be invoked as an event because args are transformed
518-
command_preserve_casing = roughly_parse_command_with_casing(args)
519516
args = _pre_command_table_create(self.cli_ctx, args)
520517

521518
if self._should_show_cached_help(args):
522-
result = self._try_show_cached_help(command_preserve_casing, args)
519+
result = self._try_show_cached_help(args)
523520
if result:
524521
return result
525522

@@ -593,7 +590,7 @@ def execute(self, args):
593590
logger.debug("Failed to cache help data: %s", ex)
594591

595592
# TODO: No event in base with which to target
596-
telemetry.set_command_details('az', command_preserve_casing=command_preserve_casing)
593+
telemetry.set_command_details('az')
597594
telemetry.set_success(summary='welcome')
598595
return CommandResultItem(None, exit_code=0)
599596

@@ -648,8 +645,7 @@ def execute(self, args):
648645
pass
649646
telemetry.set_command_details(self.cli_ctx.data['command'], self.data['output'],
650647
self.cli_ctx.data['safe_params'],
651-
extension_name=extension_name, extension_version=extension_version,
652-
command_preserve_casing=command_preserve_casing)
648+
extension_name=extension_name, extension_version=extension_version)
653649
if extension_name:
654650
self.data['command_extension_name'] = extension_name
655651
self.cli_ctx.logging.log_cmd_metadata_extension_info(extension_name, extension_version)
@@ -740,7 +736,7 @@ def _should_show_cached_help(self, args):
740736
self._is_top_level_help_request(args) and
741737
not self.cli_ctx.data.get('completer_active'))
742738

743-
def _try_show_cached_help(self, command_preserve_casing, args):
739+
def _try_show_cached_help(self, args):
744740
"""Try to show cached help for top-level help request.
745741
746742
Returns CommandResultItem if cached help was shown, None otherwise.
@@ -752,7 +748,7 @@ def _try_show_cached_help(self, command_preserve_casing, args):
752748
if help_index:
753749
# Display cached help using the help system
754750
self.help.show_cached_help(help_index, args)
755-
telemetry.set_command_details('az', command_preserve_casing=command_preserve_casing, parameters=['--help'])
751+
telemetry.set_command_details('az', parameters=['--help'])
756752
telemetry.set_success(summary='show help')
757753
return CommandResultItem(None, exit_code=0)
758754

src/azure-cli-core/azure/cli/core/commands/arm.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -227,10 +227,8 @@ def __call__(self, parser, namespace, value, option_string=None):
227227
command.add_argument('_change_reference', '--change-reference', **change_reference_kwargs)
228228
command.add_argument('_acquire_policy_token', '--acquire-policy-token', **acquire_policy_token_kwargs)
229229

230-
policy_token_feature_enabled = cli_ctx.config.getboolean('core', 'enable_policy_token', False)
231-
if policy_token_feature_enabled:
232-
from knack import events
233-
cli_ctx.register_event(events.EVENT_INVOKER_POST_CMD_TBL_CREATE, add_global_policy_argument)
230+
from knack import events
231+
cli_ctx.register_event(events.EVENT_INVOKER_POST_CMD_TBL_CREATE, add_global_policy_argument)
234232

235233

236234
# pylint: disable=too-many-statements

src/azure-cli-core/azure/cli/core/extension/dynamic_install.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,6 @@ def _check_value_in_extensions(cli_ctx, parser, args, no_prompt): # pylint: dis
194194
# extension is already installed and return if yes as the error is not caused by extension not installed.
195195
from azure.cli.core.extension import get_extension, ExtensionNotInstalledException
196196
from azure.cli.core.extension._resolve import resolve_from_index, NoExtensionCandidatesError
197-
from azure.cli.core.util import roughly_parse_command_with_casing
198197
extension_allow_preview = _get_extension_allow_preview_install_config(cli_ctx)
199198
try:
200199
ext = get_extension(ext_name)
@@ -209,8 +208,7 @@ def _check_value_in_extensions(cli_ctx, parser, args, no_prompt): # pylint: dis
209208

210209
telemetry.set_command_details(command_str,
211210
parameters=AzCliCommandInvoker._extract_parameter_names(args), # pylint: disable=protected-access
212-
extension_name=ext_name,
213-
command_preserve_casing=roughly_parse_command_with_casing(args))
211+
extension_name=ext_name)
214212
run_after_extension_installed = _get_extension_run_after_dynamic_install_config(cli_ctx)
215213
prompt_info = ""
216214
if no_prompt:

src/azure-cli-core/azure/cli/core/telemetry.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ def __init__(self, correlation_id=None, application=None):
5151
self.feedback = None
5252
self.extension_management_detail = None
5353
self.raw_command = None
54-
self.command_preserve_casing = None
5554
self.is_cmd_idx_rebuild_triggered = False
5655
self.show_survey_message = False
5756
self.region_input = None
@@ -209,8 +208,6 @@ def _get_azure_cli_properties(self):
209208
set_custom_properties(result, 'InvokeTimeElapsed', str(self.invoke_time_elapsed))
210209
set_custom_properties(result, 'OutputType', self.output_type)
211210
set_custom_properties(result, 'RawCommand', self.raw_command)
212-
set_custom_properties(result, 'CommandPreserveCasing',
213-
self.command_preserve_casing or '')
214211
set_custom_properties(result, 'IsCmdIdxRebuildTriggered', str(self.is_cmd_idx_rebuild_triggered))
215212
set_custom_properties(result, 'Params', ','.join(self.parameters or []))
216213
set_custom_properties(result, 'PythonVersion', platform.python_version())
@@ -448,13 +445,12 @@ def set_command_index_rebuild_triggered(is_cmd_idx_rebuild_triggered=False):
448445

449446
@decorators.suppress_all_exceptions()
450447
def set_command_details(command, output_type=None, parameters=None, extension_name=None,
451-
extension_version=None, command_preserve_casing=None):
448+
extension_version=None):
452449
_session.command = command
453450
_session.output_type = output_type
454451
_session.parameters = parameters
455452
_session.extension_name = extension_name
456453
_session.extension_version = extension_version
457-
_session.command_preserve_casing = command_preserve_casing
458454

459455

460456
@decorators.suppress_all_exceptions()

src/azure-cli-core/azure/cli/core/tests/test_command_registration.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,11 @@ def update_and_check_index():
371371
cmd_tbl = loader.load_command_table(["hello", "mod-only"])
372372
self.assertEqual(['hello mod-only', 'hello overridden', 'hello ext-only'], list(cmd_tbl.keys()))
373373

374+
# Test mixed-case top-level command still uses command index
375+
_set_index(self.expected_command_index)
376+
cmd_tbl = loader.load_command_table(["HELLO", "mod-only"])
377+
self.assertEqual(['hello mod-only', 'hello overridden', 'hello ext-only'], list(cmd_tbl.keys()))
378+
374379
# Full scenario test 1: Installing an extension 'azext_hello1' that extends 'hello' group
375380
outdated_command_index = {'hello': ['azure.cli.command_modules.hello'],
376381
'extra': ['azure.cli.command_modules.extra']}

0 commit comments

Comments
 (0)