Skip to content

[storage] typespec migration#33545

Draft
l0lawrence wants to merge 1 commit into
Azure:devfrom
l0lawrence:updatetsp
Draft

[storage] typespec migration#33545
l0lawrence wants to merge 1 commit into
Azure:devfrom
l0lawrence:updatetsp

Conversation

@l0lawrence

Copy link
Copy Markdown
Member

Related command

Description

Python storage sdks migrating to typespec

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.

@azure-client-tools-bot-prd

azure-client-tools-bot-prd Bot commented Jun 12, 2026

Copy link
Copy Markdown
❌AzureCLI-FullTest
️✔️acr
️✔️latest
️✔️3.12
️✔️3.14
️✔️acs
️✔️latest
️✔️3.12
️✔️3.14
️✔️advisor
️✔️latest
️✔️3.12
️✔️3.14
️✔️ams
️✔️latest
️✔️3.12
️✔️3.14
️✔️apim
️✔️latest
️✔️3.12
️✔️3.14
️✔️appconfig
️✔️latest
️✔️3.12
️✔️3.14
️✔️appservice
️✔️latest
️✔️3.12
️✔️3.14
️✔️aro
️✔️latest
️✔️3.12
️✔️3.14
️✔️backup
️✔️latest
️✔️3.12
️✔️3.14
️✔️batch
️✔️latest
️✔️3.12
️✔️3.14
️✔️batchai
️✔️latest
️✔️3.12
️✔️3.14
️✔️billing
️✔️latest
️✔️3.12
️✔️3.14
️✔️botservice
️✔️latest
️✔️3.12
️✔️3.14
️✔️cloud
️✔️latest
️✔️3.12
️✔️3.14
️✔️cognitiveservices
️✔️latest
️✔️3.12
️✔️3.14
️✔️compute_recommender
️✔️latest
️✔️3.12
️✔️3.14
️✔️computefleet
️✔️latest
️✔️3.12
️✔️3.14
️✔️config
️✔️latest
️✔️3.12
️✔️3.14
️✔️configure
️✔️latest
️✔️3.12
️✔️3.14
️✔️consumption
️✔️latest
️✔️3.12
️✔️3.14
️✔️container
️✔️latest
️✔️3.12
️✔️3.14
️✔️containerapp
️✔️latest
️✔️3.12
️✔️3.14
️✔️core
️✔️latest
️✔️3.12
️✔️3.14
️✔️cosmosdb
️✔️latest
️✔️3.12
️✔️3.14
️✔️databoxedge
️✔️latest
️✔️3.12
️✔️3.14
️✔️dls
️✔️latest
️✔️3.12
️✔️3.14
️✔️dms
️✔️latest
️✔️3.12
️✔️3.14
️✔️eventgrid
️✔️latest
️✔️3.12
️✔️3.14
️✔️eventhubs
️✔️latest
️✔️3.12
️✔️3.14
️✔️feedback
️✔️latest
️✔️3.12
️✔️3.14
️✔️find
️✔️latest
️✔️3.12
️✔️3.14
️✔️hdinsight
️✔️latest
️✔️3.12
️✔️3.14
️✔️identity
️✔️latest
️✔️3.12
️✔️3.14
️✔️iot
️✔️latest
️✔️3.12
️✔️3.14
️✔️keyvault
️✔️latest
️✔️3.12
️✔️3.14
️✔️lab
️✔️latest
️✔️3.12
️✔️3.14
️✔️managedservices
️✔️latest
️✔️3.12
️✔️3.14
️✔️maps
️✔️latest
️✔️3.12
️✔️3.14
️✔️marketplaceordering
️✔️latest
️✔️3.12
️✔️3.14
️✔️monitor
️✔️latest
️✔️3.12
️✔️3.14
️✔️mysql
️✔️latest
️✔️3.12
️✔️3.14
️✔️netappfiles
️✔️latest
️✔️3.12
️✔️3.14
️✔️network
️✔️latest
️✔️3.12
️✔️3.14
️✔️policyinsights
️✔️latest
️✔️3.12
️✔️3.14
️✔️postgresql
️✔️latest
️✔️3.12
️✔️3.14
️✔️privatedns
️✔️latest
️✔️3.12
️✔️3.14
️✔️profile
️✔️latest
️✔️3.12
️✔️3.14
️✔️rdbms
️✔️latest
️✔️3.12
️✔️3.14
️✔️redis
️✔️latest
️✔️3.12
️✔️3.14
️✔️relay
️✔️latest
️✔️3.12
️✔️3.14
️✔️resource
️✔️latest
️✔️3.12
️✔️3.14
️✔️role
️✔️latest
️✔️3.12
️✔️3.14
️✔️search
️✔️latest
️✔️3.12
️✔️3.14
️✔️security
️✔️latest
️✔️3.12
️✔️3.14
️✔️servicebus
️✔️latest
️✔️3.12
️✔️3.14
️✔️serviceconnector
️✔️latest
️✔️3.12
️✔️3.14
️✔️servicefabric
️✔️latest
️✔️3.12
️✔️3.14
️✔️signalr
️✔️latest
️✔️3.12
️✔️3.14
️✔️sql
️✔️latest
️✔️3.12
️✔️3.14
️✔️sqlvm
️✔️latest
️✔️3.12
️✔️3.14
❌storage
❌latest
❌3.12
Type Test Case Error Message Line
Failed test_storage_blob_batch_upload_scenarios self = <azure.cli.core.commands.AzCliCommandInvoker object at 0x7f006364de20>
parsed_ns = 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 0x7f0061bdf3b0>)

    def validation(self, parsed_ns):
        try:
            cmd_validator = getattr(parsed_ns, 'command_validator', None)
            if cmd_validator:
                self.validate_cmd_level(parsed_ns, cmd_validator)
            else:
>               self.validate_arg_level(parsed_ns)

env/lib/python3.12/site-packages/knack/invocation.py:113: 
 
 
 
 
 
 
 
                                 
src/azure-cli-core/azure/cli/core/commands/init.py:1011: in validate_arg_level
    validator(**self.build_kwargs(validator, ns))
 
                                       

namespace = 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 0x7f0061bdf3b0>)

    def validator(namespace):
        if namespace.include:
            if set(namespace.include) - set(allowed_string):
                help_string = get_include_help_string(include_class)
>               raise ValueError(
                    'valid values are {} or a combination thereof.'.format(help_string))
E               ValueError: valid values are  or a combination thereof.

src/azure-cli/azure/cli/command_modules/storage/validators.py:795: ValueError

During handling of the above exception, another exception occurred:

self = <azure.cli.command_modules.storage.tests.latest.test_storage_batch_operations.StorageBatchOperationScenarios testMethod=test_storage_blob_batch_upload_scenarios>
test_dir = '/tmp/test5hr5to6ruymu2gtprvds'
storage_account_info = ('clitest000002', 'veryFakedStorageAccountKey==')

    @ResourceGroupPreparer()
    @StorageAccountPreparer(kind='StorageV2')
    @StorageTestFilesPreparer()
    def test_storage_blob_batch_upload_scenarios(self, test_dir, storage_account_info):
        # upload files without pattern
        container = 'container1'
        self.storage_cmd('storage container create -n {}', storage_account_info, container)
        self.storage_cmd('storage blob upload-batch -s "{}" -d {} --max-connections 3', storage_account_info,
                         test_dir, container)
        self.storage_cmd('storage blob list -c {}', storage_account_info, container).assert_with_checks(
            JMESPathCheck('length(@)', 41))
    
        self.storage_cmd('storage blob upload-batch -s "{}" -d {} --content-md 123 --max-connections 3 --overwrite', storage_account_info,
                         test_dir, container)
        self.storage_cmd('storage blob list -c {}', storage_account_info, container).assert_with_checks(
            JMESPathCheck('length(@)', 41))
    
        # test upload-batch with tags
        self.storage_cmd('storage blob upload-batch -s "{}" -d {} --overwrite --tags key1=val1 key2=val2',
                         storage_account_info, test_dir, container)
>       result = self.storage_cmd('storage blob list -c {} --prefix apple --include t',
                                  storage_account_info, container).get_output_in_json()

src/azure-cli/azure/cli/command_modules/storage/tests/latest/test_storage_batch_operations.py:111: 
 
 
 
 
                                    
src/azure-cli/azure/cli/command_modules/storage/tests/storage_test_util.py:52: in storage_cmd
    return self.cmd(cmd)
           ^^^^^^^^^^^^^
src/azure-cli-testsdk/azure/cli/testsdk/base.py:177: 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:252: in init
    self.in_process_execute(cli_ctx, command, expect_failure=expect_failure)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:303: in in_process_execute
    self.exit_code = cli_ctx.invoke(shlex.split(command), out_file=stdout_buf) or 0
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/knack/cli.py:250: in invoke
    raise ex
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:665: in execute
    self.validation(expanded_arg)
env/lib/python3.12/site-packages/knack/invocation.py:118: in validation
    getattr(parsed_ns, 'parser', self.parser).validation_error(str(err))
src/azure-cli-core/azure/cli/core/parser.py:150: in validation_error
    self.exit(2)
 
 
 
 
 
                                   

self = AzCliCommandParser(prog='az storage blob list', usage=None, description='', formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
status = 2, message = None

    def exit(self, status=0, message=None):
        if message:
            self._print_message(message, _sys.stderr)
>       _sys.exit(status)
E       SystemExit: 2

/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:2637: SystemExit
azure/cli/command_modules/storage/tests/latest/test_storage_batch_operations.py:90
Failed test_storage_blob_soft_delete self = <azure.cli.core.commands.AzCliCommandInvoker object at 0x7f0062093b90>
parsed_ns = 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 0x7f00626eeff0>)

    def validation(self, parsed_ns):
        try:
            cmd_validator = getattr(parsed_ns, 'command_validator', None)
            if cmd_validator:
                self.validate_cmd_level(parsed_ns, cmd_validator)
            else:
>               self.validate_arg_level(parsed_ns)

env/lib/python3.12/site-packages/knack/invocation.py:113: 
 
 
 
 
 
 
 
                                 
src/azure-cli-core/azure/cli/core/commands/init.py:1011: in validate_arg_level
    validator(**self.build_kwargs(validator, ns))
 
                                       

namespace = 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 0x7f00626eeff0>)

    def validator(namespace):
        if namespace.include:
            if set(namespace.include) - set(allowed_string):
                help_string = get_include_help_string(include_class)
>               raise ValueError(
                    'valid values are {} or a combination thereof.'.format(help_string))
E               ValueError: valid values are  or a combination thereof.

src/azure-cli/azure/cli/command_modules/storage/validators.py:795: ValueError

During handling of the above exception, another exception occurred:

self = <azure.cli.command_modules.storage.tests.latest.test_storage_blob_scenarios.StorageBlobUploadTests testMethod=test_storage_blob_soft_delete>
resource_group = 'clitest.rg000001'
storage_account_info = ('clitest000002', 'veryFakedStorageAccountKey==')

    @ResourceGroupPreparer()
    @StorageAccountPreparer(kind='StorageV2')
    def test_storage_blob_soft_delete(self, resource_group, storage_account_info):
        container = self.create_container(storage_account_info)
        import time
    
        # create a blob
        local_file = self.create_temp_file(1)
        blob_name = self.create_random_name(prefix='blob', length=24)
    
        self.storage_cmd('storage blob upload -c {} -f "{}" -n {} --type block', storage_account_info,
                         container, local_file, blob_name)
        self.assertEqual(len(self.storage_cmd('storage blob list -c {}',
                                              storage_account_info, container).get_output_in_json()), 1)
    
        # set delete-policy to enable soft-delete
        self.storage_cmd('storage blob service-properties delete-policy update --enable true --days-retained 2',
                         storage_account_info)
        self.storage_cmd('storage blob service-properties delete-policy show',
                         storage_account_info).assert_with_checks(JMESPathCheck('enabled', True),
                                                                  JMESPathCheck('days', 2))
        if self.is_live:
            time.sleep(10)
        # soft-delete and check
        self.storage_cmd('storage blob delete -c {} -n {}', storage_account_info, container, blob_name)
        self.assertEqual(len(self.storage_cmd('storage blob list -c {}',
                                              storage_account_info, container).get_output_in_json()), 0)
    
        if self.is_live:
            time.sleep(30)
>       self.assertEqual(len(self.storage_cmd('storage blob list -c {} --include d',
                                              storage_account_info, container).get_output_in_json()), 1)

src/azure-cli/azure/cli/command_modules/storage/tests/latest/test_storage_blob_scenarios.py:412: 
 
 
 
 
                                    
src/azure-cli/azure/cli/command_modules/storage/tests/storage_test_util.py:52: in storage_cmd
    return self.cmd(cmd)
           ^^^^^^^^^^^^^
src/azure-cli-testsdk/azure/cli/testsdk/base.py:177: 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:252: in init
    self.in_process_execute(cli_ctx, command, expect_failure=expect_failure)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:303: in in_process_execute
    self.exit_code = cli_ctx.invoke(shlex.split(command), out_file=stdout_buf) or 0
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/knack/cli.py:250: in invoke
    raise ex
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:665: in execute
    self.validation(expanded_arg)
env/lib/python3.12/site-packages/knack/invocation.py:118: in validation
    getattr(parsed_ns, 'parser', self.parser).validation_error(str(err))
src/azure-cli-core/azure/cli/core/parser.py:150: in validation_error
    self.exit(2)
 
 
 
 
 
                                   

self = AzCliCommandParser(prog='az storage blob list', usage=None, description='', formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
status = 2, message = None

    def exit(self, status=0, message=None):
        if message:
            self._print_message(message, _sys.stderr)
>       _sys.exit(status)
E       SystemExit: 2

/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:2637: SystemExit
azure/cli/command_modules/storage/tests/latest/test_storage_blob_scenarios.py:381
Failed test_storage_page_blob_set_tier cmd = <azure.cli.core.commands.AzCliCommand object at 0x7f006268cfe0>
namespace = Namespace(log_verbosity_verbose=False, log_verbosity_debug=False, log_verbosity_only_show_errors=False, output_for...nt_encoding': None, 'content_language': None, 'content_md5': None, 'content_disposition': None, 'cache_control': None})

    def page_blob_tier_validator_track2(cmd, namespace):
        if not namespace.tier:
            return
    
        if namespace.blob_type != 'page' and namespace.tier:
            raise ValueError('Blob tier is only applicable to page blobs on premium storage accounts.')
    
        try:
>           namespace.premium_page_blob_tier = getattr(cmd.get_models(
                'generated.models.enums#PremiumPageBlobAccessTier'), namespace.tier)
E               AttributeError: 'NoneType' object has no attribute 'P10'

src/azure-cli/azure/cli/command_modules/storage/validators.py:1402: AttributeError

During handling of the above exception, another exception occurred:

self = <azure.cli.core.commands.AzCliCommandInvoker object at 0x7f00629f76b0>
parsed_ns = Namespace(log_verbosity_verbose=False, log_verbosity_debug=False, log_verbosity_only_show_errors=False, output_for...nt_encoding': None, 'content_language': None, 'content_md5': None, 'content_disposition': None, 'cache_control': None})

    def validation(self, parsed_ns):
        try:
            cmd_validator = getattr(parsed_ns, 'command_validator', None)
            if cmd_validator:
                self.validate_cmd_level(parsed_ns, cmd_validator)
            else:
>               self.validate_arg_level(parsed_ns)

env/lib/python3.12/site-packages/knack/invocation.py:113: 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
                          
src/azure-cli-core/azure/cli/core/commands/init.py:1011: in validate_arg_level
    validator(**self.build_kwargs(validator, ns))
src/azure-cli/azure/cli/command_modules/storage/validators.py:1438: in blob_tier_validator_track2
    page_blob_tier_validator_track2(cmd, namespace)
 
 
 
                                     

cmd = <azure.cli.core.commands.AzCliCommand object at 0x7f006268cfe0>
namespace = Namespace(log_verbosity_verbose=False, log_verbosity_debug=False, log_verbosity_only_show_errors=False, output_for...nt_encoding': None, 'content_language': None, 'content_md5': None, 'content_disposition': None, 'cache_control': None})

    def page_blob_tier_validator_track2(cmd, namespace):
        if not namespace.tier:
            return
    
        if namespace.blob_type != 'page' and namespace.tier:
            raise ValueError('Blob tier is only applicable to page blobs on premium storage accounts.')
    
        try:
            namespace.premium_page_blob_tier = getattr(cmd.get_models(
                'generated.models.enums#PremiumPageBlobAccessTier'), namespace.tier)
        except AttributeError:
            from azure.cli.command_modules.storage.sdkutil import get_blob_tier_names_track2
            tier_names = get_blob_tier_names_track2(
                cmd.cli_ctx, 'generated.models.enums#PremiumPageBlobAccessTier')
>           raise ValueError('Unknown premium page blob tier name. Choose among {}'.format(', '.join(tier_names)))
E           ValueError: Unknown premium page blob tier name. Choose among

src/azure-cli/azure/cli/command_modules/storage/validators.py:1408: ValueError

During handling of the above exception, another exception occurred:

self = <azure.cli.command_modules.storage.tests.latest.test_storage_blob_scenarios.StorageBlobSetTierTests testMethod=test_storage_page_blob_set_tier>
resource_group = 'clitest.rg000001', storage_account = 'clitest000002'

    @ResourceGroupPreparer()
    @StorageAccountPreparer(kind='StorageV2', sku='Premium_LRS')
    def test_storage_page_blob_set_tier(self, resource_group, storage_account):
    
        source_file = self.create_temp_file(16)
        account_info = self.get_account_info(resource_group, storage_account)
        container_name = self.create_container(account_info)
        blob_name = self.create_random_name(prefix='blob', length=24)
    
>       self.storage_cmd('storage blob upload -c {} -n {} -f "{}" -t page --tier P10', account_info,
                         container_name, blob_name, source_file)

src/azure-cli/azure/cli/command_modules/storage/tests/latest/test_storage_blob_scenarios.py:786: 
 
 
 
 
 
 
 
 
                                
src/azure-cli/azure/cli/command_modules/storage/tests/storage_test_util.py:52: in storage_cmd
    return self.cmd(cmd)
           ^^^^^^^^^^^^^
src/azure-cli-testsdk/azure/cli/testsdk/base.py:177: 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:252: in init
    self.in_process_execute(cli_ctx, command, expect_failure=expect_failure)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:303: in in_process_execute
    self.exit_code = cli_ctx.invoke(shlex.split(command), out_file=stdout_buf) or 0
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/knack/cli.py:250: in invoke
    raise ex
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:665: in execute
    self.validation(expanded_arg)
env/lib/python3.12/site-packages/knack/invocation.py:118: in validation
    getattr(parsed_ns, 'parser', self.parser).validation_error(str(err))
src/azure-cli-core/azure/cli/core/parser.py:150: in validation_error
    self.exit(2)
 
 
 
 
 
                                   

self = AzCliCommandParser(prog='az storage blob upload', usage=None, description='Upload a blob to a container.', formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
status = 2, message = None

    def exit(self, status=0, message=None):
        if message:
            self._print_message(message, _sys.stderr)
>       _sys.exit(status)
E       SystemExit: 2

/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:2637: SystemExit
azure/cli/command_modules/storage/tests/latest/test_storage_blob_scenarios.py:776
Failed test_storage_blob_list_scenarios self = <azure.cli.core.commands.AzCliCommandInvoker object at 0x7f006213b5c0>
parsed_ns = 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 0x7f00637a4320>)

    def validation(self, parsed_ns):
        try:
            cmd_validator = getattr(parsed_ns, 'command_validator', None)
            if cmd_validator:
                self.validate_cmd_level(parsed_ns, cmd_validator)
            else:
>               self.validate_arg_level(parsed_ns)

env/lib/python3.12/site-packages/knack/invocation.py:113: 
 
 
 
 
 
 
 
                                 
src/azure-cli-core/azure/cli/core/commands/init.py:1011: in validate_arg_level
    validator(**self.build_kwargs(validator, ns))
 
                                       

namespace = 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 0x7f00637a4320>)

    def validator(namespace):
        if namespace.include:
            if set(namespace.include) - set(allowed_string):
                help_string = get_include_help_string(include_class)
>               raise ValueError(
                    'valid values are {} or a combination thereof.'.format(help_string))
E               ValueError: valid values are  or a combination thereof.

src/azure-cli/azure/cli/command_modules/storage/validators.py:795: ValueError

During handling of the above exception, another exception occurred:

self = <azure.cli.command_modules.storage.tests.latest.test_storage_blob_scenarios.StorageBlobCommonTests testMethod=test_storage_blob_list_scenarios>
resource_group = 'clitest000001', storage_account = 'storage000002'

    @ResourceGroupPreparer(name_prefix='clitest')
    @StorageAccountPreparer(name_prefix='storage', kind='StorageV2', location='eastus2', sku='Standard_RAGZRS')
    def test_storage_blob_list_scenarios(self, resource_group, storage_account):
        import time
        account_info = self.get_account_info(resource_group, storage_account)
        container = self.create_container(account_info, prefix="con")
    
        local_file = self.create_temp_file(128)
        blob_name1 = "/".join(["dir", self.create_random_name(prefix='blob', length=24)])
        blob_name2 = "/".join(["dir", self.create_random_name(prefix='blob', length=24)])
    
        # Prepare blob 1
        self.storage_cmd('storage blob upload -c {} -f "{}" -n {} ', account_info,
                         container, local_file, blob_name1)
        # Test
        self.storage_cmd('storage blob list -c {} ', account_info, container) <br>            .assert_with_checks(JMESPathCheck('[0].objectReplicationDestinationPolicy', None),
                                JMESPathCheck('[0].objectReplicationSourceProperties', []))
    
        # Test with include snapshot
        result = self.storage_cmd('storage blob snapshot -c {} -n {} ', account_info, container, blob_name1)<br>            .get_output_in_json()
        self.assertIsNotNone(result['snapshot'])
        snapshot = result['snapshot']
    
>       self.storage_cmd('storage blob list -c {} --include s', account_info, container) <br>        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            .assert_with_checks(JMESPathCheck('[0].snapshot', snapshot))

src/azure-cli/azure/cli/command_modules/storage/tests/latest/test_storage_blob_scenarios.py:937: 
 
 
 
 
                                    
src/azure-cli/azure/cli/command_modules/storage/tests/storage_test_util.py:52: in storage_cmd
    return self.cmd(cmd)
           ^^^^^^^^^^^^^
src/azure-cli-testsdk/azure/cli/testsdk/base.py:177: 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:252: in init
    self.in_process_execute(cli_ctx, command, expect_failure=expect_failure)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:303: in in_process_execute
    self.exit_code = cli_ctx.invoke(shlex.split(command), out_file=stdout_buf) or 0
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/knack/cli.py:250: in invoke
    raise ex
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:665: in execute
    self.validation(expanded_arg)
env/lib/python3.12/site-packages/knack/invocation.py:118: in validation
    getattr(parsed_ns, 'parser', self.parser).validation_error(str(err))
src/azure-cli-core/azure/cli/core/parser.py:150: in validation_error
    self.exit(2)
 
 
 
 
 
                                   

self = AzCliCommandParser(prog='az storage blob list', usage=None, description='', formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
status = 2, message = None

    def exit(self, status=0, message=None):
        if message:
            self._print_message(message, _sys.stderr)
>       _sys.exit(status)
E       SystemExit: 2

/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/argparse.py:2637: SystemExit
azure/cli/command_modules/storage/tests/latest/test_storage_blob_scenarios.py:911
Failed test_storage_blob_list_oauth The error message is too long, please check the pipeline log for details. azure/cli/command_modules/storage/tests/latest/test_storage_oauth_track2.py:383
Failed test_storage_page_blob_set_tier_oauth The error message is too long, please check the pipeline log for details. azure/cli/command_modules/storage/tests/latest/test_storage_oauth_track2.py:495
❌3.14
Type Test Case Error Message Line
Failed test_storage_blob_batch_upload_scenarios self = <azure.cli.core.commands.AzCliCommandInvoker object at 0x7f19ffb01590>
parsed_ns = 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 0x7f19fc8ee250>)

    def validation(self, parsed_ns):
        try:
            cmd_validator = getattr(parsed_ns, 'command_validator', None)
            if cmd_validator:
                self.validate_cmd_level(parsed_ns, cmd_validator)
            else:
>               self.validate_arg_level(parsed_ns)

env/lib/python3.14/site-packages/knack/invocation.py:113: 
 
 
 
 
 
 
 
                                 
src/azure-cli-core/azure/cli/core/commands/init.py:1011: in validate_arg_level
    validator(**self.build_kwargs(validator, ns))
 
                                       

namespace = 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 0x7f19fc8ee250>)

    def validator(namespace):
        if namespace.include:
            if set(namespace.include) - set(allowed_string):
                help_string = get_include_help_string(include_class)
>               raise ValueError(
                    'valid values are {} or a combination thereof.'.format(help_string))
E               ValueError: valid values are  or a combination thereof.

src/azure-cli/azure/cli/command_modules/storage/validators.py:795: ValueError

During handling of the above exception, another exception occurred:

self = <azure.cli.command_modules.storage.tests.latest.test_storage_batch_operations.StorageBatchOperationScenarios testMethod=test_storage_blob_batch_upload_scenarios>
test_dir = '/tmp/test43jut74wzqalbsirhdip'
storage_account_info = ('clitest000002', 'veryFakedStorageAccountKey==')

    @ResourceGroupPreparer()
    @StorageAccountPreparer(kind='StorageV2')
    @StorageTestFilesPreparer()
    def test_storage_blob_batch_upload_scenarios(self, test_dir, storage_account_info):
        # upload files without pattern
        container = 'container1'
        self.storage_cmd('storage container create -n {}', storage_account_info, container)
        self.storage_cmd('storage blob upload-batch -s "{}" -d {} --max-connections 3', storage_account_info,
                         test_dir, container)
        self.storage_cmd('storage blob list -c {}', storage_account_info, container).assert_with_checks(
            JMESPathCheck('length(@)', 41))
    
        self.storage_cmd('storage blob upload-batch -s "{}" -d {} --content-md 123 --max-connections 3 --overwrite', storage_account_info,
                         test_dir, container)
        self.storage_cmd('storage blob list -c {}', storage_account_info, container).assert_with_checks(
            JMESPathCheck('length(@)', 41))
    
        # test upload-batch with tags
        self.storage_cmd('storage blob upload-batch -s "{}" -d {} --overwrite --tags key1=val1 key2=val2',
                         storage_account_info, test_dir, container)
>       result = self.storage_cmd('storage blob list -c {} --prefix apple --include t',
                                  storage_account_info, container).get_output_in_json()

src/azure-cli/azure/cli/command_modules/storage/tests/latest/test_storage_batch_operations.py:111: 
 
 
 
 
                                    
src/azure-cli/azure/cli/command_modules/storage/tests/storage_test_util.py:52: in storage_cmd
    return self.cmd(cmd)
           ^^^^^^^^^^^^^
src/azure-cli-testsdk/azure/cli/testsdk/base.py:177: 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:252: in init
    self.in_process_execute(cli_ctx, command, expect_failure=expect_failure)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:303: in in_process_execute
    self.exit_code = cli_ctx.invoke(shlex.split(command), out_file=stdout_buf) or 0
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/knack/cli.py:250: in invoke
    raise ex
env/lib/python3.14/site-packages/knack/cli.py:233: in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:665: in execute
    self.validation(expanded_arg)
env/lib/python3.14/site-packages/knack/invocation.py:118: in validation
    getattr(parsed_ns, 'parser', self.parser).validation_error(str(err))
src/azure-cli-core/azure/cli/core/parser.py:150: in validation_error
    self.exit(2)
 
 
 
 
 
                                   

self = AzCliCommandParser(prog='az storage blob list', usage=None, description='', formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
status = 2, message = None

    def exit(self, status=0, message=None):
        if message:
            self._print_message(message, _sys.stderr)
>       _sys.exit(status)
E       SystemExit: 2

/opt/hostedtoolcache/Python/3.14.2/x64/lib/python3.14/argparse.py:2760: SystemExit
azure/cli/command_modules/storage/tests/latest/test_storage_batch_operations.py:90
Failed test_storage_blob_soft_delete self = <azure.cli.core.commands.AzCliCommandInvoker object at 0x7f1a039cce20>
parsed_ns = 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 0x7f19fc7bd050>)

    def validation(self, parsed_ns):
        try:
            cmd_validator = getattr(parsed_ns, 'command_validator', None)
            if cmd_validator:
                self.validate_cmd_level(parsed_ns, cmd_validator)
            else:
>               self.validate_arg_level(parsed_ns)

env/lib/python3.14/site-packages/knack/invocation.py:113: 
 
 
 
 
 
 
 
                                 
src/azure-cli-core/azure/cli/core/commands/init.py:1011: in validate_arg_level
    validator(**self.build_kwargs(validator, ns))
 
                                       

namespace = 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 0x7f19fc7bd050>)

    def validator(namespace):
        if namespace.include:
            if set(namespace.include) - set(allowed_string):
                help_string = get_include_help_string(include_class)
>               raise ValueError(
                    'valid values are {} or a combination thereof.'.format(help_string))
E               ValueError: valid values are  or a combination thereof.

src/azure-cli/azure/cli/command_modules/storage/validators.py:795: ValueError

During handling of the above exception, another exception occurred:

self = <azure.cli.command_modules.storage.tests.latest.test_storage_blob_scenarios.StorageBlobUploadTests testMethod=test_storage_blob_soft_delete>
resource_group = 'clitest.rg000001'
storage_account_info = ('clitest000002', 'veryFakedStorageAccountKey==')

    @ResourceGroupPreparer()
    @StorageAccountPreparer(kind='StorageV2')
    def test_storage_blob_soft_delete(self, resource_group, storage_account_info):
        container = self.create_container(storage_account_info)
        import time
    
        # create a blob
        local_file = self.create_temp_file(1)
        blob_name = self.create_random_name(prefix='blob', length=24)
    
        self.storage_cmd('storage blob upload -c {} -f "{}" -n {} --type block', storage_account_info,
                         container, local_file, blob_name)
        self.assertEqual(len(self.storage_cmd('storage blob list -c {}',
                                              storage_account_info, container).get_output_in_json()), 1)
    
        # set delete-policy to enable soft-delete
        self.storage_cmd('storage blob service-properties delete-policy update --enable true --days-retained 2',
                         storage_account_info)
        self.storage_cmd('storage blob service-properties delete-policy show',
                         storage_account_info).assert_with_checks(JMESPathCheck('enabled', True),
                                                                  JMESPathCheck('days', 2))
        if self.is_live:
            time.sleep(10)
        # soft-delete and check
        self.storage_cmd('storage blob delete -c {} -n {}', storage_account_info, container, blob_name)
        self.assertEqual(len(self.storage_cmd('storage blob list -c {}',
                                              storage_account_info, container).get_output_in_json()), 0)
    
        if self.is_live:
            time.sleep(30)
>       self.assertEqual(len(self.storage_cmd('storage blob list -c {} --include d',
                                              storage_account_info, container).get_output_in_json()), 1)

src/azure-cli/azure/cli/command_modules/storage/tests/latest/test_storage_blob_scenarios.py:412: 
 
 
 
 
                                    
src/azure-cli/azure/cli/command_modules/storage/tests/storage_test_util.py:52: in storage_cmd
    return self.cmd(cmd)
           ^^^^^^^^^^^^^
src/azure-cli-testsdk/azure/cli/testsdk/base.py:177: 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:252: in init
    self.in_process_execute(cli_ctx, command, expect_failure=expect_failure)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:303: in in_process_execute
    self.exit_code = cli_ctx.invoke(shlex.split(command), out_file=stdout_buf) or 0
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/knack/cli.py:250: in invoke
    raise ex
env/lib/python3.14/site-packages/knack/cli.py:233: in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:665: in execute
    self.validation(expanded_arg)
env/lib/python3.14/site-packages/knack/invocation.py:118: in validation
    getattr(parsed_ns, 'parser', self.parser).validation_error(str(err))
src/azure-cli-core/azure/cli/core/parser.py:150: in validation_error
    self.exit(2)
 
 
 
 
 
                                   

self = AzCliCommandParser(prog='az storage blob list', usage=None, description='', formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
status = 2, message = None

    def exit(self, status=0, message=None):
        if message:
            self._print_message(message, _sys.stderr)
>       _sys.exit(status)
E       SystemExit: 2

/opt/hostedtoolcache/Python/3.14.2/x64/lib/python3.14/argparse.py:2760: SystemExit
azure/cli/command_modules/storage/tests/latest/test_storage_blob_scenarios.py:381
Failed test_storage_page_blob_set_tier cmd = <azure.cli.core.commands.AzCliCommand object at 0x7f19fcb71250>
namespace = Namespace(log_verbosity_verbose=False, log_verbosity_debug=False, log_verbosity_only_show_errors=False, output_for...nt_encoding': None, 'content_language': None, 'content_md5': None, 'content_disposition': None, 'cache_control': None})

    def page_blob_tier_validator_track2(cmd, namespace):
        if not namespace.tier:
            return
    
        if namespace.blob_type != 'page' and namespace.tier:
            raise ValueError('Blob tier is only applicable to page blobs on premium storage accounts.')
    
        try:
>           namespace.premium_page_blob_tier = getattr(cmd.get_models(
                'generated.models.enums#PremiumPageBlobAccessTier'), namespace.tier)
E               AttributeError: 'NoneType' object has no attribute 'P10'

src/azure-cli/azure/cli/command_modules/storage/validators.py:1402: AttributeError

During handling of the above exception, another exception occurred:

self = <azure.cli.core.commands.AzCliCommandInvoker object at 0x7f19ff3534d0>
parsed_ns = Namespace(log_verbosity_verbose=False, log_verbosity_debug=False, log_verbosity_only_show_errors=False, output_for...nt_encoding': None, 'content_language': None, 'content_md5': None, 'content_disposition': None, 'cache_control': None})

    def validation(self, parsed_ns):
        try:
            cmd_validator = getattr(parsed_ns, 'command_validator', None)
            if cmd_validator:
                self.validate_cmd_level(parsed_ns, cmd_validator)
            else:
>               self.validate_arg_level(parsed_ns)

env/lib/python3.14/site-packages/knack/invocation.py:113: 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
                          
src/azure-cli-core/azure/cli/core/commands/init.py:1011: in validate_arg_level
    validator(**self.build_kwargs(validator, ns))
src/azure-cli/azure/cli/command_modules/storage/validators.py:1438: in blob_tier_validator_track2
    page_blob_tier_validator_track2(cmd, namespace)
 
 
 
                                     

cmd = <azure.cli.core.commands.AzCliCommand object at 0x7f19fcb71250>
namespace = Namespace(log_verbosity_verbose=False, log_verbosity_debug=False, log_verbosity_only_show_errors=False, output_for...nt_encoding': None, 'content_language': None, 'content_md5': None, 'content_disposition': None, 'cache_control': None})

    def page_blob_tier_validator_track2(cmd, namespace):
        if not namespace.tier:
            return
    
        if namespace.blob_type != 'page' and namespace.tier:
            raise ValueError('Blob tier is only applicable to page blobs on premium storage accounts.')
    
        try:
            namespace.premium_page_blob_tier = getattr(cmd.get_models(
                'generated.models.enums#PremiumPageBlobAccessTier'), namespace.tier)
        except AttributeError:
            from azure.cli.command_modules.storage.sdkutil import get_blob_tier_names_track2
            tier_names = get_blob_tier_names_track2(
                cmd.cli_ctx, 'generated.models.enums#PremiumPageBlobAccessTier')
>           raise ValueError('Unknown premium page blob tier name. Choose among {}'.format(', '.join(tier_names)))
E           ValueError: Unknown premium page blob tier name. Choose among

src/azure-cli/azure/cli/command_modules/storage/validators.py:1408: ValueError

During handling of the above exception, another exception occurred:

self = <azure.cli.command_modules.storage.tests.latest.test_storage_blob_scenarios.StorageBlobSetTierTests testMethod=test_storage_page_blob_set_tier>
resource_group = 'clitest.rg000001', storage_account = 'clitest000002'

    @ResourceGroupPreparer()
    @StorageAccountPreparer(kind='StorageV2', sku='Premium_LRS')
    def test_storage_page_blob_set_tier(self, resource_group, storage_account):
    
        source_file = self.create_temp_file(16)
        account_info = self.get_account_info(resource_group, storage_account)
        container_name = self.create_container(account_info)
        blob_name = self.create_random_name(prefix='blob', length=24)
    
>       self.storage_cmd('storage blob upload -c {} -n {} -f "{}" -t page --tier P10', account_info,
                         container_name, blob_name, source_file)

src/azure-cli/azure/cli/command_modules/storage/tests/latest/test_storage_blob_scenarios.py:786: 
 
 
 
 
 
 
 
 
                                
src/azure-cli/azure/cli/command_modules/storage/tests/storage_test_util.py:52: in storage_cmd
    return self.cmd(cmd)
           ^^^^^^^^^^^^^
src/azure-cli-testsdk/azure/cli/testsdk/base.py:177: 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:252: in init
    self.in_process_execute(cli_ctx, command, expect_failure=expect_failure)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:303: in in_process_execute
    self.exit_code = cli_ctx.invoke(shlex.split(command), out_file=stdout_buf) or 0
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/knack/cli.py:250: in invoke
    raise ex
env/lib/python3.14/site-packages/knack/cli.py:233: in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:665: in execute
    self.validation(expanded_arg)
env/lib/python3.14/site-packages/knack/invocation.py:118: in validation
    getattr(parsed_ns, 'parser', self.parser).validation_error(str(err))
src/azure-cli-core/azure/cli/core/parser.py:150: in validation_error
    self.exit(2)
 
 
 
 
 
                                   

self = AzCliCommandParser(prog='az storage blob upload', usage=None, description='Upload a blob to a container.', formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
status = 2, message = None

    def exit(self, status=0, message=None):
        if message:
            self._print_message(message, _sys.stderr)
>       _sys.exit(status)
E       SystemExit: 2

/opt/hostedtoolcache/Python/3.14.2/x64/lib/python3.14/argparse.py:2760: SystemExit
azure/cli/command_modules/storage/tests/latest/test_storage_blob_scenarios.py:776
Failed test_storage_blob_list_scenarios self = <azure.cli.core.commands.AzCliCommandInvoker object at 0x7f19ff2305f0>
parsed_ns = 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 0x7f19fc812750>)

    def validation(self, parsed_ns):
        try:
            cmd_validator = getattr(parsed_ns, 'command_validator', None)
            if cmd_validator:
                self.validate_cmd_level(parsed_ns, cmd_validator)
            else:
>               self.validate_arg_level(parsed_ns)

env/lib/python3.14/site-packages/knack/invocation.py:113: 
 
 
 
 
 
 
 
                                 
src/azure-cli-core/azure/cli/core/commands/init.py:1011: in validate_arg_level
    validator(**self.build_kwargs(validator, ns))
 
                                       

namespace = 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 0x7f19fc812750>)

    def validator(namespace):
        if namespace.include:
            if set(namespace.include) - set(allowed_string):
                help_string = get_include_help_string(include_class)
>               raise ValueError(
                    'valid values are {} or a combination thereof.'.format(help_string))
E               ValueError: valid values are  or a combination thereof.

src/azure-cli/azure/cli/command_modules/storage/validators.py:795: ValueError

During handling of the above exception, another exception occurred:

self = <azure.cli.command_modules.storage.tests.latest.test_storage_blob_scenarios.StorageBlobCommonTests testMethod=test_storage_blob_list_scenarios>
resource_group = 'clitest000001', storage_account = 'storage000002'

    @ResourceGroupPreparer(name_prefix='clitest')
    @StorageAccountPreparer(name_prefix='storage', kind='StorageV2', location='eastus2', sku='Standard_RAGZRS')
    def test_storage_blob_list_scenarios(self, resource_group, storage_account):
        import time
        account_info = self.get_account_info(resource_group, storage_account)
        container = self.create_container(account_info, prefix="con")
    
        local_file = self.create_temp_file(128)
        blob_name1 = "/".join(["dir", self.create_random_name(prefix='blob', length=24)])
        blob_name2 = "/".join(["dir", self.create_random_name(prefix='blob', length=24)])
    
        # Prepare blob 1
        self.storage_cmd('storage blob upload -c {} -f "{}" -n {} ', account_info,
                         container, local_file, blob_name1)
        # Test
        self.storage_cmd('storage blob list -c {} ', account_info, container) <br>            .assert_with_checks(JMESPathCheck('[0].objectReplicationDestinationPolicy', None),
                                JMESPathCheck('[0].objectReplicationSourceProperties', []))
    
        # Test with include snapshot
        result = self.storage_cmd('storage blob snapshot -c {} -n {} ', account_info, container, blob_name1)<br>            .get_output_in_json()
        self.assertIsNotNone(result['snapshot'])
        snapshot = result['snapshot']
    
>       self.storage_cmd('storage blob list -c {} --include s', account_info, container) <br>        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            .assert_with_checks(JMESPathCheck('[0].snapshot', snapshot))

src/azure-cli/azure/cli/command_modules/storage/tests/latest/test_storage_blob_scenarios.py:937: 
 
 
 
 
                                    
src/azure-cli/azure/cli/command_modules/storage/tests/storage_test_util.py:52: in storage_cmd
    return self.cmd(cmd)
           ^^^^^^^^^^^^^
src/azure-cli-testsdk/azure/cli/testsdk/base.py:177: 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:252: in init
    self.in_process_execute(cli_ctx, command, expect_failure=expect_failure)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:303: in in_process_execute
    self.exit_code = cli_ctx.invoke(shlex.split(command), out_file=stdout_buf) or 0
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/knack/cli.py:250: in invoke
    raise ex
env/lib/python3.14/site-packages/knack/cli.py:233: in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:665: in execute
    self.validation(expanded_arg)
env/lib/python3.14/site-packages/knack/invocation.py:118: in validation
    getattr(parsed_ns, 'parser', self.parser).validation_error(str(err))
src/azure-cli-core/azure/cli/core/parser.py:150: in validation_error
    self.exit(2)
 
 
 
 
 
                                   

self = AzCliCommandParser(prog='az storage blob list', usage=None, description='', formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
status = 2, message = None

    def exit(self, status=0, message=None):
        if message:
            self._print_message(message, _sys.stderr)
>       _sys.exit(status)
E       SystemExit: 2

/opt/hostedtoolcache/Python/3.14.2/x64/lib/python3.14/argparse.py:2760: SystemExit
azure/cli/command_modules/storage/tests/latest/test_storage_blob_scenarios.py:911
Failed test_storage_blob_list_oauth The error message is too long, please check the pipeline log for details. azure/cli/command_modules/storage/tests/latest/test_storage_oauth_track2.py:383
Failed test_storage_page_blob_set_tier_oauth The error message is too long, please check the pipeline log for details. azure/cli/command_modules/storage/tests/latest/test_storage_oauth_track2.py:495
️✔️synapse
️✔️latest
️✔️3.12
️✔️3.14
️✔️telemetry
️✔️latest
️✔️3.12
️✔️3.14
️✔️util
️✔️latest
️✔️3.12
️✔️3.14
️✔️vm
️✔️latest
️✔️3.12
️✔️3.14

@azure-client-tools-bot-prd

azure-client-tools-bot-prd Bot commented Jun 12, 2026

Copy link
Copy Markdown
⚠️AzureCLI-BreakingChangeTest
⚠️storage
rule cmd_name rule_message suggest_message
⚠️ 1009 - ParaPropRemove storage blob rewrite cmd storage blob rewrite update parameter standard_blob_tier: removed property choices=['Archive', 'Cold', 'Cool', 'Hot', 'P10', 'P15', 'P20', 'P30', 'P4', 'P40', 'P50', 'P6', 'P60', 'P70', 'P80']
⚠️ 1009 - ParaPropRemove storage file copy start cmd storage file copy start update parameter file_mode_copy_mode: removed property choices=['override', 'source']
⚠️ 1009 - ParaPropRemove storage file copy start cmd storage file copy start update parameter owner_copy_mode: removed property choices=['override', 'source']
⚠️ 1009 - ParaPropRemove storage share delete cmd storage share delete update parameter delete_snapshots: removed property choices=['include', 'include-leased']

@l0lawrence

l0lawrence commented Jun 12, 2026

Copy link
Copy Markdown
Member Author
  • will need to include bumping the version pins

@yonzhan

yonzhan commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator

storage

@Pan-Qi

Pan-Qi commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 3 pipeline(s).

@Pan-Qi Pan-Qi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please mark as open when ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants