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

{Core} Add dict transformation for typespec generated SDKs #30339

Draft
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

evelyn-ys
Copy link
Member

@evelyn-ys evelyn-ys commented Nov 14, 2024

Related command

Description

SDK models have changed when we move from swagger generated to typespec generated. This cause issues for knack.util.todict to do the formatter over command output. We call

result = todict(result, AzCliCommandInvoker.remove_additional_prop_layer)
to convert the command result for easier format. Here's how todict is implemented in knack:

def todict(obj, post_processor=None):  # pylint: disable=too-many-return-statements
    """
    Convert an object to a dictionary. Use 'post_processor(original_obj, dictionary)' to update the
    dictionary in the process
    """
    if isinstance(obj, dict):
        result = {k: todict(v, post_processor) for (k, v) in obj.items()}
        return post_processor(obj, result) if post_processor else result
    if isinstance(obj, list):
        return [todict(a, post_processor) for a in obj]
    if isinstance(obj, Enum):
        return obj.value
    if isinstance(obj, (date, time, datetime)):
        return obj.isoformat()
    if isinstance(obj, timedelta):
        return str(obj)
    if hasattr(obj, '_asdict'):
        return todict(obj._asdict(), post_processor)
    if hasattr(obj, '__dict__'):
        result = {to_camel_case(k): todict(v, post_processor)
                  for k, v in obj.__dict__.items()
                  if not callable(v) and not k.startswith('_')}
        return post_processor(obj, result) if post_processor else result
    return obj

Currently working with swagger generated models, it runs into hasattr(obj, '__dict__') and transforms obj.__dict__.items() one by one if the item isn't private starting with _.

But now for typespec generated models, a new base model is designed to store all data in __dict__['_data']. In such case, we won't get anything by iterating __dict__ as before. The new model provides a as_dict func instead to transform the model object to dict.

There are three workarounds:

This PR works for the second solution.

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 Nov 14, 2024

❌AzureCLI-FullTest
🔄acr
🔄latest
🔄3.12
🔄acs
🔄latest
🔄3.12
🔄advisor
🔄latest
🔄3.12
❌ams
❌latest
❌3.12
Type Test Case Error Message Line
Failed test_ams_encryption_set_show self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f3dc1f1bef0>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f3dc3e204d0>
command = 'ams account create -n ams000004 -g clitest.rg000001 --storage-account clitest000002 -l centralus --mi-system-assigned --default-action Allow'
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.12/site-packages/knack/cli.py:245: in invoke
    exit_code = self.exception_handler(ex)
src/azure-cli-core/azure/cli/core/init.py:129: in exception_handler
    return handle_exception(ex)
                                        

ex = NameError("name 'obj' is not defined"), 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 NameError 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.ams.tests.latest.test_ams_account_encryption_scenarios.AmsEncryptionTests testMethod=test_ams_encryption_set_show>
resource_group = 'clitest.rg000001'
storage_account_for_create = 'clitest000002', key_vault = 'clitest000003'

    @ResourceGroupPreparer()
    @StorageAccountPreparer(parameter_name='storage_account_for_create')
    @KeyVaultPreparer(location='centralus', additional_params='--enable-purge-protection')
    def test_ams_encryption_set_show(self, resource_group, storage_account_for_create, key_vault):
        amsname = self.create_random_name(prefix='ams', length=12)
    
        self.kwargs.update({
            'amsname': amsname,
            'storageAccount': storage_account_for_create,
            'location': 'centralus',
            'keySource': 'CustomerKey',
            'keyVault': key_vault,
            'keyName': self.create_random_name(prefix='ams', length=12),
            'identityPermissions': "get unwrapkey wrapkey",
        })
    
>       account_result = self.cmd('az ams account create -n {amsname} -g {rg} --storage-account {storageAccount} -l {location} --mi-system-assigned --default-action Allow', checks=[
            self.check('name', '{amsname}'),
            self.check('location', 'Central US')
        ])

src/azure-cli/azure/cli/command_modules/ams/tests/latest/test_ams_account_encryption_scenarios.py:26: 
 
                                       
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.12/site-packages/knack/cli.py:233: in invoke
    cmd_result = self.invocation.execute(args)
src/azure-cli-core/azure/cli/core/commands/init.py:674: in execute
    raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:745: in run_jobs_serially
    results.append(self.run_job(expanded_arg, cmd_copy))
src/azure-cli-core/azure/cli/core/commands/init.py:737: in run_job
    return cmd_copy.exception_handler(ex)
src/azure-cli/azure/cli/command_modules/ams/exception_handler.py:16: in ams_exception_handler
    raise ex
 
 
 
 
 
                                   

self = <azure.cli.core.commands.AzCliCommandInvoker object at 0x7f3dc1c05340>
expanded_arg = Namespace(_log_verbosity_verbose=False, _log_verbosity_debug=False, _log_verbosity_only_show_errors=False, _output_for...atter'>, conflict_handler='error', add_help=True), cmd=<azure.cli.core.commands.AzCliCommand object at 0x7f3dc19e0a70>)
cmd_copy = <azure.cli.core.commands.AzCliCommand object at 0x7f3dc19e0a70>

    def _run_job(self, expanded_arg, cmd_copy):
        params = self._filter_params(expanded_arg)
        try:
            result = cmd_copy(params)
            if cmd_copy.supports_no_wait and getattr(expanded_arg, 'no_wait', False):
                result = None
            elif cmd_copy.no_wait_param and getattr(expanded_arg, cmd_copy.no_wait_param, False):
                result = None
    
            transform_op = cmd_copy.command_kwargs.get('transform', None)
            if transform_op:
                result = transform_op(result)
    
            if _is_poller(result):
                result = LongRunningOperation(cmd_copy.cli_ctx, 'Starting {}'.format(cmd_copy.name))(result)
            elif _is_paged(result):
                result = list(result)
    
            # This is added for new models from typespec generated SDKs
            # These models store data in __dict__['_data'] instead of in __dict__
>           if result and hasattr(result, 'as_dict') and not hasattr(obj, '_attribute_map'):
E           NameError: name 'obj' is not defined

src/azure-cli-core/azure/cli/core/commands/init.py:728: NameError
azure/cli/command_modules/ams/tests/latest/test_ams_account_encryption_scenarios.py:9
Failed test_ams_account_filter_create_and_show self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f3dc22e9fd0>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f3dc3cc0290>
command = 'ams account create -n ams000003 -g clitest.rg000001 --storage-account clitest000002 -l northcentralus'
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.12/site-packages/knack/cli.py:245: in invoke
    exit_code = self.exception_handler(ex)
src/azure-cli-core/azure/cli/core/init.py:129: in exception_handler
    return handle_exception(ex)
                                        

ex = NameError("name 'obj' is not defined"), 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 NameError 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.ams.tests.latest.test_ams_account_filter_scenarios.AmsAccountFilterTests testMethod=test_ams_account_filter_create_and_show>
storage_account_for_create_and_show = 'clitest000002'

    @ResourceGroupPreparer()
    @StorageAccountPreparer(parameter_name='storage_account_for_create_and_show')
    def test_ams_account_filter_create_and_show(self, storage_account_for_create_and_show):
        amsname = self.create_random_name(prefix='ams', length=12)
        filter_name = self.create_random_name(prefix='filter', length=12)
    
        self.kwargs.update({
            'amsname': amsname,
            'storageAccount': storage_account_for_create_and_show,
            'location': 'northcentralus',
            'filterName': filter_name,
            'firstQuality': 420,
            'endTimestamp': 100000000,
            'liveBackoffDuration': 60,
            'presentationWindowDuration': 1200000000,
            'startTimestamp': 40000000,
            'timescale': 10000000,
            'tracks': '@' + get_test_data_file('filterTracks.json')
        })
    
>       self.cmd('az ams account create -n {amsname} -g {rg} --storage-account {storageAccount} -l {location}')

src/azure-cli/azure/cli/command_modules/ams/tests/latest/test_ams_account_filter_scenarios.py:32: 
 
 
                                      
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.12/site-packages/knack/cli.py:233: in invoke
    cmd_result = self.invocation.execute(args)
src/azure-cli-core/azure/cli/core/commands/init.py:674: in execute
    raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:745: in run_jobs_serially
    results.append(self.run_job(expanded_arg, cmd_copy))
src/azure-cli-core/azure/cli/core/commands/init.py:737: in run_job
    return cmd_copy.exception_handler(ex)
src/azure-cli/azure/cli/command_modules/ams/exception_handler.py:16: in ams_exception_handler
    raise ex
 
 
 
 
 
 
                                 _ 

self = <azure.cli.core.commands.AzCliCommandInvoker object at 0x7f3dc1c8be00>
expanded_arg = Namespace(_log_verbosity_verbose=False, _log_verbosity_debug=False, _log_verbosity_only_show_errors=False, _output_for...atter'>, conflict_handler='error', add_help=True), cmd=<azure.cli.core.commands.AzCliCommand object at 0x7f3dc1bf7140>)
cmd_copy = <azure.cli.core.commands.AzCliCommand object at 0x7f3dc1bf7140>

    def _run_job(self, expanded_arg, cmd_copy):
        params = self._filter_params(expanded_arg)
        try:
            result = cmd_copy(params)
            if cmd_copy.supports_no_wait and getattr(expanded_arg, 'no_wait', False):
                result = None
            elif cmd_copy.no_wait_param and getattr(expanded_arg, cmd_copy.no_wait_param, False):
                result = None
    
            transform_op = cmd_copy.command_kwargs.get('transform', None)
            if transform_op:
                result = transform_op(result)
    
            if _is_poller(result):
                result = LongRunningOperation(cmd_copy.cli_ctx, 'Starting {}'.format(cmd_copy.name))(result)
            elif _is_paged(result):
                result = list(result)
    
            # This is added for new models from typespec generated SDKs
            # These models store data in __dict__['_data'] instead of in __dict__
>           if result and hasattr(result, 'as_dict') and not hasattr(obj, '_attribute_map'):
E           NameError: name 'obj' is not defined

src/azure-cli-core/azure/cli/core/commands/init.py:728: NameError
azure/cli/command_modules/ams/tests/latest/test_ams_account_filter_scenarios.py:11
Failed test_ams_account_filter_list_and_delete self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f3dc22e9fd0>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f3dc3b53ad0>
command = 'ams account create -n ams000003 -g clitest.rg000001 --storage-account clitest000002 -l southcentralus'
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.12/site-packages/knack/cli.py:245: in invoke
    exit_code = self.exception_handler(ex)
src/azure-cli-core/azure/cli/core/init.py:129: in exception_handler
    return handle_exception(ex)
                                        

ex = NameError("name 'obj' is not defined"), 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 NameError 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.ams.tests.latest.test_ams_account_filter_scenarios.AmsAccountFilterTests testMethod=test_ams_account_filter_list_and_delete>
storage_account_for_list_and_delete = 'clitest000002'

    @ResourceGroupPreparer()
    @StorageAccountPreparer(parameter_name='storage_account_for_list_and_delete')
    def test_ams_account_filter_list_and_delete(self, storage_account_for_list_and_delete):
        amsname = self.create_random_name(prefix='ams', length=12)
        filter_name_1 = self.create_random_name(prefix='filter', length=12)
        filter_name_2 = self.create_random_name(prefix='filter', length=13)
    
        self.kwargs.update({
            'amsname': amsname,
            'storageAccount': storage_account_for_list_and_delete,
            'location': 'southcentralus',
            'filterName1': filter_name_1,
            'filterName2': filter_name_2,
            'bitrate1': 420,
            'bitrate2': 1000,
            'endTimestamp': 100000000,
            'liveBackoffDuration': 60,
            'presentationWindowDuration': 1200000000,
            'startTimestamp': 40000000,
            'timescale': 10000000,
            'tracks': '@' + get_test_data_file('filterTracks.json')
        })
    
>       self.cmd('az ams account create -n {amsname} -g {rg} --storage-account {storageAccount} -l {location}')

src/azure-cli/azure/cli/command_modules/ams/tests/latest/test_ams_account_filter_scenarios.py:102: 
 
 
                                      
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.12/site-packages/knack/cli.py:233: in invoke
    cmd_result = self.invocation.execute(args)
src/azure-cli-core/azure/cli/core/commands/init.py:674: in execute
    raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:745: in run_jobs_serially
    results.append(self.run_job(expanded_arg, cmd_copy))
src/azure-cli-core/azure/cli/core/commands/init.py:737: in run_job
    return cmd_copy.exception_handler(ex)
src/azure-cli/azure/cli/command_modules/ams/exception_handler.py:16: in ams_exception_handler
    raise ex
 
 
 
 
 
 
                                 _ 

self = <azure.cli.core.commands.AzCliCommandInvoker object at 0x7f3dc1cceea0>
expanded_arg = Namespace(_log_verbosity_verbose=False, _log_verbosity_debug=False, _log_verbosity_only_show_errors=False, _output_for...atter'>, conflict_handler='error', add_help=True), cmd=<azure.cli.core.commands.AzCliCommand object at 0x7f3dc1d8ce60>)
cmd_copy = <azure.cli.core.commands.AzCliCommand object at 0x7f3dc1d8ce60>

    def _run_job(self, expanded_arg, cmd_copy):
        params = self._filter_params(expanded_arg)
        try:
            result = cmd_copy(params)
            if cmd_copy.supports_no_wait and getattr(expanded_arg, 'no_wait', False):
                result = None
            elif cmd_copy.no_wait_param and getattr(expanded_arg, cmd_copy.no_wait_param, False):
                result = None
    
            transform_op = cmd_copy.command_kwargs.get('transform', None)
            if transform_op:
                result = transform_op(result)
    
            if _is_poller(result):
                result = LongRunningOperation(cmd_copy.cli_ctx, 'Starting {}'.format(cmd_copy.name))(result)
            elif _is_paged(result):
                result = list(result)
    
            # This is added for new models from typespec generated SDKs
            # These models store data in __dict__['_data'] instead of in __dict__
>           if result and hasattr(result, 'as_dict') and not hasattr(obj, '_attribute_map'):
E           NameError: name 'obj' is not defined

src/azure-cli-core/azure/cli/core/commands/init.py:728: NameError
azure/cli/command_modules/ams/tests/latest/test_ams_account_filter_scenarios.py:78
Failed test_ams_account_filter_update The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_account_filter_scenarios.py:126
Failed test_ams_add_user_identity The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_account_identity_scenarios.py:37
Failed test_ams_create_system_identity self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f3dc1cd5eb0>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f3dc3edd310>
command = 'ams account create -n ams000003 -g clitest.rg000001 --storage-account clitest000002 -l centralus --mi-system-assigned --default-action Allow'
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.12/site-packages/knack/cli.py:245: in invoke
    exit_code = self.exception_handler(ex)
src/azure-cli-core/azure/cli/core/init.py:129: in exception_handler
    return handle_exception(ex)
                                        

ex = NameError("name 'obj' is not defined"), 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 NameError 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.ams.tests.latest.test_ams_account_identity_scenarios.AmsAccountIdentityTests testMethod=test_ams_create_system_identity>
resource_group = 'clitest.rg000001'
storage_account_for_create = 'clitest000002'

    @ResourceGroupPreparer()
    @StorageAccountPreparer(parameter_name='storage_account_for_create')
    def test_ams_create_system_identity(self, resource_group, storage_account_for_create):
        amsname = self.create_random_name(prefix='ams', length=12)
    
        self.kwargs.update({
            'amsname': amsname,
            'storageAccount': storage_account_for_create,
            'location': 'centralus',
        })
    
>       self.cmd('az ams account create -n {amsname} -g {rg} --storage-account {storageAccount} -l {location} --mi-system-assigned --default-action Allow', checks=[
            self.check('name', '{amsname}'),
            self.check('location', 'Central US'),
            self.check('identity.type', 'SystemAssigned')
        ])

src/azure-cli/azure/cli/command_modules/ams/tests/latest/test_ams_account_identity_scenarios.py:21: 
 
                                       
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.12/site-packages/knack/cli.py:233: in invoke
    cmd_result = self.invocation.execute(args)
src/azure-cli-core/azure/cli/core/commands/init.py:674: in execute
    raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:745: in run_jobs_serially
    results.append(self.run_job(expanded_arg, cmd_copy))
src/azure-cli-core/azure/cli/core/commands/init.py:737: in run_job
    return cmd_copy.exception_handler(ex)
src/azure-cli/azure/cli/command_modules/ams/exception_handler.py:16: in ams_exception_handler
    raise ex
 
 
 
 
 
                                   

self = <azure.cli.core.commands.AzCliCommandInvoker object at 0x7f3dc896cbf0>
expanded_arg = Namespace(_log_verbosity_verbose=False, _log_verbosity_debug=False, _log_verbosity_only_show_errors=False, _output_for...atter'>, conflict_handler='error', add_help=True), cmd=<azure.cli.core.commands.AzCliCommand object at 0x7f3dc1b6a720>)
cmd_copy = <azure.cli.core.commands.AzCliCommand object at 0x7f3dc1b6a720>

    def _run_job(self, expanded_arg, cmd_copy):
        params = self._filter_params(expanded_arg)
        try:
            result = cmd_copy(params)
            if cmd_copy.supports_no_wait and getattr(expanded_arg, 'no_wait', False):
                result = None
            elif cmd_copy.no_wait_param and getattr(expanded_arg, cmd_copy.no_wait_param, False):
                result = None
    
            transform_op = cmd_copy.command_kwargs.get('transform', None)
            if transform_op:
                result = transform_op(result)
    
            if _is_poller(result):
                result = LongRunningOperation(cmd_copy.cli_ctx, 'Starting {}'.format(cmd_copy.name))(result)
            elif _is_paged(result):
                result = list(result)
    
            # This is added for new models from typespec generated SDKs
            # These models store data in __dict__['_data'] instead of in __dict__
>           if result and hasattr(result, 'as_dict') and not hasattr(obj, '_attribute_map'):
E           NameError: name 'obj' is not defined

src/azure-cli-core/azure/cli/core/commands/init.py:728: NameError
azure/cli/command_modules/ams/tests/latest/test_ams_account_identity_scenarios.py:9
Failed test_ams_check_name The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_account_scenarios.py:92
Failed test_ams_create_show The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_account_scenarios.py:9
Failed test_ams_storage_add_remove The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_account_scenarios.py:61
Failed test_ams_sync_storage_keys The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_account_scenarios.py:40
Failed test_ams_asset_filter_create The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_asset_filter_scenarios.py:13
Failed test_ams_asset_filter_list_and_delete The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_asset_filter_scenarios.py:142
Failed test_ams_asset_filter_show The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_asset_filter_scenarios.py:73
Failed test_ams_asset_filter_update The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_asset_filter_scenarios.py:203
Failed test_ams_asset The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_asset_scenarios.py:10
Failed test_ams_asset_get_encryption_key The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_asset_scenarios.py:119
Failed test_ams_asset_get_sas_urls The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_asset_scenarios.py:82
Failed test_ams_asset_list_streaming_locators The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_asset_scenarios.py:152
Failed test_ams_asset_track_create The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_asset_track_scenarios.py:14
Failed test_ams_asset_track_delete The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_asset_track_scenarios.py:183
Failed test_ams_asset_track_list The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_asset_track_scenarios.py:126
Failed test_ams_asset_track_show The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_asset_track_scenarios.py:68
Failed test_ams_asset_track_update The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_asset_track_scenarios.py:248
Failed test_content_key_policy_create_basic The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_content_key_policy_scenarios.py:302
Failed test_content_key_policy_create_with_fairplay The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_content_key_policy_scenarios.py:168
Failed test_content_key_policy_create_with_fairplay_offline The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_content_key_policy_scenarios.py:201
Failed test_content_key_policy_create_with_playready_fail The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_content_key_policy_scenarios.py:15
Failed test_content_key_policy_create_with_playready_success The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_content_key_policy_scenarios.py:37
Failed test_content_key_policy_create_with_token The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_content_key_policy_scenarios.py:238
Failed test_content_key_policy_create_with_widevine The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_content_key_policy_scenarios.py:277
Failed test_content_key_policy_delete_list The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_content_key_policy_scenarios.py:399
Failed test_content_key_policy_show_basic The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_content_key_policy_scenarios.py:332
Failed test_content_key_policy_show_with_secrets The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_content_key_policy_scenarios.py:364
Failed test_content_key_policy_update The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_content_key_policy_scenarios.py:114
Failed test_ams_job The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_job_scenarios.py:13
Failed test_live_event_create The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_live_event_scenarios.py:13
Failed test_live_event_delete The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_live_event_scenarios.py:270
Failed test_live_event_list The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_live_event_scenarios.py:236
Failed test_live_event_reset The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_live_event_scenarios.py:310
Failed test_live_event_show The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_live_event_scenarios.py:381
Failed test_live_event_standby The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_live_event_scenarios.py:111
Failed test_live_event_start The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_live_event_scenarios.py:75
Failed test_live_event_stop The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_live_event_scenarios.py:150
Failed test_live_event_stop_and_remove_outputs The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_live_event_scenarios.py:179
Failed test_live_event_update The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_live_event_scenarios.py:345
Failed test_live_output_create The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_live_output_scenarios.py:10
Failed test_live_output_delete The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_live_output_scenarios.py:141
Failed test_live_output_list The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_live_output_scenarios.py:58
Failed test_live_output_show The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_live_output_scenarios.py:94
Failed test_ams_sp_create_reset The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_sp_scenarios.py:12
Failed test_ams_streaming_endpoint_create The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_streaming_endpoint_scenarios.py:180
Failed test_ams_streaming_endpoint_create_with_akamai The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_streaming_endpoint_scenarios.py:54
Failed test_ams_streaming_endpoint_create_with_akamai_without_ips The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_streaming_endpoint_scenarios.py:14
Failed test_ams_streaming_endpoint_delete The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_streaming_endpoint_scenarios.py:263
Failed test_ams_streaming_endpoint_get_skus The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_streaming_endpoint_scenarios.py:456
Failed test_ams_streaming_endpoint_list The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_streaming_endpoint_scenarios.py:434
Failed test_ams_streaming_endpoint_scale The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_streaming_endpoint_scenarios.py:298
Failed test_ams_streaming_endpoint_show The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_streaming_endpoint_scenarios.py:217
Failed test_ams_streaming_endpoint_start The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_streaming_endpoint_scenarios.py:334
Failed test_ams_streaming_endpoint_start_async The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_streaming_endpoint_scenarios.py:356
Failed test_ams_streaming_endpoint_stop The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_streaming_endpoint_scenarios.py:410
Failed test_ams_streaming_endpoint_stop_async The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_streaming_endpoint_scenarios.py:382
Failed test_ams_streaming_locator The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_streaming_locator_scenarios.py:13
Failed test_ams_streaming_locator_list_content_keys The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_streaming_locator_scenarios.py:226
Failed test_ams_streaming_locator_with_content_keys The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_streaming_locator_scenarios.py:150
Failed test_ams_streaming_locator_with_filters The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_streaming_locator_scenarios.py:78
Failed test_ams_streaming_policy The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_streaming_policy_scenarios.py:12
Failed test_ams_streaming_policy_cbcs The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_streaming_policy_scenarios.py:258
Failed test_ams_streaming_policy_cbcs_default_drm The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_streaming_policy_scenarios.py:293
Failed test_ams_streaming_policy_cenc The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_streaming_policy_scenarios.py:83
Failed test_ams_streaming_policy_cenc_default_drm The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_streaming_policy_scenarios.py:142
Failed test_ams_streaming_policy_cenc_disable_widevine The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_streaming_policy_scenarios.py:200
Failed test_ams_streaming_policy_envelope The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_streaming_policy_scenarios.py:50
Failed test_ams_transform The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_transform_scenarios.py:13
Failed test_ams_transform_create_custom_preset The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_transform_scenarios.py:104
Failed test_ams_transform_create_custom_preset_invalid The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_transform_scenarios.py:78
Failed test_ams_transform_output_add The error message is too long, please check the pipeline log for details. azure/cli/command_modules/ams/tests/latest/test_ams_transform_scenarios.py:134
🔄apim
🔄latest
🔄3.12
🔄appconfig
🔄latest
🔄3.12
🔄appservice
🔄latest
🔄3.12
🔄aro
🔄latest
🔄3.12
🔄backup
🔄latest
🔄3.12
🔄batch
🔄latest
🔄3.12
🔄batchai
🔄latest
🔄3.12
❌billing
❌latest
❌3.12
Type Test Case Error Message Line
Failed test_list_enrollment_accounts The error message is too long, please check the pipeline log for details. azure/cli/command_modules/billing/tests/latest/test_billing_commands.py:35
Failed test_billing_balance_show The error message is too long, please check the pipeline log for details. azure/cli/command_modules/billing/tests/latest/test_billing_scenario_incrementalGenerated.py:900
Failed test_biiling_profile_list_and_show The error message is too long, please check the pipeline log for details. azure/cli/command_modules/billing/tests/latest/test_billing_scenario_incrementalGenerated.py:862
Failed test_billing_customer_list_and_show The error message is too long, please check the pipeline log for details. azure/cli/command_modules/billing/tests/latest/test_billing_scenario_incrementalGenerated.py:912
Failed test_billing_policy_show_and_update The error message is too long, please check the pipeline log for details. azure/cli/command_modules/billing/tests/latest/test_billing_scenario_incrementalGenerated.py:934
Failed test_billing_property_show The error message is too long, please check the pipeline log for details. azure/cli/command_modules/billing/tests/latest/test_billing_scenario_incrementalGenerated.py:953
Failed test_billing_invoice_section_list_and_show The error message is too long, please check the pipeline log for details. azure/cli/command_modules/billing/tests/latest/test_billing_scenario_incrementalGenerated.py:985
Failed test_billing_section_create The error message is too long, please check the pipeline log for details. azure/cli/command_modules/billing/tests/latest/test_billing_scenario_incrementalGenerated.py:989
Failed test_role_definition_list_and_show The error message is too long, please check the pipeline log for details. azure/cli/command_modules/billing/tests/latest/test_billing_scenario_incrementalGenerated.py:1064
Failed test_instruction_create_and_update The error message is too long, please check the pipeline log for details. azure/cli/command_modules/billing/tests/latest/test_billing_scenario_incrementalGenerated.py:1128
🔄botservice
🔄latest
🔄3.12
🔄cdn
🔄latest
🔄3.12
🔄cloud
🔄latest
🔄3.12
🔄cognitiveservices
🔄latest
🔄3.12
️✔️compute_recommender
️✔️latest
️✔️3.12
🔄computefleet
🔄latest
🔄3.12
🔄config
🔄latest
🔄3.12
🔄configure
🔄latest
🔄3.12
🔄consumption
🔄latest
🔄3.12
🔄container
🔄latest
🔄3.12
🔄containerapp
🔄latest
🔄3.12
🔄core
️✔️2018-03-01-hybrid
️✔️3.9
🔄latest
🔄3.12
🔄cosmosdb
🔄latest
🔄3.12
❌databoxedge
❌latest
❌3.12
Type Test Case Error Message Line
Failed test_device The error message is too long, please check the pipeline log for details. azure/cli/command_modules/databoxedge/tests/latest/test_device_scenario.py:12
Failed test_bandwidth The error message is too long, please check the pipeline log for details. azure/cli/command_modules/databoxedge/tests/latest/test_general_scenario.py:12
Failed test_order The error message is too long, please check the pipeline log for details. azure/cli/command_modules/databoxedge/tests/latest/test_order_scenario.py:12
🔄dls
🔄latest
🔄3.12
🔄dms
🔄latest
🔄3.12
🔄eventgrid
🔄latest
🔄3.12
🔄eventhubs
🔄latest
🔄3.12
🔄feedback
🔄latest
🔄3.12
🔄find
🔄latest
🔄3.12
🔄hdinsight
🔄latest
🔄3.12
🔄identity
🔄latest
🔄3.12
🔄iot
🔄latest
🔄3.12
❌keyvault
❌2018-03-01-hybrid
❌3.9
Type Test Case Error Message Line
Failed test_keyvault_mgmt The error message is too long, please check the pipeline log for details. azure/cli/command_modules/keyvault/tests/hybrid_2018_03_01/test_keyvault_commands.py:51
Failed test_keyvault_key The error message is too long, please check the pipeline log for details. azure/cli/command_modules/keyvault/tests/hybrid_2018_03_01/test_keyvault_commands.py:131
Failed test_keyvault_secret The error message is too long, please check the pipeline log for details. azure/cli/command_modules/keyvault/tests/hybrid_2018_03_01/test_keyvault_commands.py:258
Failed test_keyvault_certificate_get_default_policy The error message is too long, please check the pipeline log for details. azure/cli/command_modules/keyvault/tests/hybrid_2018_03_01/test_keyvault_commands.py:507
Failed test_keyvault_softdelete The error message is too long, please check the pipeline log for details. azure/cli/command_modules/keyvault/tests/hybrid_2018_03_01/test_keyvault_commands.py:668
🔄latest
🔄3.12
🔄lab
🔄latest
🔄3.12
🔄managedservices
🔄latest
🔄3.12
🔄maps
🔄latest
🔄3.12
❌marketplaceordering
❌latest
❌3.12
Type Test Case Error Message Line
Failed test_marketplaceordering_Scenario The error message is too long, please check the pipeline log for details. azure/cli/command_modules/marketplaceordering/tests/latest/test_marketplaceordering_scenario.py:51
🔄monitor
🔄latest
🔄3.12
🔄mysql
🔄latest
🔄3.12
🔄netappfiles
🔄latest
🔄3.12
❌network
❌2018-03-01-hybrid
❌3.9
Type Test Case Error Message Line
Failed test_dns_zone2_import The error message is too long, please check the pipeline log for details. src/azure-cli/azure/cli/command_modules/network/tests/hybrid_2018_03_01/test_dns_commands.py:62
Failed test_dns_zone3_import The error message is too long, please check the pipeline log for details. src/azure-cli/azure/cli/command_modules/network/tests/hybrid_2018_03_01/test_dns_commands.py:66
Failed test_dns_zone4_import The error message is too long, please check the pipeline log for details. src/azure-cli/azure/cli/command_modules/network/tests/hybrid_2018_03_01/test_dns_commands.py:70
Failed test_dns_zone5_import The error message is too long, please check the pipeline log for details. src/azure-cli/azure/cli/command_modules/network/tests/hybrid_2018_03_01/test_dns_commands.py:74
Failed test_dns_zone6_import The error message is too long, please check the pipeline log for details. src/azure-cli/azure/cli/command_modules/network/tests/hybrid_2018_03_01/test_dns_commands.py:78
Failed test_dns The error message is too long, please check the pipeline log for details. src/azure-cli/azure/cli/command_modules/network/tests/hybrid_2018_03_01/test_dns_commands.py:85
Failed test_network_nic_convenience_commands The error message is too long, please check the pipeline log for details. src/azure-cli/azure/cli/command_modules/network/tests/hybrid_2018_03_01/test_network_commands.py:709
🔄latest
🔄3.12
🔄policyinsights
🔄latest
🔄3.12
🔄privatedns
🔄latest
🔄3.12
🔄profile
🔄latest
🔄3.12
🔄rdbms
🔄latest
🔄3.12
❌redis
❌latest
❌3.12
Type Test Case Error Message Line
Failed test_redis_cache_authentication The error message is too long, please check the pipeline log for details. azure/cli/command_modules/redis/tests/latest/test_redis_scenario.py:111
Failed test_redis_cache_export_import The error message is too long, please check the pipeline log for details. azure/cli/command_modules/redis/tests/latest/test_redis_scenario.py:278
Failed test_redis_cache_firewall The error message is too long, please check the pipeline log for details. azure/cli/command_modules/redis/tests/latest/test_redis_scenario.py:337
Failed test_redis_cache_flush The error message is too long, please check the pipeline log for details. azure/cli/command_modules/redis/tests/latest/test_redis_scenario.py:556
Failed test_redis_cache_list_firewall_and_server_link_works The error message is too long, please check the pipeline log for details. azure/cli/command_modules/redis/tests/latest/test_redis_scenario.py:265
Failed test_redis_cache_list_keys The error message is too long, please check the pipeline log for details. azure/cli/command_modules/redis/tests/latest/test_redis_scenario.py:221
Failed test_redis_cache_managed_identity The error message is too long, please check the pipeline log for details. azure/cli/command_modules/redis/tests/latest/test_redis_scenario.py:403
Failed test_redis_cache_patch_schedule The error message is too long, please check the pipeline log for details. azure/cli/command_modules/redis/tests/latest/test_redis_scenario.py:236
Failed test_redis_cache_reboot The error message is too long, please check the pipeline log for details. azure/cli/command_modules/redis/tests/latest/test_redis_scenario.py:359
Failed test_redis_cache_regenerate_key_update_tags The error message is too long, please check the pipeline log for details. azure/cli/command_modules/redis/tests/latest/test_redis_scenario.py:384
Failed test_redis_cache_server_link The error message is too long, please check the pipeline log for details. azure/cli/command_modules/redis/tests/latest/test_redis_scenario.py:504
Failed test_redis_cache_update The error message is too long, please check the pipeline log for details. azure/cli/command_modules/redis/tests/latest/test_redis_scenario.py:538
Failed test_redis_cache_update_channel The error message is too long, please check the pipeline log for details. azure/cli/command_modules/redis/tests/latest/test_redis_scenario.py:569
Failed test_redis_cache_with_mandatory_args The error message is too long, please check the pipeline log for details. azure/cli/command_modules/redis/tests/latest/test_redis_scenario.py:22
Failed test_redis_cache_with_redisversion The error message is too long, please check the pipeline log for details. azure/cli/command_modules/redis/tests/latest/test_redis_scenario.py:89
Failed test_redis_cache_with_tags_and_zones The error message is too long, please check the pipeline log for details. azure/cli/command_modules/redis/tests/latest/test_redis_scenario.py:41
Failed test_redis_cache_with_tlsversion_and_settings The error message is too long, please check the pipeline log for details. azure/cli/command_modules/redis/tests/latest/test_redis_scenario.py:65
🔄relay
🔄latest
🔄3.12
❌resource
❌2018-03-01-hybrid
❌3.9
Type Test Case Error Message Line
Failed test_cannotdelete_resource_group_lock The error message is too long, please check the pipeline log for details. azure/cli/command_modules/resource/tests/hybrid_2018_03_01/test_locks.py:53
Failed test_cannotdelete_resource_lock The error message is too long, please check the pipeline log for details. azure/cli/command_modules/resource/tests/hybrid_2018_03_01/test_locks.py:61
Failed test_generic_subscription_locks The error message is too long, please check the pipeline log for details. azure/cli/command_modules/resource/tests/hybrid_2018_03_01/test_locks.py:16
Failed test_group_lock_commands The error message is too long, please check the pipeline log for details. azure/cli/command_modules/resource/tests/hybrid_2018_03_01/test_locks.py:128
Failed test_lock_commands_with_ids The error message is too long, please check the pipeline log for details. azure/cli/command_modules/resource/tests/hybrid_2018_03_01/test_locks.py:221
Failed test_lock_with_resource_id The error message is too long, please check the pipeline log for details. azure/cli/command_modules/resource/tests/hybrid_2018_03_01/test_locks.py:265
Failed test_readonly_resource_group_lock The error message is too long, please check the pipeline log for details. azure/cli/command_modules/resource/tests/hybrid_2018_03_01/test_locks.py:49
Failed test_readonly_resource_lock The error message is too long, please check the pipeline log for details. azure/cli/command_modules/resource/tests/hybrid_2018_03_01/test_locks.py:57
Failed test_resource_lock_commands The error message is too long, please check the pipeline log for details. azure/cli/command_modules/resource/tests/hybrid_2018_03_01/test_locks.py:157
Failed test_subscription_locks The error message is too long, please check the pipeline log for details. azure/cli/command_modules/resource/tests/hybrid_2018_03_01/test_locks.py:192
Failed test_resource_group The error message is too long, please check the pipeline log for details. azure/cli/command_modules/resource/tests/hybrid_2018_03_01/test_resource.py:17
Failed test_resource_group_no_wait The error message is too long, please check the pipeline log for details. azure/cli/command_modules/resource/tests/hybrid_2018_03_01/test_resource.py:42
Failed test_resource_scenario The error message is too long, please check the pipeline log for details. azure/cli/command_modules/resource/tests/hybrid_2018_03_01/test_resource.py:61
Failed test_resource_id_scenario The error message is too long, please check the pipeline log for details. azure/cli/command_modules/resource/tests/hybrid_2018_03_01/test_resource.py:115
Failed test_resource_create_and_show The error message is too long, please check the pipeline log for details. azure/cli/command_modules/resource/tests/hybrid_2018_03_01/test_resource.py:153
Failed test_tag_scenario The error message is too long, please check the pipeline log for details. azure/cli/command_modules/resource/tests/hybrid_2018_03_01/test_resource.py:181
Failed test_provider_registration The error message is too long, please check the pipeline log for details. azure/cli/command_modules/resource/tests/hybrid_2018_03_01/test_resource.py:215
Failed test_provider_operation The error message is too long, please check the pipeline log for details. azure/cli/command_modules/resource/tests/hybrid_2018_03_01/test_resource.py:238
Failed test_group_deployment The error message is too long, please check the pipeline log for details. azure/cli/command_modules/resource/tests/hybrid_2018_03_01/test_resource.py:267
Failed test_group_deployment_lite The error message is too long, please check the pipeline log for details. azure/cli/command_modules/resource/tests/hybrid_2018_03_01/test_resource.py:252
Failed test_group_deployment_no_wait The error message is too long, please check the pipeline log for details. azure/cli/command_modules/resource/tests/hybrid_2018_03_01/test_resource.py:330
Failed test_resource_policy The error message is too long, please check the pipeline log for details. azure/cli/command_modules/resource/tests/hybrid_2018_03_01/test_resource.py:397
Failed test_group_deployment_crossrg The error message is too long, please check the pipeline log for details. azure/cli/command_modules/resource/tests/hybrid_2018_03_01/test_resource.py:484
🔄latest
🔄3.12
❌role
❌latest
❌3.12
Type Test Case Error Message Line
Failed test_create_for_rbac_use_cert_keyvault The error message is too long, please check the pipeline log for details. azure/cli/command_modules/role/tests/latest/test_role.py:100
Failed test_role_definition_scenario The error message is too long, please check the pipeline log for details. azure/cli/command_modules/role/tests/latest/test_role.py:200
Failed test_role_assignment_audits The error message is too long, please check the pipeline log for details. azure/cli/command_modules/role/tests/latest/test_role.py:607
Failed test_role_assignment_create_update The error message is too long, please check the pipeline log for details. azure/cli/command_modules/role/tests/latest/test_role.py:480
Failed test_role_assignment_create_using_principal_type The error message is too long, please check the pipeline log for details. azure/cli/command_modules/role/tests/latest/test_role.py:386
Failed test_role_assignment_scenario The error message is too long, please check the pipeline log for details. azure/cli/command_modules/role/tests/latest/test_role.py:263
Failed test_role_assignment_handle_conflicted_assignments The error message is too long, please check the pipeline log for details. azure/cli/command_modules/role/tests/latest/test_role.py:659
🔄search
🔄latest
🔄3.12
❌security
❌latest
❌3.12
Type Test Case Error Message Line
Failed test_adaptive_application_controls The error message is too long, please check the pipeline log for details. azure/cli/command_modules/security/tests/latest/test_adaptive_application_controls.py:11
Failed test_security_alerts The error message is too long, please check the pipeline log for details. azure/cli/command_modules/security/tests/latest/test_alerts_scenario.py:14
Failed test_security_alerts_suppression_rule The error message is too long, please check the pipeline log for details. azure/cli/command_modules/security/tests/latest/test_alerts_suppression_rules.py:12
Failed test_security_assessments The error message is too long, please check the pipeline log for details. azure/cli/command_modules/security/tests/latest/test_assessments_scenario.py:11
Failed test_security_cosmosdb_atp_settings The error message is too long, please check the pipeline log for details. azure/cli/command_modules/security/tests/latest/test_atp_scenario.py:15
Failed test_security_storage_atp_settings The error message is too long, please check the pipeline log for details. azure/cli/command_modules/security/tests/latest/test_atp_scenario.py:9
Failed test_security_auto_provisioning_setting The error message is too long, please check the pipeline log for details. azure/cli/command_modules/security/tests/latest/test_auto_provisioning_settings_scenario.py:11
Failed test_security_iot The error message is too long, please check the pipeline log for details. azure/cli/command_modules/security/tests/latest/test_iot_scenario.py:11
Failed test_security_locations The error message is too long, please check the pipeline log for details. azure/cli/command_modules/security/tests/latest/test_locations_scenario.py:11
Failed test_security_pricings The error message is too long, please check the pipeline log for details. azure/cli/command_modules/security/tests/latest/test_pricings_scenario.py:11
Failed test_security_compliance The error message is too long, please check the pipeline log for details. azure/cli/command_modules/security/tests/latest/test_regulatory_compliance_scenario.py:11
Failed test_security_secure_score The error message is too long, please check the pipeline log for details. azure/cli/command_modules/security/tests/latest/test_secure_score_scenario.py:11
Failed test_security_securitySolutionsReferenceData The error message is too long, please check the pipeline log for details. azure/cli/command_modules/security/tests/latest/test_securitySolutionsReferenceData.py:11
Failed test_security_automations The error message is too long, please check the pipeline log for details. azure/cli/command_modules/security/tests/latest/test_security_automations_scenario.py:13
Failed test_security_tasks The error message is too long, please check the pipeline log for details. azure/cli/command_modules/security/tests/latest/test_tasks_scenario.py:12
🔄servicebus
🔄latest
🔄3.12
❌serviceconnector
❌latest
❌3.12
Type Test Case Error Message Line
Failed test_kubernetes_cognitive_secret_e2e The error message is too long, please check the pipeline log for details. azure/cli/command_modules/serviceconnector/tests/latest/test_kubernetes_connection_scenario.py:399
Failed test_kubernetes_confluentkafka_e2e The error message is too long, please check the pipeline log for details. azure/cli/command_modules/serviceconnector/tests/latest/test_kubernetes_connection_scenario.py:233
Failed test_kubernetes_keyvault_e2e The error message is too long, please check the pipeline log for details. azure/cli/command_modules/serviceconnector/tests/latest/test_kubernetes_connection_scenario.py:30
Failed test_kubernetes_mysql_e2e The error message is too long, please check the pipeline log for details. azure/cli/command_modules/serviceconnector/tests/latest/test_kubernetes_connection_scenario.py:82
Failed test_kubernetes_servicebus_e2e The error message is too long, please check the pipeline log for details. azure/cli/command_modules/serviceconnector/tests/latest/test_kubernetes_connection_scenario.py:186
Failed test_kubernetes_storageblob_e2e The error message is too long, please check the pipeline log for details. azure/cli/command_modules/serviceconnector/tests/latest/test_kubernetes_connection_scenario.py:136
Failed test_webapp_aiservices_system_identity_e2e The error message is too long, please check the pipeline log for details. azure/cli/command_modules/serviceconnector/tests/latest/test_webpp_connection_scenario.py:1951
Failed test_webapp_app_insights_e2e The error message is too long, please check the pipeline log for details. azure/cli/command_modules/serviceconnector/tests/latest/test_webpp_connection_scenario.py:1534
Failed test_webapp_appconfig_e2e The error message is too long, please check the pipeline log for details. azure/cli/command_modules/serviceconnector/tests/latest/test_webpp_connection_scenario.py:83
Failed test_webapp_cognitive_services_system_identity_e2e The error message is too long, please check the pipeline log for details. azure/cli/command_modules/serviceconnector/tests/latest/test_webpp_connection_scenario.py:1997
Failed test_webapp_confluentkafka_e2e The error message is too long, please check the pipeline log for details. azure/cli/command_modules/serviceconnector/tests/latest/test_webpp_connection_scenario.py:1379
Failed test_webapp_cosmoscassandra_e2e The error message is too long, please check the pipeline log for details. azure/cli/command_modules/serviceconnector/tests/latest/test_webpp_connection_scenario.py:131
Failed test_webapp_cosmosgremlin_e2e The error message is too long, please check the pipeline log for details. azure/cli/command_modules/serviceconnector/tests/latest/test_webpp_connection_scenario.py:179
Failed test_webapp_cosmosmongo_e2e The error message is too long, please check the pipeline log for details. azure/cli/command_modules/serviceconnector/tests/latest/test_webpp_connection_scenario.py:228
Failed test_webapp_cosmossql_e2e The error message is too long, please check the pipeline log for details. azure/cli/command_modules/serviceconnector/tests/latest/test_webpp_connection_scenario.py:275
Failed test_webapp_cosmostable_e2e The error message is too long, please check the pipeline log for details. azure/cli/command_modules/serviceconnector/tests/latest/test_webpp_connection_scenario.py:323
Failed test_webapp_eventhub_e2e The error message is too long, please check the pipeline log for details. azure/cli/command_modules/serviceconnector/tests/latest/test_webpp_connection_scenario.py:371
Failed test_webapp_keyvault_e2e The error message is too long, please check the pipeline log for details. azure/cli/command_modules/serviceconnector/tests/latest/test_webpp_connection_scenario.py:559
Failed test_webapp_mysql_e2e The error message is too long, please check the pipeline log for details. azure/cli/command_modules/serviceconnector/tests/latest/test_webpp_connection_scenario.py:756
Failed test_webapp_mysqlflexible_e2e The error message is too long, please check the pipeline log for details. azure/cli/command_modules/serviceconnector/tests/latest/test_webpp_connection_scenario.py:809
Failed test_webapp_openai_secret_e2e The error message is too long, please check the pipeline log for details. azure/cli/command_modules/serviceconnector/tests/latest/test_webpp_connection_scenario.py:1854
Failed test_webapp_openai_system_identity_e2e The error message is too long, please check the pipeline log for details. azure/cli/command_modules/serviceconnector/tests/latest/test_webpp_connection_scenario.py:1900
Failed test_webapp_postgres_e2e The error message is too long, please check the pipeline log for details. azure/cli/command_modules/serviceconnector/tests/latest/test_webpp_connection_scenario.py:864
Failed test_webapp_postgresflexible_e2e The error message is too long, please check the pipeline log for details. azure/cli/command_modules/serviceconnector/tests/latest/test_webpp_connection_scenario.py:606
Failed test_webapp_redis_e2e The error message is too long, please check the pipeline log for details. azure/cli/command_modules/serviceconnector/tests/latest/test_webpp_connection_scenario.py:660
Failed test_webapp_redisenterprise_e2e The error message is too long, please check the pipeline log for details. azure/cli/command_modules/serviceconnector/tests/latest/test_webpp_connection_scenario.py:708
Failed test_webapp_servicebus_e2e The error message is too long, please check the pipeline log for details. azure/cli/command_modules/serviceconnector/tests/latest/test_webpp_connection_scenario.py:418
Failed test_webapp_signalr_e2e The error message is too long, please check the pipeline log for details. azure/cli/command_modules/serviceconnector/tests/latest/test_webpp_connection_scenario.py:465
Failed test_webapp_sql_connection_string The error message is too long, please check the pipeline log for details. azure/cli/command_modules/serviceconnector/tests/latest/test_webpp_connection_scenario.py:972
Failed test_webapp_sql_e2e The error message is too long, please check the pipeline log for details. azure/cli/command_modules/serviceconnector/tests/latest/test_webpp_connection_scenario.py:918
Failed test_webapp_storage_blob_null_auth The error message is too long, please check the pipeline log for details. azure/cli/command_modules/serviceconnector/tests/latest/test_webpp_connection_scenario.py:1791
Failed test_webapp_storage_blob_system_identity_opt_out_auth The error message is too long, please check the pipeline log for details. azure/cli/command_modules/serviceconnector/tests/latest/test_webpp_connection_scenario.py:1734
Failed test_webapp_storageblob_e2e The error message is too long, please check the pipeline log for details. azure/cli/command_modules/serviceconnector/tests/latest/test_webpp_connection_scenario.py:1017
Failed test_webapp_storageblob_secret_opt_out_config The error message is too long, please check the pipeline log for details. azure/cli/command_modules/serviceconnector/tests/latest/test_webpp_connection_scenario.py:1588
Failed test_webapp_storageblob_secret_opt_out_public_network The error message is too long, please check the pipeline log for details. azure/cli/command_modules/serviceconnector/tests/latest/test_webpp_connection_scenario.py:1584
Failed test_webapp_storageblob_secret_opt_out_public_network_and_config The error message is too long, please check the pipeline log for details. azure/cli/command_modules/serviceconnector/tests/latest/test_webpp_connection_scenario.py:1580
Failed test_webapp_storagefile_e2e The error message is too long, please check the pipeline log for details. azure/cli/command_modules/serviceconnector/tests/latest/test_webpp_connection_scenario.py:1285
Failed test_webapp_storagequeue_e2e The error message is too long, please check the pipeline log for details. azure/cli/command_modules/serviceconnector/tests/latest/test_webpp_connection_scenario.py:1238
Failed test_webapp_storagetable_e2e The error message is too long, please check the pipeline log for details. azure/cli/command_modules/serviceconnector/tests/latest/test_webpp_connection_scenario.py:1332
Failed test_webapp_webpubsub_e2e The error message is too long, please check the pipeline log for details. azure/cli/command_modules/serviceconnector/tests/latest/test_webpp_connection_scenario.py:512
Failed test_webappslot_storageblob_e2e The error message is too long, please check the pipeline log for details. azure/cli/command_modules/serviceconnector/tests/latest/test_webpp_connection_scenario.py:1486
🔄servicefabric
🔄latest
🔄3.12
🔄signalr
🔄latest
🔄3.12
🔄sql
🔄latest
🔄3.12
🔄sqlvm
🔄latest
🔄3.12
❌storage
❌2018-03-01-hybrid
❌3.9
Type Test Case Error Message Line
Failed test_create_storage_account The error message is too long, please check the pipeline log for details. azure/cli/command_modules/storage/tests/hybrid_2018_03_01/test_storage_account_scenarios.py:11
Failed test_show_usage The error message is too long, please check the pipeline log for details. azure/cli/command_modules/storage/tests/hybrid_2018_03_01/test_storage_account_scenarios.py:58
Failed test_storage_create_default_kind The error message is too long, please check the pipeline log for details. azure/cli/command_modules/storage/tests/hybrid_2018_03_01/test_storage_account_scenarios.py:51
Failed test_storage_create_default_sku The error message is too long, please check the pipeline log for details. azure/cli/command_modules/storage/tests/hybrid_2018_03_01/test_storage_account_scenarios.py:45
🔄latest
🔄3.12
🔄synapse
🔄latest
🔄3.12
🔄telemetry
️✔️2018-03-01-hybrid
️✔️3.9
🔄latest
🔄3.12
🔄util
🔄latest
🔄3.12
❌vm
❌2018-03-01-hybrid
❌3.9
Type Test Case Error Message Line
Failed test_vm_show_list_sizes_list_ip_addresses self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f7fdca0f6a0>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f7fe42b0df0>
command = 'vm show --resource-group cli_test_vm_list_ip000001 --name vm-with-public-ip -d'
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:129: in exception_handler
    return handle_exception(ex)
                                        

ex = NameError("name 'obj' is not defined"), 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 NameError 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 = <hybrid_2018_03_01.test_vm_commands.VMShowListSizesListIPAddressesScenarioTest testMethod=test_vm_show_list_sizes_list_ip_addresses>
resource_group = 'cli_test_vm_list_ip000001'

    @ResourceGroupPreparer(name_prefix='cli_test_vm_list_ip')
    @AllowLargeResponse(size_kb=99999)
    def test_vm_show_list_sizes_list_ip_addresses(self, resource_group):
    
        self.kwargs.update({
            'loc': 'centralus',
            'vm': 'vm-with-public-ip',
            'allocation': 'static',
            'zone': 2
        })
        # Expecting no results at the beginning
        self.cmd('vm list-ip-addresses --resource-group {rg}', checks=self.is_empty())
        self.cmd('vm create --resource-group {rg} --location {loc} -n {vm} --admin-username ubuntu --image Canonical:UbuntuServer:14.04.4-LTS:latest'
                 ' --admin-password testPassword0 --public-ip-address-allocation {allocation} --authentication-type password --zone {zone} --nsg-rule NONE')
>       result = self.cmd('vm show --resource-group {rg} --name {vm} -d', checks=[
            self.check('type(@)', 'object'),
            self.check('name', '{vm}'),
            self.check('location', '{loc}'),
            self.check('resourceGroup', '{rg}')
        ]).get_output_in_json()

src/azure-cli/azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:116: 
 
                                       
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:674: in execute
    raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:745: in run_jobs_serially
    results.append(self.run_job(expanded_arg, cmd_copy))
 
 
 
                                     

self = <azure.cli.core.commands.AzCliCommandInvoker object at 0x7f7fdca0f550>
expanded_arg = Namespace(_log_verbosity_verbose=False, _log_verbosity_debug=False, _log_verbosity_only_show_errors=False, _output_for...usage=None, description='', formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True))
cmd_copy = <azure.cli.core.commands.AzCliCommand object at 0x7f7fdc8da4f0>

    def _run_job(self, expanded_arg, cmd_copy):
        params = self._filter_params(expanded_arg)
        try:
            result = cmd_copy(params)
            if cmd_copy.supports_no_wait and getattr(expanded_arg, 'no_wait', False):
                result = None
            elif cmd_copy.no_wait_param and getattr(expanded_arg, cmd_copy.no_wait_param, False):
                result = None
    
            transform_op = cmd_copy.command_kwargs.get('transform', None)
            if transform_op:
                result = transform_op(result)
    
            if _is_poller(result):
                result = LongRunningOperation(cmd_copy.cli_ctx, 'Starting {}'.format(cmd_copy.name))(result)
            elif _is_paged(result):
                result = list(result)
    
            # This is added for new models from typespec generated SDKs
            # These models store data in __dict__['_data'] instead of in __dict__
>           if result and hasattr(result, 'as_dict') and not hasattr(obj, '_attribute_map'):
E           NameError: name 'obj' is not defined

src/azure-cli-core/azure/cli/core/commands/init.py:728: NameError
azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:101
Failed test_vm_image_show self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f7fdeba1430>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f7fe41f66d0>
command = 'vm image show --location westus --publisher Canonical --offer UbuntuServer --sku 14.04.2-LTS --version 14.04.201503090'
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:129: in exception_handler
    return handle_exception(ex)
                                        

ex = NameError("name 'obj' is not defined"), 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 NameError 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 = <hybrid_2018_03_01.test_vm_commands.VMImageShowScenarioTest testMethod=test_vm_image_show>

    def test_vm_image_show(self):
    
        self.kwargs.update({
            'loc': 'westus',
            'pub': 'Canonical',
            'offer': 'UbuntuServer',
            'sku': '14.04.2-LTS',
            'ver': '14.04.201503090'
        })
    
>       self.cmd('vm image show --location {loc} --publisher {pub} --offer {offer} --sku {sku} --version {ver}', checks=[
            self.check('type(@)', 'object'),
            self.check('location', '{loc}'),
            self.check('name', '{ver}'),
            self.check("contains(id, '/Publishers/{pub}/ArtifactTypes/VMImage/Offers/{offer}/Skus/{sku}/Versions/{ver}')", True)
        ])

src/azure-cli/azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:210: 
 
                                       
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:674: in execute
    raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:745: in run_jobs_serially
    results.append(self.run_job(expanded_arg, cmd_copy))
 
 
 
                                     

self = <azure.cli.core.commands.AzCliCommandInvoker object at 0x7f7fdeba13a0>
expanded_arg = Namespace(_log_verbosity_verbose=False, _log_verbosity_debug=False, _log_verbosity_only_show_errors=False, _output_for...usage=None, description='', formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True))
cmd_copy = <azure.cli.core.commands.AzCliCommand object at 0x7f7fdd0dba00>

    def _run_job(self, expanded_arg, cmd_copy):
        params = self._filter_params(expanded_arg)
        try:
            result = cmd_copy(params)
            if cmd_copy.supports_no_wait and getattr(expanded_arg, 'no_wait', False):
                result = None
            elif cmd_copy.no_wait_param and getattr(expanded_arg, cmd_copy.no_wait_param, False):
                result = None
    
            transform_op = cmd_copy.command_kwargs.get('transform', None)
            if transform_op:
                result = transform_op(result)
    
            if _is_poller(result):
                result = LongRunningOperation(cmd_copy.cli_ctx, 'Starting {}'.format(cmd_copy.name))(result)
            elif _is_paged(result):
                result = list(result)
    
            # This is added for new models from typespec generated SDKs
            # These models store data in __dict__['_data'] instead of in __dict__
>           if result and hasattr(result, 'as_dict') and not hasattr(obj, '_attribute_map'):
E           NameError: name 'obj' is not defined

src/azure-cli-core/azure/cli/core/commands/init.py:728: NameError
azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:199
Failed test_vm_generalize self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f7fdeaf6c10>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f7fe42b0940>
command = 'vm stop -g cli_test_generalize_vm000001 -n vm-generalize'
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:129: in exception_handler
    return handle_exception(ex)
                                        

ex = NameError("name 'obj' is not defined"), 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 NameError 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 = <hybrid_2018_03_01.test_vm_commands.VMGeneralizeScenarioTest testMethod=test_vm_generalize>
resource_group = 'cli_test_generalize_vm000001'

    @ResourceGroupPreparer(name_prefix='cli_test_generalize_vm')
    def test_vm_generalize(self, resource_group):
    
        self.kwargs.update({
            'vm': 'vm-generalize'
        })
    
        self.cmd('vm create -g {rg} -n {vm} --admin-username ubuntu --image Canonical:UbuntuServer:18.04-LTS:latest --admin-password testPassword0 --authentication-type password --use-unmanaged-disk')
>       self.cmd('vm stop -g {rg} -n {vm}')

src/azure-cli/azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:228: 
 
                                       
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:674: in execute
    raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:745: in run_jobs_serially
    results.append(self.run_job(expanded_arg, cmd_copy))
 
 
 
                                     

self = <azure.cli.core.commands.AzCliCommandInvoker object at 0x7f7fdea9df10>
expanded_arg = Namespace(_log_verbosity_verbose=False, _log_verbosity_debug=False, _log_verbosity_only_show_errors=False, _output_for...atter'>, conflict_handler='error', add_help=True), cmd=<azure.cli.core.commands.AzCliCommand object at 0x7f7fdc92c580>)
cmd_copy = <azure.cli.core.commands.AzCliCommand object at 0x7f7fdc92c580>

    def _run_job(self, expanded_arg, cmd_copy):
        params = self._filter_params(expanded_arg)
        try:
            result = cmd_copy(params)
            if cmd_copy.supports_no_wait and getattr(expanded_arg, 'no_wait', False):
                result = None
            elif cmd_copy.no_wait_param and getattr(expanded_arg, cmd_copy.no_wait_param, False):
                result = None
    
            transform_op = cmd_copy.command_kwargs.get('transform', None)
            if transform_op:
                result = transform_op(result)
    
            if _is_poller(result):
                result = LongRunningOperation(cmd_copy.cli_ctx, 'Starting {}'.format(cmd_copy.name))(result)
            elif _is_paged(result):
                result = list(result)
    
            # This is added for new models from typespec generated SDKs
            # These models store data in __dict__['_data'] instead of in __dict__
>           if result and hasattr(result, 'as_dict') and not hasattr(obj, '_attribute_map'):
E           NameError: name 'obj' is not defined

src/azure-cli-core/azure/cli/core/commands/init.py:728: NameError
azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:219
Failed test_vm_vmss_windows_license_type self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f7fdea9df10>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f7fe41aa400>
command = 'vm show -g cli_test_windows_license_type000001 -n winvm'
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:129: in exception_handler
    return handle_exception(ex)
                                        

ex = NameError("name 'obj' is not defined"), 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 NameError 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 = <hybrid_2018_03_01.test_vm_commands.VMVMSSWindowsLicenseTest testMethod=test_vm_vmss_windows_license_type>
resource_group = 'cli_test_windows_license_type000001'

    @ResourceGroupPreparer(name_prefix='cli_test_windows_license_type')
    def test_vm_vmss_windows_license_type(self, resource_group):
    
        self.kwargs.update({
            'vm': 'winvm',
            'vmss': 'winvmss'
        })
        self.cmd('vm create -g {rg} -n {vm} --image Win2012R2Datacenter --admin-username clitest1234 --admin-password Test123456789# --license-type Windows_Server')
>       self.cmd('vm show -g {rg} -n {vm}', checks=[
            self.check('licenseType', 'Windows_Server')
        ])

src/azure-cli/azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:264: 
 
                                       
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:674: in execute
    raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:745: in run_jobs_serially
    results.append(self.run_job(expanded_arg, cmd_copy))
 
 
 
                                     

self = <azure.cli.core.commands.AzCliCommandInvoker object at 0x7f7fdca67f40>
expanded_arg = Namespace(_log_verbosity_verbose=False, _log_verbosity_debug=False, _log_verbosity_only_show_errors=False, _output_for...usage=None, description='', formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True))
cmd_copy = <azure.cli.core.commands.AzCliCommand object at 0x7f7fdc940070>

    def _run_job(self, expanded_arg, cmd_copy):
        params = self._filter_params(expanded_arg)
        try:
            result = cmd_copy(params)
            if cmd_copy.supports_no_wait and getattr(expanded_arg, 'no_wait', False):
                result = None
            elif cmd_copy.no_wait_param and getattr(expanded_arg, cmd_copy.no_wait_param, False):
                result = None
    
            transform_op = cmd_copy.command_kwargs.get('transform', None)
            if transform_op:
                result = transform_op(result)
    
            if _is_poller(result):
                result = LongRunningOperation(cmd_copy.cli_ctx, 'Starting {}'.format(cmd_copy.name))(result)
            elif _is_paged(result):
                result = list(result)
    
            # This is added for new models from typespec generated SDKs
            # These models store data in __dict__['_data'] instead of in __dict__
>           if result and hasattr(result, 'as_dict') and not hasattr(obj, '_attribute_map'):
E           NameError: name 'obj' is not defined

src/azure-cli-core/azure/cli/core/commands/init.py:728: NameError
azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:255
Failed test_custom_image self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f7fde8902b0>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f7fe4150670>
command = 'vm run-command invoke -g cli_test_vm_custom_image000001 -n vm-unmanaged-disk --command-id RunShellScript --scripts "echo 'sudo waagent -deprovision+user --force' 
 at -M now + 1 minutes"'
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:129: in exception_handler
    return handle_exception(ex)
                                       _ 

ex = NameError("name 'obj' is not defined"), 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 NameError 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 = <hybrid_2018_03_01.test_vm_commands.VMCustomImageTest testMethod=test_custom_image>
resource_group = 'cli_test_vm_custom_image000001'

    @ResourceGroupPreparer(name_prefix='cli_test_vm_custom_image')
    def test_custom_image(self, resource_group):
        self.kwargs.update({
            'vm1': 'vm-unmanaged-disk',
            'vm2': 'vm-managed-disk',
            'newvm1': 'fromimage1',
            'newvm2': 'fromimage2',
            'image1': 'img-from-unmanaged',
            'image2': 'img-from-managed',
        })
    
        self.cmd('vm create -g {rg} -n {vm1} --image Canonical:UbuntuServer:18.04-LTS:latest --use-unmanaged-disk --admin-username sdk-test-admin --admin-password testPassword0')
        # deprovision the VM, but we have to do it async to avoid hanging the run-command itself
>       self.cmd('vm run-command invoke -g {rg} -n {vm1} --command-id RunShellScript --scripts "echo 'sudo waagent -deprovision+user --force' 
Failed test_vm_custom_image_management The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:342
Failed test_vm_create_from_unmanaged_disk The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:408
Failed test_vm_create_with_specialized_unmanaged_disk The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:437
Failed test_vm_create_with_unmanaged_data_disks The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:455
Failed test_vm_create_by_attach_os_and_data_disks The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:489
Failed test_vm_create_by_attach_unmanaged_os_and_data_disks The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:522
Failed test_set_os_disk_size The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:542
Failed test_managed_disk The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:559
Failed test_vm_create_state_modifications The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:630
Failed test_vm_create_no_wait The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:706
Failed test_vm_availset The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:730
Failed test_vm_availset_convert The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:768
Failed test_vm_extension The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:793
Failed test_vm_create_ubuntu The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:870
Failed test_vm_create_multi_nics The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:901
Failed test_vm_create_none_options The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:951
Failed test_vm_boot_diagnostics The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:973
Failed test_vmss_extension The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:1009
Failed test_diagnostics_extension_install The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:1037
Failed test_vm_create_existing_options The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:1097
Failed test_vm_create_existing_ids_options The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:1133
Failed test_vm_disk_attach_detach The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:1216
Failed test_vm_data_unmanaged_disk The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:1257
Failed test_vm_create_custom_data The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:1306
Failed test_vmss_create_and_modify The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:1331
Failed test_vmss_create_options The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:1398
Failed test_vmss_create_default_app_gateway The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:1478
Failed test_vmss_create_none_options The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:1446
Failed test_vmss_create_with_app_gateway The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:1464
Failed test_vmss_single_placement_group_default_to_std_lb The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:1498
Failed test_vmss_public_ip_per_vm_custom_domain_name The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:1518
Failed test_vmss_accelerated_networking The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:1544
Failed test_vm_create_linux_secrets The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:1565
Failed test_vm_create_windows_secrets The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:1598
Failed test_vmss_create_linux_secrets The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:1634
Failed test_vmss_create_existing_options The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:1666
Failed test_vmss_create_existing_ids_options The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:1698
Failed test_vmss_vms The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:1747
Failed test_vmss_create_custom_data The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:1787
Failed test_disk_create_zones The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:1923
Failed test_run_command_e2e The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:1947
Failed test_run_command_with_parameters The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:1966
Failed test_vmss_rolling_upgrade The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:1992
Failed test_vm_lb_integration The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:2043
Failed test_vm_create_existing_nic The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:2091
Failed test_vm_convert The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:2145
Failed test_vm_stop_start The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:2179
Failed test_snapshot_access The error message is too long, please check the pipeline log for details. azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:2195
🔄latest
🔄3.12

@evelyn-ys evelyn-ys marked this pull request as draft November 14, 2024 01:42
Copy link

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

️✔️AzureCLI-BreakingChangeTest
️✔️Non Breaking Changes

@yonzhan
Copy link
Collaborator

yonzhan commented Nov 14, 2024

Thank you for your contribution! We will review the pull request and get back to you soon.

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 Core CLI core infrastructure
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants