Skip to content

[pylint4] Fix all style errors for pylint 4.x compatibility (logging,…

333da22
Select commit
Loading
Failed to load commit list.
Closed

Fix/pylint4 compat #33346

[pylint4] Fix all style errors for pylint 4.x compatibility (logging,…
333da22
Select commit
Loading
Failed to load commit list.
Azure Pipelines / Azure.azure-cli Full Test failed May 10, 2026 in 20m 12s

Build #20260510.2 had test failures

Details

Tests

  • Failed: 158 (0.97%)
  • Passed: 13,804 (84.54%)
  • Other: 2,367 (14.50%)
  • Total: 16,329

Annotations

Check failure on line 3189 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / Azure.azure-cli Full Test

Build log #L3189

Bash exited with code '1'.

Check failure on line 1035 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / Azure.azure-cli Full Test

Build log #L1035

Bash exited with code '1'.

Check failure on line 13272 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / Azure.azure-cli Full Test

Build log #L13272

Bash exited with code '1'.

Check failure on line 3320 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / Azure.azure-cli Full Test

Build log #L3320

Bash exited with code '1'.

Check failure on line 1 in test_app_permission

See this annotation in the file changed.

@azure-pipelines azure-pipelines / Azure.azure-cli Full Test

test_app_permission

self = AzCliCommandParser(prog='az ad sp create-for-rbac', usage=None, description='', formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
action = _StoreAction(option_strings=['--display-name', '--name', '-n'], dest='display_name', nargs=None, const=None, default=N...ent, default to azure-cli-%Y-%m-%d-%H-%M-%S where the suffix is the time of creation.', metavar=None, deprecated=False)

    def _check_help(self, action):
        if action.help and hasattr(self, "_get_formatter"):
            formatter = self._get_formatter()
            try:
>               formatter._expand_help(action)

/opt/hostedtoolcache/Python/3.14.2/x64/lib/python3.14/argparse.py:1747: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <argparse.HelpFormatter object at 0x7f14720801d0>
action = _StoreAction(option_strings=['--display-name', '--name', '-n'], dest='display_name', nargs=None, const=None, default=N...ent, default to azure-cli-%Y-%m-%d-%H-%M-%S where the suffix is the time of creation.', metavar=None, deprecated=False)

    def _expand_help(self, action):
        help_string = self._get_help_string(action)
        if '%' not in help_string:
            return help_string
        params = dict(vars(action), prog=self._prog)
        for name in list(params):
            value = params[name]
            if value is SUPPRESS:
                del params[name]
            elif hasattr(value, '__name__'):
                params[name] = value.__name__
        if params.get('choices') is not None:
            params['choices'] = ', '.join(map(str, params['choices']))
>       return help_string % params
               ^^^^^^^^^^^^^^^^^^^^
E       ValueError: unsupported format character 'Y' (0x59) at index 77

/opt/hostedtoolcache/Python/3.14.2/x64/lib/python3.14/argparse.py:678: ValueError

The above exception was the direct cause of the following exception:

self = <azure.cli.command_modules.role.tests.latest.test_graph.ApplicationScenarioTest testMethod=test_app_permission>

    @AllowLargeResponse()
    def test_app_permission(self):
        if not self._get_signed_in_user():
            return
    
        self.kwargs = {
            'display_name': self.create_random_name('cli-app-', 15),
            # Microsoft Graph
            'microsoft_graph_api': '00000003-0000-0000-c000-000000000000',
            # Azure Storage
            'azure_service_management_api': '797f4846-ba00-4fd7-ba43-dac1f8f63013',
        }
    
        # Look up for permission IDs
        graph_sp = self.cmd('ad sp show --id {microsoft_graph_api}').get_output_in_json()
        # Delegated permission Directory.AccessAsUser.All
        self.kwargs['microsoft_graph_permission1'] = _get_id_from_value(
            graph_sp['oauth2PermissionScopes'], 'Application.Read.All')
        # Application permission Application.ReadWrite.OwnedBy
        self.kwargs['microsoft_graph_permission2'] = _get_id_from_value(
            graph_sp['appRoles'], 'Application.ReadWrite.OwnedBy')
    
        arm_sp = self.cmd('ad sp show --id {azure_service_management_api}').get_output_in_json()
        # Delegated permission user_impersonation
        self.kwargs['azure_service_management_permission'] = _get_id_from_value(
            arm_sp['oauth2PermissionScopes'],'user_impersonation')
    
>       result = self.cmd('ad sp create-for-rbac --name {display_name}').get_output_in_json()
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/azure-cli/azure/cli/command_modules/role/tests/latest/test_graph.py:452: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
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_proces
Raw output
self = AzCliCommandParser(prog='az ad sp create-for-rbac', usage=None, description='', formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
action = _StoreAction(option_strings=['--display-name', '--name', '-n'], dest='display_name', nargs=None, const=None, default=N...ent, default to azure-cli-%Y-%m-%d-%H-%M-%S where the suffix is the time of creation.', metavar=None, deprecated=False)

    def _check_help(self, action):
        if action.help and hasattr(self, "_get_formatter"):
            formatter = self._get_formatter()
            try:
>               formatter._expand_help(action)

/opt/hostedtoolcache/Python/3.14.2/x64/lib/python3.14/argparse.py:1747: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <argparse.HelpFormatter object at 0x7f14720801d0>
action = _StoreAction(option_strings=['--display-name', '--name', '-n'], dest='display_name', nargs=None, const=None, default=N...ent, default to azure-cli-%Y-%m-%d-%H-%M-%S where the suffix is the time of creation.', metavar=None, deprecated=False)

    def _expand_help(self, action):
        help_string = self._get_help_string(action)
        if '%' not in help_string:
            return help_string
        params = dict(vars(action), prog=self._prog)
        for name in list(params):
            value = params[name]
            if value is SUPPRESS:
                del params[name]
            elif hasattr(value, '__name__'):
                params[name] = value.__name__
        if params.get('choices') is not None:
            params['choices'] = ', '.join(map(str, params['choices']))
>       return help_string % params
               ^^^^^^^^^^^^^^^^^^^^
E       ValueError: unsupported format character 'Y' (0x59) at index 77

/opt/hostedtoolcache/Python/3.14.2/x64/lib/python3.14/argparse.py:678: ValueError

The above exception was the direct cause of the following exception:

self = <azure.cli.command_modules.role.tests.latest.test_graph.ApplicationScenarioTest testMethod=test_app_permission>

    @AllowLargeResponse()
    def test_app_permission(self):
        if not self._get_signed_in_user():
            return
    
        self.kwargs = {
            'display_name': self.create_random_name('cli-app-', 15),
            # Microsoft Graph
            'microsoft_graph_api': '00000003-0000-0000-c000-000000000000',
            # Azure Storage
            'azure_service_management_api': '797f4846-ba00-4fd7-ba43-dac1f8f63013',
        }
    
        # Look up for permission IDs
        graph_sp = self.cmd('ad sp show --id {microsoft_graph_api}').get_output_in_json()
        # Delegated permission Directory.AccessAsUser.All
        self.kwargs['microsoft_graph_permission1'] = _get_id_from_value(
            graph_sp['oauth2PermissionScopes'], 'Application.Read.All')
        # Application permission Application.ReadWrite.OwnedBy
        self.kwargs['microsoft_graph_permission2'] = _get_id_from_value(
            graph_sp['appRoles'], 'Application.ReadWrite.OwnedBy')
    
        arm_sp = self.cmd('ad sp show --id {azure_service_management_api}').get_output_in_json()
        # Delegated permission user_impersonation
        self.kwargs['azure_service_management_permission'] = _get_id_from_value(
            arm_sp['oauth2PermissionScopes'],'user_impersonation')
    
>       result = self.cmd('ad sp create-for-rbac --name {display_name}').get_output_in_json()
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/azure-cli/azure/cli/command_modules/role/tests/latest/test_graph.py:452: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
src/azure-cli-testsdk/azure/cli/testsdk/base.py:177: in cmd
    return execute(self.cli_ctx, command, expect_failure=expect_failure).assert_with_c
... [The stack trace has been truncated as it exceeded the maximum allowed size. Please refer to the complete log available in the Test Run attachments for full details.]

Check failure on line 1 in test_app_permission_grant

See this annotation in the file changed.

@azure-pipelines azure-pipelines / Azure.azure-cli Full Test

test_app_permission_grant

self = AzCliCommandParser(prog='az ad sp create-for-rbac', usage=None, description='', formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
action = _StoreAction(option_strings=['--display-name', '--name', '-n'], dest='display_name', nargs=None, const=None, default=N...ent, default to azure-cli-%Y-%m-%d-%H-%M-%S where the suffix is the time of creation.', metavar=None, deprecated=False)

    def _check_help(self, action):
        if action.help and hasattr(self, "_get_formatter"):
            formatter = self._get_formatter()
            try:
>               formatter._expand_help(action)

/opt/hostedtoolcache/Python/3.14.2/x64/lib/python3.14/argparse.py:1747: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <argparse.HelpFormatter object at 0x7f14720e62d0>
action = _StoreAction(option_strings=['--display-name', '--name', '-n'], dest='display_name', nargs=None, const=None, default=N...ent, default to azure-cli-%Y-%m-%d-%H-%M-%S where the suffix is the time of creation.', metavar=None, deprecated=False)

    def _expand_help(self, action):
        help_string = self._get_help_string(action)
        if '%' not in help_string:
            return help_string
        params = dict(vars(action), prog=self._prog)
        for name in list(params):
            value = params[name]
            if value is SUPPRESS:
                del params[name]
            elif hasattr(value, '__name__'):
                params[name] = value.__name__
        if params.get('choices') is not None:
            params['choices'] = ', '.join(map(str, params['choices']))
>       return help_string % params
               ^^^^^^^^^^^^^^^^^^^^
E       ValueError: unsupported format character 'Y' (0x59) at index 77

/opt/hostedtoolcache/Python/3.14.2/x64/lib/python3.14/argparse.py:678: ValueError

The above exception was the direct cause of the following exception:

self = <azure.cli.command_modules.role.tests.latest.test_graph.ApplicationScenarioTest testMethod=test_app_permission_grant>

    @AllowLargeResponse()
    def test_app_permission_grant(self):
        if not self._get_signed_in_user():
            return  # this test delete users which are beyond a SP's capacity, so quit...
        self.kwargs = {
            'display_name': self.create_random_name('cli-app-', 15),
            'microsoft_graph_api': '00000003-0000-0000-c000-000000000000',
            'microsoft_graph_permission_value1': 'Directory.Read.All',  # Delegated permission
            'microsoft_graph_permission_value2': 'Application.Read.All',  # Delegated permission
            # 'microsoft_graph_permission_value3': 'Application.ReadWrite.OwnedBy'  # Application permission
        }
    
        # Look up for permission IDs
        graph_sp = self.cmd('ad sp show --id {microsoft_graph_api}').get_output_in_json()
        self.kwargs['microsoft_graph_sp_id'] = graph_sp['id']
        self.kwargs['microsoft_graph_permission1'] = _get_id_from_value(
            graph_sp['oauth2PermissionScopes'], self.kwargs['microsoft_graph_permission_value1'])
        self.kwargs['microsoft_graph_permission2'] = _get_id_from_value(
            graph_sp['oauth2PermissionScopes'], self.kwargs['microsoft_graph_permission_value2'])
    
        # TODO: support and test application permissions
        # self.kwargs['microsoft_graph_permission3'] = _get_id_from_value(
        #     graph_sp['appRoles'], self.kwargs['microsoft_graph_permission_value2'])
    
>       result = self.cmd('ad sp create-for-rbac --name {display_name}').get_output_in_json()
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/azure-cli/azure/cli/command_modules/role/tests/latest/test_graph.py:605: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
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)
Raw output
self = AzCliCommandParser(prog='az ad sp create-for-rbac', usage=None, description='', formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
action = _StoreAction(option_strings=['--display-name', '--name', '-n'], dest='display_name', nargs=None, const=None, default=N...ent, default to azure-cli-%Y-%m-%d-%H-%M-%S where the suffix is the time of creation.', metavar=None, deprecated=False)

    def _check_help(self, action):
        if action.help and hasattr(self, "_get_formatter"):
            formatter = self._get_formatter()
            try:
>               formatter._expand_help(action)

/opt/hostedtoolcache/Python/3.14.2/x64/lib/python3.14/argparse.py:1747: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <argparse.HelpFormatter object at 0x7f14720e62d0>
action = _StoreAction(option_strings=['--display-name', '--name', '-n'], dest='display_name', nargs=None, const=None, default=N...ent, default to azure-cli-%Y-%m-%d-%H-%M-%S where the suffix is the time of creation.', metavar=None, deprecated=False)

    def _expand_help(self, action):
        help_string = self._get_help_string(action)
        if '%' not in help_string:
            return help_string
        params = dict(vars(action), prog=self._prog)
        for name in list(params):
            value = params[name]
            if value is SUPPRESS:
                del params[name]
            elif hasattr(value, '__name__'):
                params[name] = value.__name__
        if params.get('choices') is not None:
            params['choices'] = ', '.join(map(str, params['choices']))
>       return help_string % params
               ^^^^^^^^^^^^^^^^^^^^
E       ValueError: unsupported format character 'Y' (0x59) at index 77

/opt/hostedtoolcache/Python/3.14.2/x64/lib/python3.14/argparse.py:678: ValueError

The above exception was the direct cause of the following exception:

self = <azure.cli.command_modules.role.tests.latest.test_graph.ApplicationScenarioTest testMethod=test_app_permission_grant>

    @AllowLargeResponse()
    def test_app_permission_grant(self):
        if not self._get_signed_in_user():
            return  # this test delete users which are beyond a SP's capacity, so quit...
        self.kwargs = {
            'display_name': self.create_random_name('cli-app-', 15),
            'microsoft_graph_api': '00000003-0000-0000-c000-000000000000',
            'microsoft_graph_permission_value1': 'Directory.Read.All',  # Delegated permission
            'microsoft_graph_permission_value2': 'Application.Read.All',  # Delegated permission
            # 'microsoft_graph_permission_value3': 'Application.ReadWrite.OwnedBy'  # Application permission
        }
    
        # Look up for permission IDs
        graph_sp = self.cmd('ad sp show --id {microsoft_graph_api}').get_output_in_json()
        self.kwargs['microsoft_graph_sp_id'] = graph_sp['id']
        self.kwargs['microsoft_graph_permission1'] = _get_id_from_value(
            graph_sp['oauth2PermissionScopes'], self.kwargs['microsoft_graph_permission_value1'])
        self.kwargs['microsoft_graph_permission2'] = _get_id_from_value(
            graph_sp['oauth2PermissionScopes'], self.kwargs['microsoft_graph_permission_value2'])
    
        # TODO: support and test application permissions
        # self.kwargs['microsoft_graph_permission3'] = _get_id_from_value(
        #     graph_sp['appRoles'], self.kwargs['microsoft_graph_permission_value2'])
    
>       result = self.cmd('ad sp create-for-rbac --name {display_name}').get_output_in_json()
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/azure-cli/azure/cli/command_modules/role/tests/latest/test_graph.py:605: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
... [The stack trace has been truncated as it exceeded the maximum allowed size. Please refer to the complete log available in the Test Run attachments for full details.]

Check failure on line 1 in test_create_for_rbac_argument_error

See this annotation in the file changed.

@azure-pipelines azure-pipelines / Azure.azure-cli Full Test

test_create_for_rbac_argument_error

self = AzCliCommandParser(prog='az ad sp create-for-rbac', usage=None, description='', formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
action = _StoreAction(option_strings=['--display-name', '--name', '-n'], dest='display_name', nargs=None, const=None, default=N...ent, default to azure-cli-%Y-%m-%d-%H-%M-%S where the suffix is the time of creation.', metavar=None, deprecated=False)

    def _check_help(self, action):
        if action.help and hasattr(self, "_get_formatter"):
            formatter = self._get_formatter()
            try:
>               formatter._expand_help(action)

/opt/hostedtoolcache/Python/3.14.2/x64/lib/python3.14/argparse.py:1747: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <argparse.HelpFormatter object at 0x7f14736b87d0>
action = _StoreAction(option_strings=['--display-name', '--name', '-n'], dest='display_name', nargs=None, const=None, default=N...ent, default to azure-cli-%Y-%m-%d-%H-%M-%S where the suffix is the time of creation.', metavar=None, deprecated=False)

    def _expand_help(self, action):
        help_string = self._get_help_string(action)
        if '%' not in help_string:
            return help_string
        params = dict(vars(action), prog=self._prog)
        for name in list(params):
            value = params[name]
            if value is SUPPRESS:
                del params[name]
            elif hasattr(value, '__name__'):
                params[name] = value.__name__
        if params.get('choices') is not None:
            params['choices'] = ', '.join(map(str, params['choices']))
>       return help_string % params
               ^^^^^^^^^^^^^^^^^^^^
E       ValueError: unsupported format character 'Y' (0x59) at index 77

/opt/hostedtoolcache/Python/3.14.2/x64/lib/python3.14/argparse.py:678: ValueError

The above exception was the direct cause of the following exception:

self = <azure.cli.command_modules.role.tests.latest.test_role.CreateForRbacScenarioTest testMethod=test_create_for_rbac_argument_error>

    def test_create_for_rbac_argument_error(self):
        self.kwargs.update({
            'scope': '/subscriptions/00000000-0000-0000-0000-000000000000',
            'role': 'Reader',
            'display_name': self.create_random_name('azure-cli-test-', 30)
        })
    
        # No role assignment argument
        # Without this line, no recording YAML will be generated. Playing back this test will make it live and fail
        # in CI because there is no logged in account.
>       self.kwargs['app_id'] = self.cmd(
            'ad sp create-for-rbac --display-name {display_name}').get_output_in_json()['appId']

src/azure-cli/azure/cli/command_modules/role/tests/latest/test_role.py:194: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
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:315: in _in_process_execute
    raise ex.exception
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:571: in execute
    self.parser.load_command_table(self.commands_loader)
src/azure-cli-core/azure/cli/core/parser.py:129: in load_command_table
    param = AzCliCommandParser._add_argument(command_parser, arg)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/knack/parser.py:64: in _add_argument
    return obj.add_argument(*scrubbed_options_list, **argparse_options)
           ^^^^^^^^^^^^^^^^^^^^
Raw output
self = AzCliCommandParser(prog='az ad sp create-for-rbac', usage=None, description='', formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
action = _StoreAction(option_strings=['--display-name', '--name', '-n'], dest='display_name', nargs=None, const=None, default=N...ent, default to azure-cli-%Y-%m-%d-%H-%M-%S where the suffix is the time of creation.', metavar=None, deprecated=False)

    def _check_help(self, action):
        if action.help and hasattr(self, "_get_formatter"):
            formatter = self._get_formatter()
            try:
>               formatter._expand_help(action)

/opt/hostedtoolcache/Python/3.14.2/x64/lib/python3.14/argparse.py:1747: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <argparse.HelpFormatter object at 0x7f14736b87d0>
action = _StoreAction(option_strings=['--display-name', '--name', '-n'], dest='display_name', nargs=None, const=None, default=N...ent, default to azure-cli-%Y-%m-%d-%H-%M-%S where the suffix is the time of creation.', metavar=None, deprecated=False)

    def _expand_help(self, action):
        help_string = self._get_help_string(action)
        if '%' not in help_string:
            return help_string
        params = dict(vars(action), prog=self._prog)
        for name in list(params):
            value = params[name]
            if value is SUPPRESS:
                del params[name]
            elif hasattr(value, '__name__'):
                params[name] = value.__name__
        if params.get('choices') is not None:
            params['choices'] = ', '.join(map(str, params['choices']))
>       return help_string % params
               ^^^^^^^^^^^^^^^^^^^^
E       ValueError: unsupported format character 'Y' (0x59) at index 77

/opt/hostedtoolcache/Python/3.14.2/x64/lib/python3.14/argparse.py:678: ValueError

The above exception was the direct cause of the following exception:

self = <azure.cli.command_modules.role.tests.latest.test_role.CreateForRbacScenarioTest testMethod=test_create_for_rbac_argument_error>

    def test_create_for_rbac_argument_error(self):
        self.kwargs.update({
            'scope': '/subscriptions/00000000-0000-0000-0000-000000000000',
            'role': 'Reader',
            'display_name': self.create_random_name('azure-cli-test-', 30)
        })
    
        # No role assignment argument
        # Without this line, no recording YAML will be generated. Playing back this test will make it live and fail
        # in CI because there is no logged in account.
>       self.kwargs['app_id'] = self.cmd(
            'ad sp create-for-rbac --display-name {display_name}').get_output_in_json()['appId']

src/azure-cli/azure/cli/command_modules/role/tests/latest/test_role.py:194: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
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:315: in _in_process_execute
    raise ex.exception
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:571: in execute
    self.parser.load_command_table(self.commands_loader)
src/azure-cli-core/azure/cli/core/parser.py:129: in load_command_table
    param = AzCliCommandParser._add_argument(command_parser, arg)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
en
... [The stack trace has been truncated as it exceeded the maximum allowed size. Please refer to the complete log available in the Test Run attachments for full details.]

Check failure on line 1 in test_group_scenario

See this annotation in the file changed.

@azure-pipelines azure-pipelines / Azure.azure-cli Full Test

test_group_scenario

self = AzCliCommandParser(prog='az ad sp create-for-rbac', usage=None, description='', formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
action = _StoreAction(option_strings=['--display-name', '--name', '-n'], dest='display_name', nargs=None, const=None, default=N...ent, default to azure-cli-%Y-%m-%d-%H-%M-%S where the suffix is the time of creation.', metavar=None, deprecated=False)

    def _check_help(self, action):
        if action.help and hasattr(self, "_get_formatter"):
            formatter = self._get_formatter()
            try:
>               formatter._expand_help(action)

/opt/hostedtoolcache/Python/3.14.2/x64/lib/python3.14/argparse.py:1747: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <argparse.HelpFormatter object at 0x7f14746c6510>
action = _StoreAction(option_strings=['--display-name', '--name', '-n'], dest='display_name', nargs=None, const=None, default=N...ent, default to azure-cli-%Y-%m-%d-%H-%M-%S where the suffix is the time of creation.', metavar=None, deprecated=False)

    def _expand_help(self, action):
        help_string = self._get_help_string(action)
        if '%' not in help_string:
            return help_string
        params = dict(vars(action), prog=self._prog)
        for name in list(params):
            value = params[name]
            if value is SUPPRESS:
                del params[name]
            elif hasattr(value, '__name__'):
                params[name] = value.__name__
        if params.get('choices') is not None:
            params['choices'] = ', '.join(map(str, params['choices']))
>       return help_string % params
               ^^^^^^^^^^^^^^^^^^^^
E       ValueError: unsupported format character 'Y' (0x59) at index 77

/opt/hostedtoolcache/Python/3.14.2/x64/lib/python3.14/argparse.py:678: ValueError

The above exception was the direct cause of the following exception:

self = <azure.cli.command_modules.role.tests.latest.test_graph.GroupScenarioTest testMethod=test_group_scenario>

    def test_group_scenario(self):
        if not self._get_signed_in_user():
            return  # this test delete users which are beyond a SP's capacity, so quit...
    
        domain = 'AzureSDKTeam.onmicrosoft.com'
        self.kwargs = {
            'group': self.create_random_name(prefix='testgroup', length=24),
            'mail_nick_name': 'deleteme11',
            'child_group': self.create_random_name(prefix='testchildgroup', length=24),
            'leaf_group': self.create_random_name(prefix='testleafgroup', length=24),
            'user1': self.create_random_name(prefix='testgroupuser1', length=24),
            'user2': self.create_random_name(prefix='testgroupuser2', length=24),
            'pass': 'Test1234!!',
            'domain': domain,
            'app_name': self.create_random_name(prefix='testgroupapp', length=24)
        }
    
        self.recording_processors.append(MSGraphNameReplacer('@' + domain, '@example.com'))
        try:
            # create group
            group_result = self.cmd(
                'ad group create --display-name {group} --mail-nickname {mail_nick_name} --description {group}',
                checks=[self.check('displayName', '{group}'),
                        self.check('mailNickname', '{mail_nick_name}'),
                        self.check('description', '{group}')]
            ).get_output_in_json()
            self.kwargs['group_id'] = group_result['id']
    
            # create again to test idempotency
            self.cmd('ad group create --display-name {group} --mail-nickname {mail_nick_name}')
            # list groups
            self.cmd('ad group list --display-name {group}', checks=self.check('length([])', 1))
            # show group
            self.cmd('ad group show -g {group}', checks=[
                self.check('id', '{group_id}'),
                self.check('displayName', '{group}'),
                self.check('mailNickname', '{mail_
Raw output
self = AzCliCommandParser(prog='az ad sp create-for-rbac', usage=None, description='', formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
action = _StoreAction(option_strings=['--display-name', '--name', '-n'], dest='display_name', nargs=None, const=None, default=N...ent, default to azure-cli-%Y-%m-%d-%H-%M-%S where the suffix is the time of creation.', metavar=None, deprecated=False)

    def _check_help(self, action):
        if action.help and hasattr(self, "_get_formatter"):
            formatter = self._get_formatter()
            try:
>               formatter._expand_help(action)

/opt/hostedtoolcache/Python/3.14.2/x64/lib/python3.14/argparse.py:1747: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <argparse.HelpFormatter object at 0x7f14746c6510>
action = _StoreAction(option_strings=['--display-name', '--name', '-n'], dest='display_name', nargs=None, const=None, default=N...ent, default to azure-cli-%Y-%m-%d-%H-%M-%S where the suffix is the time of creation.', metavar=None, deprecated=False)

    def _expand_help(self, action):
        help_string = self._get_help_string(action)
        if '%' not in help_string:
            return help_string
        params = dict(vars(action), prog=self._prog)
        for name in list(params):
            value = params[name]
            if value is SUPPRESS:
                del params[name]
            elif hasattr(value, '__name__'):
                params[name] = value.__name__
        if params.get('choices') is not None:
            params['choices'] = ', '.join(map(str, params['choices']))
>       return help_string % params
               ^^^^^^^^^^^^^^^^^^^^
E       ValueError: unsupported format character 'Y' (0x59) at index 77

/opt/hostedtoolcache/Python/3.14.2/x64/lib/python3.14/argparse.py:678: ValueError

The above exception was the direct cause of the following exception:

self = <azure.cli.command_modules.role.tests.latest.test_graph.GroupScenarioTest testMethod=test_group_scenario>

    def test_group_scenario(self):
        if not self._get_signed_in_user():
            return  # this test delete users which are beyond a SP's capacity, so quit...
    
        domain = 'AzureSDKTeam.onmicrosoft.com'
        self.kwargs = {
            'group': self.create_random_name(prefix='testgroup', length=24),
            'mail_nick_name': 'deleteme11',
            'child_group': self.create_random_name(prefix='testchildgroup', length=24),
            'leaf_group': self.create_random_name(prefix='testleafgroup', length=24),
            'user1': self.create_random_name(prefix='testgroupuser1', length=24),
            'user2': self.create_random_name(prefix='testgroupuser2', length=24),
            'pass': 'Test1234!!',
            'domain': domain,
            'app_name': self.create_random_name(prefix='testgroupapp', length=24)
        }
    
        self.recording_processors.append(MSGraphNameReplacer('@' + domain, '@example.com'))
        try:
            # create group
            group_result = self.cmd(
                'ad group create --display-name {group} --mail-nickname {mail_nick_name} --description {group}',
                checks=[self.check('displayName', '{group}'),
                        self.check('mailNickname', '{mail_nick_name}'),
                        self.check('description', '{group}')]
            ).get_output_in_json()
            self.kwargs['group_id'] = group_result['id']
    
            # create again to test idempotency
            self.cmd('ad group create --display-name {group} --mail-nickname {mail_nick_name}')
            # list groups
            self.cmd('ad group list --display-name {group}', checks=self.check('length([])', 1))
            # show group
            self.cmd('ad group show -g 
... [The stack trace has been truncated as it exceeded the maximum allowed size. Please refer to the complete log available in the Test Run attachments for full details.]