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

{doc} az monitor log-analytics workspace data-export: Fix typo #28958

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

AllyW
Copy link
Member

@AllyW AllyW commented May 14, 2024

Related command

Description

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.

Copy link

azure-client-tools-bot-prd bot commented May 14, 2024

❌AzureCLI-FullTest
️✔️acr
️✔️2020-09-01-hybrid
️✔️3.11
️✔️3.9
️✔️latest
️✔️3.11
️✔️3.9
️✔️acs
️✔️2020-09-01-hybrid
️✔️3.11
️✔️3.9
️✔️latest
️✔️3.11
️✔️3.9
️✔️advisor
️✔️latest
️✔️3.11
️✔️3.9
️✔️ams
️✔️latest
️✔️3.11
️✔️3.9
️✔️apim
️✔️latest
️✔️3.11
️✔️3.9
️✔️appconfig
️✔️latest
️✔️3.11
️✔️3.9
️✔️appservice
️✔️latest
️✔️3.11
️✔️3.9
️✔️aro
️✔️latest
️✔️3.11
️✔️3.9
️✔️backup
️✔️latest
️✔️3.11
️✔️3.9
️✔️batch
️✔️latest
️✔️3.11
️✔️3.9
️✔️batchai
️✔️latest
️✔️3.11
️✔️3.9
️✔️billing
️✔️latest
️✔️3.11
️✔️3.9
️✔️botservice
️✔️latest
️✔️3.11
️✔️3.9
️✔️cdn
️✔️latest
️✔️3.11
️✔️3.9
️✔️cloud
️✔️latest
️✔️3.11
️✔️3.9
️✔️cognitiveservices
️✔️latest
️✔️3.11
️✔️3.9
️✔️compute_recommender
️✔️latest
️✔️3.11
️✔️3.9
️✔️config
️✔️latest
️✔️3.11
️✔️3.9
️✔️configure
️✔️latest
️✔️3.11
️✔️3.9
️✔️consumption
️✔️latest
️✔️3.11
️✔️3.9
️✔️container
️✔️latest
️✔️3.11
️✔️3.9
️✔️containerapp
️✔️latest
️✔️3.11
️✔️3.9
️✔️core
️✔️2018-03-01-hybrid
️✔️3.11
️✔️3.9
️✔️2019-03-01-hybrid
️✔️3.11
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.11
️✔️3.9
️✔️latest
️✔️3.11
️✔️3.9
️✔️cosmosdb
️✔️latest
️✔️3.11
️✔️3.9
️✔️databoxedge
️✔️2019-03-01-hybrid
️✔️3.11
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.11
️✔️3.9
️✔️latest
️✔️3.11
️✔️3.9
️✔️dla
️✔️latest
️✔️3.11
️✔️3.9
️✔️dls
️✔️latest
️✔️3.11
️✔️3.9
️✔️dms
️✔️latest
️✔️3.11
️✔️3.9
️✔️eventgrid
️✔️latest
️✔️3.11
️✔️3.9
️✔️eventhubs
️✔️latest
️✔️3.11
️✔️3.9
️✔️feedback
️✔️latest
️✔️3.11
️✔️3.9
️✔️find
️✔️latest
️✔️3.11
️✔️3.9
️✔️hdinsight
️✔️latest
️✔️3.11
️✔️3.9
️✔️identity
️✔️latest
️✔️3.11
️✔️3.9
️✔️iot
️✔️2019-03-01-hybrid
️✔️3.11
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.11
️✔️3.9
️✔️latest
️✔️3.11
️✔️3.9
️✔️keyvault
️✔️2018-03-01-hybrid
️✔️3.11
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.11
️✔️3.9
️✔️latest
️✔️3.11
️✔️3.9
️✔️kusto
️✔️latest
️✔️3.11
️✔️3.9
️✔️lab
️✔️latest
️✔️3.11
️✔️3.9
️✔️managedservices
️✔️latest
️✔️3.11
️✔️3.9
️✔️maps
️✔️latest
️✔️3.11
️✔️3.9
️✔️marketplaceordering
️✔️latest
️✔️3.11
️✔️3.9
❌monitor
❌latest
❌3.11
Type Test Case Error Message Line
Failed test_monitor_log_analytics_workspace_data_export self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f3129bf1dd0>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f31344f1890>
command = 'monitor log-analytics workspace data-export list -g cli_test_monitor_workspace_data_export000001 --workspace-name clitest000003'
expect_failure = False

    def in_process_execute(self, cli_ctx, command, expect_failure=False):
        from io import StringIO
        from vcr.errors import CannotOverwriteExistingCassetteException
    
        if command.startswith('az '):
            command = command[3:]
    
        stdout_buf = StringIO()
        logging_buf = StringIO()
        try:
            # issue: stderr cannot be redirect in this form, as a result some failure information
            # is lost when command fails.
>           self.exit_code = cli_ctx.invoke(shlex.split(command), out_file=stdout_buf) or 0

src/azure-cli-testsdk/azure/cli/testsdk/base.py:302: 
                                        
env/lib/python3.11/site-packages/knack/cli.py:245: in invoke
    exit_code = self.exception_handler(ex)
src/azure-cli-core/azure/cli/core/init.py:127: in exception_handler
    return handle_exception(ex)
                                        

ex = KeyError("Conflict key when apply client flatten: type in {'id': '/subscriptions/00000000-0000-0000-0000-000000000000/...-02-21T05:43:42.5493614Z', 'tableNames': ['Syslog']}, 'type': 'Microsoft.OperationalInsights/workspaces/dataexports'}")
args = (), kwargs = {}

    def handle_main_exception(ex, *args, **kwargs):  # pylint: disable=unused-argument
        if isinstance(ex, CannotOverwriteExistingCassetteException):
            # This exception usually caused by a no match HTTP request. This is a product error
            # that is caused by change of SDK invocation.
            raise ex
    
>       raise CliExecutionError(ex)
E       azure.cli.testsdk.exceptions.CliExecutionError: The CLI throws exception KeyError during execution and fails the command.

src/azure-cli-testsdk/azure/cli/testsdk/patches.py:35: CliExecutionError

During handling of the above exception, another exception occurred:

self = <azure.cli.command_modules.monitor.tests.latest.test_monitor_log_analytics_workspace.TestLogProfileScenarios testMethod=test_monitor_log_analytics_workspace_data_export>
resource_group = 'cli_test_monitor_workspace_data_export000001'
account_1 = 'saws1000002'

    @ResourceGroupPreparer(name_prefix='cli_test_monitor_workspace_data_export', location='eastus')
    @StorageAccountPreparer(name_prefix='saws1', kind='StorageV2', sku='Standard_LRS', parameter_name='account_1',
                            location='eastus')
    def test_monitor_log_analytics_workspace_data_export(self, resource_group, account_1):
        from msrestazure.tools import resource_id
        self.kwargs.update({
            'workspace_name': self.create_random_name('clitest', 20),
            'data_export_name': 'clitest',
            'data_export_name_2': 'clitest2',
            'sa_1': account_1,
            'sa_id_1': resource_id(
                resource_group=resource_group,
                subscription=self.get_subscription_id(),
                name=account_1,
                namespace='Microsoft.Storage',
                type='storageAccounts'),
            'namespacename': self.create_random_name(prefix='eventhubs-nscli', length=20),
            'eventhubname': "hub_name",
            'rg': resource_group
        })
    
        self.cmd(
            "monitor log-analytics workspace create -g {rg} -n {workspace_name} --quota 1 --level 100 --sku CapacityReservation",
            checks=[
                self.check('provisioningState', 'Succeeded'),
                self.check('retentionInDays', 30),
                self.check('sku.name', 'CapacityReservation'),
                self.check('sku.capacityReservationLevel', 100),
                self.check('workspaceCapping.dailyQuotaGb', 1.0)
            ])
        self.kwargs.update({
            'table_name': 'Syslog'
        })
    
        self.cmd('monitor log-analytics workspace data-export create -g {rg} --workspace-name {workspace_name} -n {data_export_name} '
                 '--destination {sa_id_1} --enable -t {table_name}',
                 checks=[
                 ])
    
        from azure.core.exceptions import HttpResponseError
        with self.assertRaisesRegex(HttpResponseError, 'You are adding a destination that is already defined in rule: clitest. Destination must be unique across export rules in your workspace. See http://aka.ms/LADataExport#limitations'):
            self.cmd('monitor log-analytics workspace data-export create -g {rg} --workspace-name {workspace_name} -n {data_export_name_2} '
                     '--destination {sa_id_1} --enable -t "SecurityEvent Heartbeat"',
                     checks=[
                     ])
        with self.assertRaisesRegex(HttpResponseError, 'You are adding a destination that is already defined in rule: clitest. Destination must be unique across export rules in your workspace. See http://aka.ms/LADataExport#limitations'):
            self.cmd('monitor log-analytics workspace data-export create -g {rg} --workspace-name {workspace_name} -n {data_export_name_2} '
                     '--destination {sa_id_1} --enable -t {table_name}',
                     checks=[
                     ])
        with self.assertRaisesRegex(HttpResponseError, 'You are adding a destination that is already defined in rule: clitest. Destination must be unique across export rules in your workspace. See http://aka.ms/LADataExport#limitations'):
            self.cmd('monitor log-analytics workspace data-export create -g {rg} --workspace-name {workspace_name} -n {data_export_name_2} '
                     '--destination {sa_id_1} --enable -t ABC',
                     checks=[
                     ])
        with self.assertRaisesRegex(HttpResponseError,'You are adding a destination that is already defined in rule: clitest. Destination must be unique across export rules in your workspace. See http://aka.ms/LADataExport#limitations'):
            self.cmd('monitor log-analytics workspace data-export create -g {rg} --workspace-name {workspace_name} -n {data_export_name_2} '
                     '--destination {sa_id_1} --enable -t AppPerformanceCounters',
                     checks=[
                     ])
        self.cmd('monitor log-analytics workspace data-export show -g {rg} --workspace-name {workspace_name} -n {data_export_name}', checks=[
        ])
    
>       self.cmd('monitor log-analytics workspace data-export list -g {rg} --workspace-name {workspace_name}', checks=[
            self.check('length(@)', 1)
        ])

src/azure-cli/azure/cli/command_modules/monitor/tests/latest/test_monitor_log_analytics_workspace.py:469: 
 
                                       
src/azure-cli-testsdk/azure/cli/testsdk/base.py:176: in cmd
    return execute(self.cli_ctx, command, expect_failure=expect_failure).assert_with_checks(checks)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:251: in init
    self.in_process_execute(cli_ctx, command, expect_failure=expect_failure)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:314: in in_process_execute
    raise ex.exception
env/lib/python3.11/site-packages/knack/cli.py:233: in invoke
    cmd_result = self.invocation.execute(args)
src/azure-cli-core/azure/cli/core/commands/init.py:664: in execute
    raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:731: in run_jobs_serially
    results.append(self.run_job(expanded_arg, cmd_copy))
src/azure-cli-core/azure/cli/core/commands/init.py:701: in run_job
    result = cmd_copy(params)
src/azure-cli-core/azure/cli/core/aaz/command.py:155: in call
    return self.handler(*args, **kwargs)
src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/log_analytics/workspace/data_export/list.py:31: in handler
    return self.output()
src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/log_analytics/workspace/data_export/list.py:73: in output
    result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True)
src/azure-cli-core/azure/cli/core/aaz/command.py:233: in deserialize_output
    return value.to_serialized_data(processor=processor)
src/azure-cli-core/azure/cli/core/aaz/field_value.py:433: in to_serialized_data
    v = v.to_serialized_data(
src/azure-cli-core/azure/cli/core/aaz/field_value.py:144: in to_serialized_data
    result = processor(self.schema, result)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
                         

schema = <azure.cli.core.aaz._field_type.AAZObjectType object at 0x7f312af5d490>
result = {'id': '/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor_workspace_data_export00000...astModifiedDate': '2024-02-21T05:43:42.5493614Z', ...}, 'type': 'Microsoft.OperationalInsights/workspaces/dataexports'}

    def processor(schema, result):
        """A processor used in AAZBaseValue to serialized data"""
        if result == AAZUndefined or result is None:
            return result
    
        if isinstance(schema, AAZObjectType):
            # handle client flatten in result
            disc_schema = schema.get_discriminator(result)
            new_result = {}
            for k, v in result.items():
                # get schema of k
                try:
                    k_schema = schema[k]
                except AAZUnknownFieldError as err:
                    if not disc_schema:
                        raise err
                    # get k_schema from discriminator definition
                    k_schema = disc_schema[k]
    
                if secret_hidden and k_schema._flags.get('secret', False):
                    # hidden secret properties in output
                    continue
    
                if client_flatten and k_schema._flags.get('client_flatten', False):
                    # flatten k when there are client_flatten flag in its schema
                    assert isinstance(k_schema, AAZObjectType) and isinstance(v, dict)
                    for sub_k, sub_v in v.items():
                        if sub_k in new_result:
                            raise KeyError(f"Conflict key when apply client flatten: {sub_k} in {result}")
                        new_result[sub_k] = sub_v
                else:
                    if k in new_result:
>                       raise KeyError(f"Conflict key when apply client flatten: {k} in {result}")
E                       KeyError: "Conflict key when apply client flatten: type in {'id': '/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor_workspace_data_export000001/providers/Microsoft.OperationalInsights/workspaces/clitest000003/dataexports/clitest', 'name': 'clitest', 'properties': {'createdDate': '2024-02-21T05:43:42.5493614Z', 'dataExportId': '65871427-bde7-4a27-ad0c-b2d238f9ba59', 'resourceId': '/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor_workspace_data_export000001/providers/Microsoft.Storage/storageAccounts/saws1000002', 'type': 'StorageAccount', 'enable': True, 'lastModifiedDate': '2024-02-21T05:43:42.5493614Z', 'tableNames': ['Syslog']}, 'type': 'Microsoft.OperationalInsights/workspaces/dataexports'}"

src/azure-cli-core/azure/cli/core/aaz/_command.py:227: KeyError
azure/cli/command_modules/monitor/tests/latest/test_monitor_log_analytics_workspace.py:405
❌3.9
Type Test Case Error Message Line
Failed test_monitor_log_analytics_workspace_data_export self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f909d11ed90>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f90a384a490>
command = 'monitor log-analytics workspace data-export list -g cli_test_monitor_workspace_data_export000001 --workspace-name clitest000003'
expect_failure = False

    def in_process_execute(self, cli_ctx, command, expect_failure=False):
        from io import StringIO
        from vcr.errors import CannotOverwriteExistingCassetteException
    
        if command.startswith('az '):
            command = command[3:]
    
        stdout_buf = StringIO()
        logging_buf = StringIO()
        try:
            # issue: stderr cannot be redirect in this form, as a result some failure information
            # is lost when command fails.
>           self.exit_code = cli_ctx.invoke(shlex.split(command), out_file=stdout_buf) or 0

src/azure-cli-testsdk/azure/cli/testsdk/base.py:302: 
                                        
env/lib/python3.9/site-packages/knack/cli.py:245: in invoke
    exit_code = self.exception_handler(ex)
src/azure-cli-core/azure/cli/core/init.py:127: in exception_handler
    return handle_exception(ex)
                                        

ex = KeyError("Conflict key when apply client flatten: type in {'id': '/subscriptions/00000000-0000-0000-0000-000000000000/...-02-21T05:43:42.5493614Z', 'tableNames': ['Syslog']}, 'type': 'Microsoft.OperationalInsights/workspaces/dataexports'}")
args = (), kwargs = {}

    def handle_main_exception(ex, *args, **kwargs):  # pylint: disable=unused-argument
        if isinstance(ex, CannotOverwriteExistingCassetteException):
            # This exception usually caused by a no match HTTP request. This is a product error
            # that is caused by change of SDK invocation.
            raise ex
    
>       raise CliExecutionError(ex)
E       azure.cli.testsdk.exceptions.CliExecutionError: The CLI throws exception KeyError during execution and fails the command.

src/azure-cli-testsdk/azure/cli/testsdk/patches.py:35: CliExecutionError

During handling of the above exception, another exception occurred:

self = <azure.cli.command_modules.monitor.tests.latest.test_monitor_log_analytics_workspace.TestLogProfileScenarios testMethod=test_monitor_log_analytics_workspace_data_export>
resource_group = 'cli_test_monitor_workspace_data_export000001'
account_1 = 'saws1000002'

    @ResourceGroupPreparer(name_prefix='cli_test_monitor_workspace_data_export', location='eastus')
    @StorageAccountPreparer(name_prefix='saws1', kind='StorageV2', sku='Standard_LRS', parameter_name='account_1',
                            location='eastus')
    def test_monitor_log_analytics_workspace_data_export(self, resource_group, account_1):
        from msrestazure.tools import resource_id
        self.kwargs.update({
            'workspace_name': self.create_random_name('clitest', 20),
            'data_export_name': 'clitest',
            'data_export_name_2': 'clitest2',
            'sa_1': account_1,
            'sa_id_1': resource_id(
                resource_group=resource_group,
                subscription=self.get_subscription_id(),
                name=account_1,
                namespace='Microsoft.Storage',
                type='storageAccounts'),
            'namespacename': self.create_random_name(prefix='eventhubs-nscli', length=20),
            'eventhubname': "hub_name",
            'rg': resource_group
        })
    
        self.cmd(
            "monitor log-analytics workspace create -g {rg} -n {workspace_name} --quota 1 --level 100 --sku CapacityReservation",
            checks=[
                self.check('provisioningState', 'Succeeded'),
                self.check('retentionInDays', 30),
                self.check('sku.name', 'CapacityReservation'),
                self.check('sku.capacityReservationLevel', 100),
                self.check('workspaceCapping.dailyQuotaGb', 1.0)
            ])
        self.kwargs.update({
            'table_name': 'Syslog'
        })
    
        self.cmd('monitor log-analytics workspace data-export create -g {rg} --workspace-name {workspace_name} -n {data_export_name} '
                 '--destination {sa_id_1} --enable -t {table_name}',
                 checks=[
                 ])
    
        from azure.core.exceptions import HttpResponseError
        with self.assertRaisesRegex(HttpResponseError, 'You are adding a destination that is already defined in rule: clitest. Destination must be unique across export rules in your workspace. See http://aka.ms/LADataExport#limitations'):
            self.cmd('monitor log-analytics workspace data-export create -g {rg} --workspace-name {workspace_name} -n {data_export_name_2} '
                     '--destination {sa_id_1} --enable -t "SecurityEvent Heartbeat"',
                     checks=[
                     ])
        with self.assertRaisesRegex(HttpResponseError, 'You are adding a destination that is already defined in rule: clitest. Destination must be unique across export rules in your workspace. See http://aka.ms/LADataExport#limitations'):
            self.cmd('monitor log-analytics workspace data-export create -g {rg} --workspace-name {workspace_name} -n {data_export_name_2} '
                     '--destination {sa_id_1} --enable -t {table_name}',
                     checks=[
                     ])
        with self.assertRaisesRegex(HttpResponseError, 'You are adding a destination that is already defined in rule: clitest. Destination must be unique across export rules in your workspace. See http://aka.ms/LADataExport#limitations'):
            self.cmd('monitor log-analytics workspace data-export create -g {rg} --workspace-name {workspace_name} -n {data_export_name_2} '
                     '--destination {sa_id_1} --enable -t ABC',
                     checks=[
                     ])
        with self.assertRaisesRegex(HttpResponseError,'You are adding a destination that is already defined in rule: clitest. Destination must be unique across export rules in your workspace. See http://aka.ms/LADataExport#limitations'):
            self.cmd('monitor log-analytics workspace data-export create -g {rg} --workspace-name {workspace_name} -n {data_export_name_2} '
                     '--destination {sa_id_1} --enable -t AppPerformanceCounters',
                     checks=[
                     ])
        self.cmd('monitor log-analytics workspace data-export show -g {rg} --workspace-name {workspace_name} -n {data_export_name}', checks=[
        ])
    
>       self.cmd('monitor log-analytics workspace data-export list -g {rg} --workspace-name {workspace_name}', checks=[
            self.check('length(@)', 1)
        ])

src/azure-cli/azure/cli/command_modules/monitor/tests/latest/test_monitor_log_analytics_workspace.py:469: 
 
                                       
src/azure-cli-testsdk/azure/cli/testsdk/base.py:176: in cmd
    return execute(self.cli_ctx, command, expect_failure=expect_failure).assert_with_checks(checks)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:251: in init
    self.in_process_execute(cli_ctx, command, expect_failure=expect_failure)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:314: in in_process_execute
    raise ex.exception
env/lib/python3.9/site-packages/knack/cli.py:233: in invoke
    cmd_result = self.invocation.execute(args)
src/azure-cli-core/azure/cli/core/commands/init.py:664: in execute
    raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:731: in run_jobs_serially
    results.append(self.run_job(expanded_arg, cmd_copy))
src/azure-cli-core/azure/cli/core/commands/init.py:701: in run_job
    result = cmd_copy(params)
src/azure-cli-core/azure/cli/core/aaz/command.py:155: in call
    return self.handler(*args, **kwargs)
src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/log_analytics/workspace/data_export/list.py:31: in handler
    return self.output()
src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/log_analytics/workspace/data_export/list.py:73: in output
    result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True)
src/azure-cli-core/azure/cli/core/aaz/command.py:233: in deserialize_output
    return value.to_serialized_data(processor=processor)
src/azure-cli-core/azure/cli/core/aaz/field_value.py:433: in to_serialized_data
    v = v.to_serialized_data(
src/azure-cli-core/azure/cli/core/aaz/field_value.py:144: in to_serialized_data
    result = processor(self.schema, result)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
                         

schema = <azure.cli.core.aaz._field_type.AAZObjectType object at 0x7f909d1c1610>
result = {'id': '/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor_workspace_data_export00000...astModifiedDate': '2024-02-21T05:43:42.5493614Z', ...}, 'type': 'Microsoft.OperationalInsights/workspaces/dataexports'}

    def processor(schema, result):
        """A processor used in AAZBaseValue to serialized data"""
        if result == AAZUndefined or result is None:
            return result
    
        if isinstance(schema, AAZObjectType):
            # handle client flatten in result
            disc_schema = schema.get_discriminator(result)
            new_result = {}
            for k, v in result.items():
                # get schema of k
                try:
                    k_schema = schema[k]
                except AAZUnknownFieldError as err:
                    if not disc_schema:
                        raise err
                    # get k_schema from discriminator definition
                    k_schema = disc_schema[k]
    
                if secret_hidden and k_schema._flags.get('secret', False):
                    # hidden secret properties in output
                    continue
    
                if client_flatten and k_schema._flags.get('client_flatten', False):
                    # flatten k when there are client_flatten flag in its schema
                    assert isinstance(k_schema, AAZObjectType) and isinstance(v, dict)
                    for sub_k, sub_v in v.items():
                        if sub_k in new_result:
                            raise KeyError(f"Conflict key when apply client flatten: {sub_k} in {result}")
                        new_result[sub_k] = sub_v
                else:
                    if k in new_result:
>                       raise KeyError(f"Conflict key when apply client flatten: {k} in {result}")
E                       KeyError: "Conflict key when apply client flatten: type in {'id': '/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor_workspace_data_export000001/providers/Microsoft.OperationalInsights/workspaces/clitest000003/dataexports/clitest', 'name': 'clitest', 'properties': {'createdDate': '2024-02-21T05:43:42.5493614Z', 'dataExportId': '65871427-bde7-4a27-ad0c-b2d238f9ba59', 'resourceId': '/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_monitor_workspace_data_export000001/providers/Microsoft.Storage/storageAccounts/saws1000002', 'type': 'StorageAccount', 'enable': True, 'lastModifiedDate': '2024-02-21T05:43:42.5493614Z', 'tableNames': ['Syslog']}, 'type': 'Microsoft.OperationalInsights/workspaces/dataexports'}"

src/azure-cli-core/azure/cli/core/aaz/_command.py:227: KeyError
azure/cli/command_modules/monitor/tests/latest/test_monitor_log_analytics_workspace.py:405
️✔️mysql
️✔️latest
️✔️3.11
️✔️3.9
️✔️netappfiles
️✔️latest
️✔️3.11
️✔️3.9
️✔️network
️✔️2018-03-01-hybrid
️✔️3.11
️✔️3.9
️✔️latest
️✔️3.11
️✔️3.9
️✔️policyinsights
️✔️latest
️✔️3.11
️✔️3.9
️✔️privatedns
️✔️latest
️✔️3.11
️✔️3.9
️✔️profile
️✔️latest
️✔️3.11
️✔️3.9
️✔️rdbms
️✔️latest
️✔️3.11
️✔️3.9
️✔️redis
️✔️latest
️✔️3.11
️✔️3.9
️✔️relay
️✔️latest
️✔️3.11
️✔️3.9
️✔️resource
️✔️2018-03-01-hybrid
️✔️3.11
️✔️3.9
️✔️2019-03-01-hybrid
️✔️3.11
️✔️3.9
️✔️latest
️✔️3.11
️✔️3.9
️✔️role
️✔️latest
️✔️3.11
️✔️3.9
️✔️search
️✔️latest
️✔️3.11
️✔️3.9
️✔️security
️✔️latest
️✔️3.11
️✔️3.9
️✔️servicebus
️✔️latest
️✔️3.11
️✔️3.9
️✔️serviceconnector
️✔️latest
️✔️3.11
️✔️3.9
️✔️servicefabric
️✔️latest
️✔️3.11
️✔️3.9
️✔️signalr
️✔️latest
️✔️3.11
️✔️3.9
️✔️sql
️✔️latest
️✔️3.11
️✔️3.9
️✔️sqlvm
️✔️latest
️✔️3.11
️✔️3.9
️✔️storage
️✔️2018-03-01-hybrid
️✔️3.11
️✔️3.9
️✔️2019-03-01-hybrid
️✔️3.11
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.11
️✔️3.9
️✔️latest
️✔️3.11
️✔️3.9
️✔️synapse
️✔️latest
️✔️3.11
️✔️3.9
️✔️telemetry
️✔️2018-03-01-hybrid
️✔️3.11
️✔️3.9
️✔️2019-03-01-hybrid
️✔️3.11
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.11
️✔️3.9
️✔️latest
️✔️3.11
️✔️3.9
️✔️util
️✔️latest
️✔️3.11
️✔️3.9
️✔️vm
️✔️2018-03-01-hybrid
️✔️3.11
️✔️3.9
️✔️2019-03-01-hybrid
️✔️3.11
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.11
️✔️3.9
️✔️latest
️✔️3.11
️✔️3.9

Copy link

Hi @AllyW,
Since the current milestone time is less than 7 days, this pr will be reviewed in the next milestone.

Copy link

azure-client-tools-bot-prd bot commented May 14, 2024

⚠️AzureCLI-BreakingChangeTest
⚠️monitor
rule cmd_name rule_message suggest_message
⚠️ 1009 - ParaPropRemove monitor log-analytics workspace data-export create cmd monitor log-analytics workspace data-export create update parameter data_export_name: removed property id_part=child_name_1
⚠️ 1009 - ParaPropRemove monitor log-analytics workspace data-export create cmd monitor log-analytics workspace data-export create update parameter workspace_name: removed property id_part=name

@yonzhan
Copy link
Collaborator

yonzhan commented May 14, 2024

doc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Assign Auto assign by bot Monitor az monitor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants