Skip to content

{ARM} Update azure-mgmt-resource SDK to latest#31162

Closed
jeskew wants to merge 10 commits intoAzure:devfrom
jeskew:update-azure-mgmt-resource-SDK
Closed

{ARM} Update azure-mgmt-resource SDK to latest#31162
jeskew wants to merge 10 commits intoAzure:devfrom
jeskew:update-azure-mgmt-resource-SDK

Conversation

@jeskew
Copy link
Copy Markdown
Contributor

@jeskew jeskew commented Mar 31, 2025

Related command
az deployment ...

Description

This PR updates the SDK version for the azure-mgmt-resource. Something about the Python SDK update seems to have caused a large number of tests to fail due to an incorrect Content-Length header in the recordings, so this PR updates those. My team has multiple features blocked on this update, so it is happening in an isolated PR with no feature changes.

Testing Guide

This PR relies on the existing tests.


This checklist is used to make sure that common guidelines for a pull request are followed.

@azure-client-tools-bot-prd
Copy link
Copy Markdown

azure-client-tools-bot-prd bot commented Mar 31, 2025

❌AzureCLI-FullTest
🔄acr
️✔️2020-09-01-hybrid
️✔️3.9
🔄latest
🔄3.12
🔄acs
️✔️2020-09-01-hybrid
️✔️3.9
🔄latest
🔄3.12
🔄advisor
🔄latest
🔄3.12
️✔️ams
️✔️latest
️✔️3.12
🔄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
🔄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.12
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.9
🔄latest
🔄3.12
🔄cosmosdb
🔄latest
🔄3.12
️✔️databoxedge
️✔️2020-09-01-hybrid
️✔️3.9
️✔️latest
️✔️3.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
️✔️2020-09-01-hybrid
️✔️3.9
🔄latest
🔄3.12
🔄keyvault
️✔️2018-03-01-hybrid
️✔️3.12
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.9
🔄latest
🔄3.12
️✔️lab
️✔️latest
️✔️3.12
🔄managedservices
🔄latest
🔄3.12
🔄maps
🔄latest
🔄3.12
️✔️marketplaceordering
️✔️latest
️✔️3.12
🔄monitor
🔄latest
🔄3.12
🔄mysql
🔄latest
🔄3.12
🔄netappfiles
🔄latest
🔄3.12
❌network
❌2018-03-01-hybrid
❌3.12
Type Test Case Error Message Line
Failed test_network_lb_sku 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:26
Failed test_network_lb 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:278
Failed test_network_lb_address_pool 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:432
Failed test_network_lb_nat_pools 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:408
Failed test_network_lb_probes 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:450
Failed test_network_vpn_gateway 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:1224
❌3.9
Type Test Case Error Message Line
Failed test_network_lb_sku 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:26
Failed test_network_lb 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:278
Failed test_network_lb_address_pool 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:432
Failed test_network_lb_nat_pools 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:408
Failed test_network_lb_probes 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:450
Failed test_network_vpn_gateway 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:1224
❌latest
❌3.12
Type Test Case Error Message Line
Failed test_ag_with_non_v2_sku self = <azure.cli.core.commands.AzCliCommandInvoker object at 0x7fd775882db0>
parsed_ns = 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))

    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)

env/lib/python3.12/site-packages/knack/invocation.py:111: 
 
 
 
 
 
 
                                  
src/azure-cli-core/azure/cli/core/commands/init.py:915: in validate_cmd_level
    cmd_validator(**self.build_kwargs(cmd_validator, ns))
src/azure-cli/azure/cli/command_modules/network/validators.py:543: in process_ag_create_namespace
    get_subnet_validator(has_type_field=True, allow_new=True)(cmd, namespace)
src/azure-cli/azure/cli/command_modules/network/validators.py:440: in complex_validator_with_type
    get_folded_parameter_validator(
src/azure-cli-core/azure/cli/core/commands/template_create.py:120: in validator
    if resource_exists(cmd.cli_ctx, **resource_id_parts):
src/azure-cli-core/azure/cli/core/commands/arm.py:186: in resource_exists
    existing = len(list(client.list(filter=odata_filter))) == 1
env/lib/python3.12/site-packages/azure/core/paging.py:123: in next
    return next(self.page_iterator)
env/lib/python3.12/site-packages/azure/core/paging.py:75: in next
    self.response = self.get_next(self.continuation_token)
env/lib/python3.12/site-packages/azure/mgmt/resource/resources/v2024_11_01/operations/operations.py:9109: in get_next
    pipeline_response: PipelineResponse = self.client.pipeline.run(  # pylint: disable=protected-access
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:229: in run
    return first_node.send(pipeline_request)
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:86: in send
    response = self.next.send(request)
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:86: in send
    response = self.next.send(request)
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:86: in send
    response = self.next.send(request)
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:86: in send
    response = self.next.send(request)
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:86: in send
    response = self.next.send(request)
env/lib/python3.12/site-packages/azure/mgmt/core/policies/base.py:47: in send
    response = self.next.send(request)
env/lib/python3.12/site-packages/azure/core/pipeline/policies/redirect.py:197: in send
    response = self.next.send(request)
env/lib/python3.12/site-packages/azure/core/pipeline/policies/retry.py:532: in send
    response = self.next.send(request)
env/lib/python3.12/site-packages/azure/core/pipeline/policies/authentication.py:147: in send
    response = self.next.send(request)
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:86: in send
    response = self.next.send(request)
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:86: in send
    response = self.next.send(request)
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:86: in send
    response = self.next.send(request)
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:86: in send
    response = self.next.send(request)
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:86: in send
    response = self.next.send(request)
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:118: in send
    self.sender.send(request.http_request, **request.context.options),
env/lib/python3.12/site-packages/azure/core/pipeline/transport/requests_basic.py:355: in send
    response = self.session.request(  # type: ignore
env/lib/python3.12/site-packages/requests/sessions.py:589: in request
    resp = self.send(prep, **send_kwargs)
env/lib/python3.12/site-packages/requests/sessions.py:703: in send
    r = adapter.send(request, **kwargs)
env/lib/python3.12/site-packages/requests/adapters.py:667: in send
    resp = conn.urlopen(
env/lib/python3.12/site-packages/urllib3/connectionpool.py:715: in urlopen
    httplib_response = self.make_request(
env/lib/python3.12/site-packages/urllib3/connectionpool.py:458: in make_request
    httplib_response = conn.getresponse(buffering=True)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
          

self = <vcr.patch.VCRRequestsHTTPSConnection/mnt/vss/work/1/s/src/azure-cli/azure/cli/command_modules/network/tests/latest/recordings/test_ag_with_non_v2_sku.yaml object at 0x7fd775031220>
 = False, kwargs = {'buffering': True}

    def getresponse(self, 
=False, **kwargs):
        """Retrieve the response"""
        # Check to see if the cassette has a response for this request. If so,
        # then return it
        if self.cassette.can_play_response_for(self.vcr_request):
            log.info(f"Playing response for {self.vcr_request} from cassette")
            response = self.cassette.play_response(self.vcr_request)
            return VCRHTTPResponse(response)
        else:
            if self.cassette.write_protected and self.cassette.filter_request(self.vcr_request):
>               raise CannotOverwriteExistingCassetteException(
                    cassette=self.cassette,
                    failed_request=self.vcr_request,
                )
E               vcr.errors.CannotOverwriteExistingCassetteException: Can't overwrite existing cassette ('/mnt/vss/work/1/s/src/azure-cli/azure/cli/command_modules/network/tests/latest/recordings/test_ag_with_non_v2_sku.yaml') in your current record mode ('once').
E               No match for the request (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resources?$filter=resourceGroup%20eq%20%27cli_test_ag_with_non_v2_sku_000001%27%20and%20name%20eq%20%27None%27%20and%20resourceType%20eq%20%27Microsoft.Network%2FvirtualNetworks%27&api-version=2024-11-01>)&nbsp;was&nbsp;found.
E               Found 3 similar requests with 1 different matcher(s) :
E               
E               1 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resources?$filter=resourceGroup%20eq%20%27cli_test_ag_with_non_v2_sku_000001%27%20and%20name%20eq%20%27None%27%20and%20resourceType%20eq%20%27Microsoft.Network%2FvirtualNetworks%27&api-version=2022-09-01>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               custom_request_query_matcher - assertion failure :
E               None
E               
E               2 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resources?$filter=resourceGroup%20eq%20%27cli_test_ag_with_non_v2_sku_000001%27%20and%20name%20eq%20%27None%27%20and%20resourceType%20eq%20%27Microsoft.Network/virtualNetworks%27&api-version=2022-09-01&$skiptoken=rZLBjpswFEX/hTULhySbSF2QQigI20rqCbV3KKDAM5BRcETwqP9e0zAzrURUCXVrWefdd995s5r8ruKyka21ebO6vFX57Xp5za2NlffRTfwoEEt2feoc%2BxAuJa65I7yXNdG%2Bwnon6XeESH2EmMlO1FhRlpVEZ5Ky853rbR026ItlW%2B3lpopT3qhrWt3MpEm2qHc1Z4cSB6HCib8mAzvxVzGrpADXzOMLAvslAVEKz%2B1Gdp626ikTey8918cKm2xES8QNEweHOk6ikkNo8hqqDjvK%2BBp7PhqZkL6mzQB%2BEpVAIc33FWcnxZ29Q3qEuHbXMTsvhhpETSpRHwuaHGqu%2BX3EDvU%2Bj8r2KxxwhLVZP4gAlyYqZKbaqiDarA/bggZCEpaBAH/xZ7VD1LQt02dxdQUE3CWHvRJw7odmsRdVJm7PE18R2ALXckk9fqdeASP6XwfDzByChb3wDIJFFf6KEA12plx/KTyzBTt1NIhK4oQLzlz9G/vT/lSONt8uVWbEGx9xepX51Szx6eHmf1lo/%2B3gJHeOgfbDv0neHPvsD/cmkXPMsx/eTfLwDOseVb47N4klM4yzP3ybRM6z7Rc%3D>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               custom_request_query_matcher - assertion failure :
E               None
E               
E               3 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resources?$filter=resourceGroup%20eq%20%27cli_test_ag_with_non_v2_sku_000001%27%20and%20name%20eq%20%27None%27%20and%20resourceType%20eq%20%27Microsoft.Network/virtualNetworks%27&api-version=2022-09-01&$skiptoken=rc9BC4IwGMbx77Kzh7E6CR0EtZSmSCPbexs5UGcTdGIz%2Bu5ZRBF0iq7v4f%2B8vwvS8my2lVY9ci%2BobwdTStEb0VcCuUjaeIBDiVkeWkH2Nqrbik9FCXk0gq9MQsIKdhin6/1py9TEWWYSFpzBL1TqeyMwUJHGK%2BSgo9SmE80w73zNUnZcwiluaB0ZqDnhFmPIA3vP0skzlCRlsg4Vr4ORk2zxyF6d9/%2Bp3rRNMSueRyo6Jbt57QPl/ovkvEBfk79xbg%3D%3D>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               custom_request_query_matcher - assertion failure :
E               None

env/lib/python3.12/site-packages/vcr/stubs/init.py:264: CannotOverwriteExistingCassetteException

During handling of the above exception, another exception occurred:

self = <azure.cli.command_modules.network.tests.latest.test_network_commands.NetworkAppGatewayDefaultScenarioTest testMethod=test_ag_with_non_v2_sku>

    @ResourceGroupPreparer(name_prefix="cli_test_ag_with_non_v2_sku
", location="westus")
    def test_ag_with_non_v2_sku(self):
        self.kwargs.update({
            "ag_name": self.create_random_name("ag-", 12),
            "port_name": self.create_random_name("port-", 12),
            "lisener_name": self.create_random_name("lisener-", 12),
            "rule_name": self.create_random_name("rule-", 12),
        })
    
>       self.cmd("network application-gateway create -n {ag_name} -g {rg} --sku WAF_Medium")

src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:830: 
 
 
 
 
 
 
 
                                 
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:302: 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:654: 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 network application-gateway create', 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.9/x64/lib/python3.12/argparse.py:2637: SystemExit
azure/cli/command_modules/network/tests/latest/test_network_commands.py:820
Failed test_network_app_gateway_with_defaults self = <azure.cli.core.commands.AzCliCommandInvoker object at 0x7fd7753f3530>
parsed_ns = 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))

    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)

env/lib/python3.12/site-packages/knack/invocation.py:111: 
 
 
 
 
 
 
                                  
src/azure-cli-core/azure/cli/core/commands/init.py:915: in validate_cmd_level
    cmd_validator(**self.build_kwargs(cmd_validator, ns))
src/azure-cli/azure/cli/command_modules/network/validators.py:543: in process_ag_create_namespace
    get_subnet_validator(has_type_field=True, allow_new=True)(cmd, namespace)
src/azure-cli/azure/cli/command_modules/network/validators.py:440: in complex_validator_with_type
    get_folded_parameter_validator(
src/azure-cli-core/azure/cli/core/commands/template_create.py:120: in validator
    if resource_exists(cmd.cli_ctx, **resource_id_parts):
src/azure-cli-core/azure/cli/core/commands/arm.py:186: in resource_exists
    existing = len(list(client.list(filter=odata_filter))) == 1
env/lib/python3.12/site-packages/azure/core/paging.py:123: in next
    return next(self.page_iterator)
env/lib/python3.12/site-packages/azure/core/paging.py:75: in next
    self.response = self.get_next(self.continuation_token)
env/lib/python3.12/site-packages/azure/mgmt/resource/resources/v2024_11_01/operations/operations.py:9109: in get_next
    pipeline_response: PipelineResponse = self.client.pipeline.run(  # pylint: disable=protected-access
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:229: in run
    return first_node.send(pipeline_request)
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:86: in send
    response = self.next.send(request)
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:86: in send
    response = self.next.send(request)
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:86: in send
    response = self.next.send(request)
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:86: in send
    response = self.next.send(request)
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:86: in send
    response = self.next.send(request)
env/lib/python3.12/site-packages/azure/mgmt/core/policies/base.py:47: in send
    response = self.next.send(request)
env/lib/python3.12/site-packages/azure/core/pipeline/policies/redirect.py:197: in send
    response = self.next.send(request)
env/lib/python3.12/site-packages/azure/core/pipeline/policies/retry.py:532: in send
    response = self.next.send(request)
env/lib/python3.12/site-packages/azure/core/pipeline/policies/authentication.py:147: in send
    response = self.next.send(request)
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:86: in send
    response = self.next.send(request)
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:86: in send
    response = self.next.send(request)
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:86: in send
    response = self.next.send(request)
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:86: in send
    response = self.next.send(request)
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:86: in send
    response = self.next.send(request)
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:118: in send
    self.sender.send(request.http_request, **request.context.options),
env/lib/python3.12/site-packages/azure/core/pipeline/transport/requests_basic.py:355: in send
    response = self.session.request(  # type: ignore
env/lib/python3.12/site-packages/requests/sessions.py:589: in request
    resp = self.send(prep, **send_kwargs)
env/lib/python3.12/site-packages/requests/sessions.py:703: in send
    r = adapter.send(request, **kwargs)
env/lib/python3.12/site-packages/requests/adapters.py:667: in send
    resp = conn.urlopen(
env/lib/python3.12/site-packages/urllib3/connectionpool.py:715: in urlopen
    httplib_response = self.make_request(
env/lib/python3.12/site-packages/urllib3/connectionpool.py:458: in make_request
    httplib_response = conn.getresponse(buffering=True)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
          

self = <vcr.patch.VCRRequestsHTTPSConnection/mnt/vss/work/1/s/src/azure-cli/azure/cli/command_modules/network/tests/latest/recordings/test_network_app_gateway_with_defaults.yaml object at 0x7fd77501f590>
 = False, kwargs = {'buffering': True}

    def getresponse(self, 
=False, **kwargs):
        """Retrieve the response"""
        # Check to see if the cassette has a response for this request. If so,
        # then return it
        if self.cassette.can_play_response_for(self.vcr_request):
            log.info(f"Playing response for {self.vcr_request} from cassette")
            response = self.cassette.play_response(self.vcr_request)
            return VCRHTTPResponse(response)
        else:
            if self.cassette.write_protected and self.cassette.filter_request(self.vcr_request):
>               raise CannotOverwriteExistingCassetteException(
                    cassette=self.cassette,
                    failed_request=self.vcr_request,
                )
E               vcr.errors.CannotOverwriteExistingCassetteException: Can't overwrite existing cassette ('/mnt/vss/work/1/s/src/azure-cli/azure/cli/command_modules/network/tests/latest/recordings/test_network_app_gateway_with_defaults.yaml') in your current record mode ('once').
E               No match for the request (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resources?$filter=resourceGroup%20eq%20%27cli_test_ag_basic000001%27%20and%20name%20eq%20%27None%27%20and%20resourceType%20eq%20%27Microsoft.Network%2FvirtualNetworks%27&api-version=2024-11-01>)&nbsp;was&nbsp;found.
E               Found 3 similar requests with 1 different matcher(s) :
E               
E               1 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resources?$filter=resourceGroup%20eq%20%27cli_test_ag_basic000001%27%20and%20name%20eq%20%27None%27%20and%20resourceType%20eq%20%27Microsoft.Network%2FvirtualNetworks%27&api-version=2022-09-01>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               custom_request_query_matcher - assertion failure :
E               None
E               
E               2 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resources?$filter=resourceGroup%20eq%20%27cli_test_ag_basic000001%27%20and%20name%20eq%20%27None%27%20and%20resourceType%20eq%20%27Microsoft.Network/virtualNetworks%27&api-version=2022-09-01&$skiptoken=rZLBbqMwEED/hTMHQ5JLpD1klyQLwrZAJq59QykqGEyq4IhA1X/v0NBWlciuFu3Vh%2Bc3M%2B/FqrOrCYu6bKz1i9Vmjcku59NzZq2trAsu8iFHjO%2B61D10vjoVxPup8T5Woj8a3AcV%2BYUQ7p%2BWId8uiBYG7xMkVFVQLyiJipBfox%2BWbTWni8mPWW3OaXWBnybZmMUK6wRJtTVC4w53CBFghezJkcAWXCyIl6woK1upImdkZ2lj/sDcILr3Wwy%2BwpUFBV%2BhZRXyoBTwD%2B43LjAdwY5XyuNiZKr0Oa0H8B1VyjYt5b4LGgaraElAFZR7WMMK860h/FASHrnUK6%2BUkWrEDuu9qwqaruTYgfEMZUEugCkHJstzyTCMH5dY73LiJivi7j6Y76sdVNOmSO/oit5vpUc0BTWsdvmwBRjBCWEEoiNDvEpR71ETFWjJD/mo%2B7eDgfGCsrgS2jdyf1CkgBiYP2CX2BVG8uQq1HGJGaD59nawV/srOVr/PlWPEN74iNNzmZ1hiK8O1/%2BrQvt7g5PcOQXat/7u8P69PvuzvUnknPLsW3fTvBnV3Vb50dwkdk5x9mdvk8h5tb0B>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               custom_request_query_matcher - assertion failure :
E               None
E               
E               3 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resources?$filter=resourceGroup%20eq%20%27cli_test_ag_basic000001%27%20and%20name%20eq%20%27None%27%20and%20resourceType%20eq%20%27Microsoft.Network/virtualNetworks%27&api-version=2022-09-01&$skiptoken=rY9NC4IwAIb/y84exOwidBCmpThHpNm8jRo5PyboBDfpvzciiqBTdH0Pz/M%2BCxBslgkXzQi8BYz9JCtGR0lHToEHmIqn8lTZWREq6hxVVPccwcBFNVEYRjKFVUeUbeMtcZOs5UQTiYq9TvV1xtuQp3XVRMLeAAucmZADbSfj%2BYpNu7gts3yFitxgiSoPBgv9OSlCo/TNduwwRGuiA4foaH5gb9b7Pxa7vr2YiueI6NCwwdg%2Borx/JVmvoK/I33Lu>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               custom_request_query_matcher - assertion failure :
E               None

env/lib/python3.12/site-packages/vcr/stubs/init.py:264: CannotOverwriteExistingCassetteException

During handling of the above exception, another exception occurred:

self = <azure.cli.command_modules.network.tests.latest.test_network_commands.NetworkAppGatewayDefaultScenarioTest testMethod=test_network_app_gateway_with_defaults>
resource_group = 'cli_test_ag_basic000001'

    @ResourceGroupPreparer(name_prefix='cli_test_ag_basic')
    def test_network_app_gateway_with_defaults(self, resource_group):
>       self.cmd('network application-gateway create -g {rg} -n ag1 --priority 1001 --no-wait')

src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:771: 
 
 
 
 
 
 
 
 
                                
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:302: 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:654: 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 network application-gateway create', 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.9/x64/lib/python3.12/argparse.py:2637: SystemExit
azure/cli/command_modules/network/tests/latest/test_network_commands.py:768
Failed test_network_app_gateway_with_waf_v2_sku The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:799
Failed test_network_appgw_creation_with_public_and_private_ip The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:845
Failed test_network_app_gateway_with_cert_name The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:951
Failed test_network_app_gateway_with_trusted_client_cert The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:1003
Failed test_network_app_gateway_with_ssl_profile The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:1041
Failed test_network_ag_zone The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:1091
Failed test_network_ag_auth_cert The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:1111
Failed test_network_ag_root_cert The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:1153
Failed test_network_app_gateway_redirect_config The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:1192
Failed test_network_app_gateway_with_existing_subnet The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:1228
Failed test_network_app_gateway_no_wait The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:1246
Failed test_appgw_with_tcp The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:1342
Failed test_network_app_gateway_with_private_ip The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:1272
Failed test_ag_rule_default_exists The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:1807
Failed test_network_ag_address_pool The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:1394
Failed test_network_ag_frontend_ip_private The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:1472
Failed test_network_ag_frontend_ip_public The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:1443
Failed test_network_ag_frontend_port The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:1419
Failed test_network_ag_http_listener The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:1503
Failed test_network_ag_http_listener_with_multi_host_names The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:1563
Failed test_network_ag_http_listener_with_waf_policy The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:1525
Failed test_network_ag_http_settings The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:1598
Failed test_network_ag_listener The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:1944
Failed test_network_ag_listener_with_host_names The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:1988
Failed test_network_ag_probe The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:1634
Failed test_network_ag_probe_with_host_name_from_settings The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:1701
Failed test_network_ag_routing_rule The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:2107
Failed test_network_ag_rule The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:1758
Failed test_network_ag_settings The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:2061
Failed test_network_ag_url_path_map The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:1858
Failed test_network_ag_url_path_map_edge_case The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:1905
Failed test_network_app_gateway_rewrite_rulesets The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:2174
Failed test_network_app_gateway_with_public_ip The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:2269
Failed test_network_app_gateway_waf_policy_with_application_gateway The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:2317
Failed test_network_public_ip_ddos_settings The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:3117
Failed test_network_cross_region_lb The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:3573
Failed test_network_cross_region_lb_address_pool The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:3655
Failed test_network_cross_region_lb_address_pool_addresses The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:3677
Failed test_network_cross_region_lb_rules The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:3738
Failed test_network_cross_region_load_balancer_ip_config The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:3630
Failed test_network_lb The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:3775
Failed test_network_load_balancer_ip_config The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:3880
Failed test_network_load_balancer_outbound_rules The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:3921
Failed test_network_lb_address_pool The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:4054
Failed test_network_lb_address_pool_addresses The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:4097
Failed test_network_lb_address_pool_with_sync_mode The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:4072
Failed test_network_lb_nat_pools The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:4028
Failed test_network_lb_nat_rules The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:3968
Failed test_network_lb_nat_rules_v2 The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:3993
Failed test_network_lb_nat_rules_v3 The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:4007
Failed test_network_lb_port_mapping The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:4268
Failed test_network_lb_probes The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:4192
Failed test_network_lb_rules The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:4234
Failed test_network_nic The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:4337
Failed test_network_nic_app_gateway The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:4460
Failed test_network_nic_ag_address_pools The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:4659
Failed test_network_nic_lb_address_pools The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:4633
Failed test_network_nic_subresources The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:4514
Failed test_network_lb_edge_zone The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:7176
Failed test_network_private_endpoint_edge_zone The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:7291
Failed test_network_lb_front_ip The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:7354
Failed test_network_lb_rule_backend_address_pools The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:7441
Failed test_network_lb_tunnel_interface The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:7322
Failed test_network_nic_front_ip The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_network_commands.py:7408
Failed test_appgw_private_endpoint_with_default The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_private_endpoint_commands.py:1603
Failed test_appgw_private_endpoint_with_overwrite_default The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_private_endpoint_commands.py:1690
Failed test_manage_appgw_private_endpoint_without_standard The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_private_endpoint_commands.py:1981
Failed test_private_link_ip_config The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_private_endpoint_commands.py:1934
Failed test_private_endpoint_connection_powerbi_ignoreReject The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_private_endpoint_commands.py:2763
Failed test_private_endpoint_pls The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_private_endpoint_commands.py:3517
Failed test_chsm_private_endpoint_connection The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_private_endpoint_commands.py:4182
Failed test_chsm_private_link_resource The error message is too long, please check the pipeline log for details. azure/cli/command_modules/network/tests/latest/test_private_endpoint_commands.py:4160
🔄policyinsights
🔄latest
🔄3.12
🔄privatedns
🔄latest
🔄3.12
🔄profile
🔄latest
🔄3.12
🔄rdbms
🔄latest
🔄3.12
️✔️redis
️✔️latest
️✔️3.12
🔄relay
🔄latest
🔄3.12
❌resource
❌2018-03-01-hybrid
❌3.12
Type Test Case Error Message Line
Failed test_resource_scenario self = <urllib3.response.HTTPResponse object at 0x7fc25c4db490>

    @contextmanager
    def error_catcher(self):
        """
        Catch low-level python exceptions, instead re-raising urllib3
        variants, so that low-level exceptions are not leaked in the
        high-level api.
    
        On exit, release the connection back to the pool.
        """
        clean_exit = False
    
        try:
            try:
>               yield

env/lib/python3.12/site-packages/urllib3/response.py:444: 
                                        

self = <urllib3.response.HTTPResponse object at 0x7fc25c4db490>, amt = 4096
decode_content = True, cache_content = False

    def read(self, amt=None, decode_content=None, cache_content=False):
        """
        Similar to :meth:http.client.HTTPResponse.read, but with two additional
        parameters: decode_content and cache_content.
    
        :param amt:
            How much of the content to read. If specified, caching is skipped
            because it doesn't make sense to cache partial content as the full
            response.
    
        :param decode_content:
            If True, will attempt to decode the body based on the
            'content-encoding' header.
    
        :param cache_content:
            If True, will save the returned data such that the same result is
            returned despite of the state of the underlying file object. This
            is useful if you want the .data property to continue working
            after having .read() the file object. (Overridden if amt is
            set.)
        """
        self.init_decoder()
        if decode_content is None:
            decode_content = self.decode_content
    
        if self.fp is None:
            return
    
        flush_decoder = False
        fp_closed = getattr(self.fp, "closed", False)
    
        with self.error_catcher():
            data = self.fp_read(amt) if not fp_closed else b""
            if amt is None:
                flush_decoder = True
            else:
                cache_content = False
                if (
                    amt != 0 and not data
                ):  # Platform-specific: Buggy versions of Python.
                    # Close the connection when no data is returned
                    #
                    # This is redundant to what httplib/http.client should
                    # already do.  However, versions of python released before
                    # December 15, 2012 (http://bugs.python.org/issue16298)&nbsp;do
                    # not properly close the connection in all cases. There is
                    # no harm in redundantly calling close.
                    self.fp.close()
                    flush_decoder = True
                    if self.enforce_content_length and self.length_remaining not in (
                        0,
                        None,
                    ):
                        # This is an edge case that httplib failed to cover due
                        # to concerns of backward compatibility. We're
                        # addressing it here to make sure IncompleteRead is
                        # raised during streaming, so all calls with incorrect
                        # Content-Length are caught.
>                       raise IncompleteRead(self.fp_bytes_read, self.length_remaining)
E                       urllib3.exceptions.IncompleteRead: IncompleteRead(1357 bytes read, 177 more expected)

env/lib/python3.12/site-packages/urllib3/response.py:593: IncompleteRead

During handling of the above exception, another exception occurred:

    def generate():
        # Special case for urllib3.
        if hasattr(self.raw, "stream"):
            try:
>               yield from self.raw.stream(chunk_size, decode_content=True)

env/lib/python3.12/site-packages/requests/models.py:820: 
 
 
 
 
 
 
 
                                 
env/lib/python3.12/site-packages/urllib3/response.py:628: in stream
    data = self.read(amt=amt, decode_content=decode_content)
env/lib/python3.12/site-packages/urllib3/response.py:566: in read
    with self.error_catcher():
/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/contextlib.py:158: in exit
    self.gen.throw(value)
                                        

self = <urllib3.response.HTTPResponse object at 0x7fc25c4db490>

    @contextmanager
    def error_catcher(self):
        """
        Catch low-level python exceptions, instead re-raising urllib3
        variants, so that low-level exceptions are not leaked in the
        high-level api.
    
        On exit, release the connection back to the pool.
        """
        clean_exit = False
    
        try:
            try:
                yield
    
            except SocketTimeout:
                # FIXME: Ideally we'd like to include the url in the ReadTimeoutError but
                # there is yet no clean way to get at it from this context.
                raise ReadTimeoutError(self.pool, None, "Read timed out.")
    
            except BaseSSLError as e:
                # FIXME: Is there a better way to differentiate between SSLErrors?
                if "read operation timed out" not in str(e):
                    # SSL errors related to framing/MAC get wrapped and reraised here
                    raise SSLError(e)
    
                raise ReadTimeoutError(self.pool, None, "Read timed out.")
    
            except (HTTPException, SocketError) as e:
                # This includes IncompleteRead.
>               raise ProtocolError("Connection broken: %r" % e, e)
E               urllib3.exceptions.ProtocolError: ('Connection broken: IncompleteRead(1357 bytes read, 177 more expected)', IncompleteRead(1357 bytes read, 177 more expected))

env/lib/python3.12/site-packages/urllib3/response.py:461: ProtocolError

During handling of the above exception, another exception occurred:

self = <azure.core.pipeline.transport.requests_basic.StreamDownloadGenerator object at 0x7fc25c46a3f0>

    def next(self):
        internal_response = self.response.internal_response
        try:
>           chunk = next(self.iter_content_func)

env/lib/python3.12/site-packages/azure/core/pipeline/transport/requests_basic.py:177: 
 
 
 
 
 
                                   

    def generate():
        # Special case for urllib3.
        if hasattr(self.raw, "stream"):
            try:
                yield from self.raw.stream(chunk_size, decode_content=True)
            except ProtocolError as e:
>               raise ChunkedEncodingError(e)
E               requests.exceptions.ChunkedEncodingError: ('Connection broken: IncompleteRead(1357 bytes read, 177 more expected)', IncompleteRead(1357 bytes read, 177 more expected))

env/lib/python3.12/site-packages/requests/models.py:822: ChunkedEncodingError

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

self = <azure.cli.command_modules.resource.tests.hybrid_2018_03_01.test_resource.ResourceScenarioTest testMethod=test_resource_scenario>
resource_group = 'cli_test_resource_scenario000001'
resource_group_location = 'southcentralus'

    @ResourceGroupPreparer(name_prefix='cli_test_resource_scenario', location='southcentralus')
    @AllowLargeResponse()
    def test_resource_scenario(self, resource_group, resource_group_location):
        self.kwargs.update({
            'loc': resource_group_location,
            'vnet': self.create_random_name('vnet-', 30),
            'subnet': self.create_random_name('subnet-', 30),
            'rt': 'Microsoft.Network/virtualNetworks'
        })
        vnet_count = self.cmd("resource list --query "length([?name=='{vnet}'])"").get_output_in_json() or 0
        self.cmd('network vnet create -g {rg} -n {vnet} --subnet-name {subnet} --tags cli-test=test')
        vnet_count += 1
    
        self.cmd('resource list',
                 checks=self.check("length([?name=='{vnet}'])", vnet_count))
        self.cmd('resource list -l {loc}',
                 checks=self.check("length([?location == '{loc}']) == length(@)", True))
        self.cmd('resource list --resource-type {rt}',
                 checks=self.check("length([?name=='{vnet}'])", vnet_count))
        self.cmd('resource list --name {vnet}', checks=[
            self.check("length([?name=='{vnet}'])", vnet_count),
            self.check('[0].provisioningState', 'Succeeded')
        ])
        self.cmd('resource list --tag cli-test',
                 checks=self.check("length([?name=='{vnet}'])", vnet_count))
        self.cmd('resource list --tag cli-test=test',
                 checks=self.check("length([?name=='{vnet}'])", vnet_count))
    
        # check for simple resource with tag
        self.cmd('resource show -n {vnet} -g {rg} --resource-type Microsoft.Network/virtualNetworks', checks=[
            self.check('name', '{vnet}'),
            self.check('location', '{loc}'),
            self.check('resourceGroup', '{rg}'),
            self.check('tags', {'cli-test': 'test'})
        ])
        # check for child resource
        self.cmd('resource show -n {subnet} -g {rg} --namespace Microsoft.Network --parent virtualNetworks/{vnet} --resource-type subnets', checks=[
            self.check('name', '{subnet}'),
            self.check('resourceGroup', '{rg}')
        ])
    
        # clear tag and verify
>       self.cmd('resource tag -n {vnet} -g {rg} --resource-type Microsoft.Network/virtualNetworks --tags')

src/azure-cli/azure/cli/command_modules/resource/tests/hybrid_2018_03_01/test_resource.py:104: 
                                        
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:666: in execute
    raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:734: in run_jobs_serially
    results.append(self.run_job(expanded_arg, cmd_copy))
src/azure-cli-core/azure/cli/core/commands/init.py:703: in run_job
    result = cmd_copy(params)
src/azure-cli-core/azure/cli/core/commands/init.py:336: in call
    return self.handler(*args, **kwargs)
src/azure-cli-core/azure/cli/core/commands/command_operation.py:120: in handler
    return op(**command_args)
src/azure-cli/azure/cli/command_modules/resource/custom.py:2188: in tag_resource
    get_rsrc_util_from_parsed_id(cmd.cli_ctx, id_dict, api_version, latest_include_preview).tag(
src/azure-cli/azure/cli/command_modules/resource/custom.py:4509: in tag
    return self.rcf.resources.begin_create_or_update(self.resource_group_name,
env/lib/python3.12/site-packages/azure/core/tracing/decorator.py:94: in wrapper_use_tracer
    return func(*args, **kwargs)
env/lib/python3.12/site-packages/azure/mgmt/resource/resources/v2018_02_01/operations/operations.py:3409: in begin_create_or_update
    raw_result.http_response.read()  # type: ignore
env/lib/python3.12/site-packages/azure/core/rest/http_response_impl.py:407: in read
    self.content = b"".join(self.iter_bytes())
env/lib/python3.12/site-packages/azure/core/rest/http_response_impl.py:423: in iter_bytes
    yield from self.stream_download_generator(
 
 
 
 
 
 
 
 
 
 
                             _ 

self = <azure.core.pipeline.transport._requests_basic.StreamDownloadGenerator object at 0x7fc25c46a3f0>

    def next(self):
        internal_response = self.response.internal_response
        try:
            chunk = next(self.iter_content_func)
            if not chunk:
                raise StopIteration()
            return chunk
        except StopIteration:
            internal_response.close()
            raise StopIteration()  # pylint: disable=raise-missing-from
        except requests.exceptions.StreamConsumedError:
            raise
        except requests.exceptions.ContentDecodingError as err:
            raise DecodeError(err, error=err) from err
        except requests.exceptions.ChunkedEncodingError as err:
            msg = err.str()
            if "IncompleteRead" in msg:
                _LOGGER.warning("Incomplete download: %s", err)
                internal_response.close()
>               raise IncompleteReadError(err, error=err) from err
E               azure.core.exceptions.IncompleteReadError: ('Connection broken: IncompleteRead(1357 bytes read, 177 more expected)', IncompleteRead(1357 bytes read, 177 more expected))

env/lib/python3.12/site-packages/azure/core/pipeline/transport/_requests_basic.py:193: IncompleteReadError
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_group_deployment self = <azure.cli.testsdk.base.ExecutionResult object at 0x7fc25c62c800>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7fc25e97c170>
command = 'group deployment create -g cli_test_deployment000001 -n azure-cli-deployment --template-file "/mnt/vss/work/1/s/src/...sPools=@"/mnt/vss/work/1/s/src/azure-cli/azure/cli/command_modules/resource/tests/hybrid_2018_03_01/test-object.json"'
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 = AttributeError("'NoneType' object has no attribute 'internal_response'")
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 AttributeError 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.resource.tests.hybrid_2018_03_01.test_resource.DeploymentTest testMethod=test_group_deployment>
resource_group = 'cli_test_deployment000001'

    @ResourceGroupPreparer(name_prefix='cli_test_deployment')
    def test_group_deployment(self, resource_group):
        curr_dir = os.path.dirname(os.path.realpath(file))
        self.kwargs.update({
            'tf': os.path.join(curr_dir, 'test-template.json').replace('\', '\\'),
            'params': os.path.join(curr_dir, 'test-params.json').replace('\', '\\'),
            'of': os.path.join(curr_dir, 'test-object.json').replace('\', '\\'),
            'dn': 'azure-cli-deployment'
        })
        self.kwargs['subnet_id'] = self.cmd('network vnet create -g {rg} -n vnet1 --subnet-name subnet1').get_output_in_json()['newVNet']['subnets'][0]['id']
    
        self.cmd('group deployment validate -g {rg} --template-file "{tf}" --parameters @"{params}" --parameters subnetId="{subnet_id}" --parameters backendAddressPools=@"{of}"', checks=[
            self.check('properties.provisioningState', 'Succeeded')
        ])
    
>       self.cmd('group deployment create -g {rg} -n {dn} --template-file "{tf}" --parameters @"{params}" --parameters subnetId="{subnet_id}" --parameters backendAddressPools=@"{of}"', checks=[
            self.check('properties.provisioningState', 'Succeeded'),
            self.check('resourceGroup', '{rg}')
        ])

src/azure-cli/azure/cli/command_modules/resource/tests/hybrid_2018_03_01/test_resource.py:283: 
 
                                       
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:666: in execute
    raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:734: in run_jobs_serially
    results.append(self.run_job(expanded_arg, cmd_copy))
src/azure-cli-core/azure/cli/core/commands/init.py:726: in run_job
    return cmd_copy.exception_handler(ex)
 
 
 
 
                                   _ 

ex = IncompleteReadError("('Connection broken: IncompleteRead(1071 bytes read, 100 more expected)', IncompleteRead(1071 bytes read, 100 more expected))")

    def handle_template_based_exception(ex):
        try:
            raise CLIError(ex.inner_exception.error.message)
        except AttributeError:
            if hasattr(ex, 'response'):
>               raise_subdivision_deployment_error(ex.response.internal_response.text, ex.error.code if ex.error else None)
E               AttributeError: 'NoneType' object has no attribute 'internal_response'

src/azure-cli-core/azure/cli/core/commands/arm.py:112: AttributeError
azure/cli/command_modules/resource/tests/hybrid_2018_03_01/test_resource.py:267
Failed test_group_deployment_lite self = <azure.cli.testsdk.base.ExecutionResult object at 0x7fc25e42be60>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7fc25e780260>
command = 'group deployment create -g cli_test_deployment_lite000001 -n azure-cli-deployment000002 --template-file "/mnt/vss/work/1/s/src/azure-cli/azure/cli/command_modules/resource/tests/hybrid_2018_03_01/test-template-lite.json"'
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 = AttributeError("'NoneType' object has no attribute 'internal_response'")
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 AttributeError 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.resource.tests.hybrid_2018_03_01.test_resource.DeploymentTest testMethod=test_group_deployment_lite>
resource_group = 'cli_test_deployment_lite000001'

    @ResourceGroupPreparer(name_prefix='cli_test_deployment_lite')
    def test_group_deployment_lite(self, resource_group):
        # ensures that a template that is missing "parameters" or "resources" still deploys
        curr_dir = os.path.dirname(os.path.realpath(file))
    
        self.kwargs.update({
            'tf': os.path.join(curr_dir, 'test-template-lite.json').replace('\', '\\'),
            'dn': self.create_random_name('azure-cli-deployment', 30)
        })
    
>       self.cmd('group deployment create -g {rg} -n {dn} --template-file "{tf}"', checks=[
            self.check('properties.provisioningState', 'Succeeded'),
            self.check('resourceGroup', '{rg}')
        ])

src/azure-cli/azure/cli/command_modules/resource/tests/hybrid_2018_03_01/test_resource.py:263: 
                                        
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:666: in execute
    raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:734: in run_jobs_serially
    results.append(self.run_job(expanded_arg, cmd_copy))
src/azure-cli-core/azure/cli/core/commands/init.py:726: in run_job
    return cmd_copy.exception_handler(ex)
 
 
 
 
 
                                   

ex = IncompleteReadError("('Connection broken: IncompleteRead(472 bytes read, 53 more expected)', IncompleteRead(472 bytes read, 53 more expected))")

    def handle_template_based_exception(ex):
        try:
            raise CLIError(ex.inner_exception.error.message)
        except AttributeError:
            if hasattr(ex, 'response'):
>               raise_subdivision_deployment_error(ex.response.internal_response.text, ex.error.code if ex.error else None)
E               AttributeError: 'NoneType' object has no attribute 'internal_response'

src/azure-cli-core/azure/cli/core/commands/arm.py:112: AttributeError
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_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
❌3.9
Type Test Case Error Message Line
Failed test_resource_scenario self = <urllib3.response.HTTPResponse object at 0x7f4ed1b8f4c0>

    @contextmanager
    def error_catcher(self):
        """
        Catch low-level python exceptions, instead re-raising urllib3
        variants, so that low-level exceptions are not leaked in the
        high-level api.
    
        On exit, release the connection back to the pool.
        """
        clean_exit = False
    
        try:
            try:
>               yield

env/lib/python3.9/site-packages/urllib3/response.py:444: 
                                        

self = <urllib3.response.HTTPResponse object at 0x7f4ed1b8f4c0>, amt = 4096
decode_content = True, cache_content = False

    def read(self, amt=None, decode_content=None, cache_content=False):
        """
        Similar to :meth:http.client.HTTPResponse.read, but with two additional
        parameters: decode_content and cache_content.
    
        :param amt:
            How much of the content to read. If specified, caching is skipped
            because it doesn't make sense to cache partial content as the full
            response.
    
        :param decode_content:
            If True, will attempt to decode the body based on the
            'content-encoding' header.
    
        :param cache_content:
            If True, will save the returned data such that the same result is
            returned despite of the state of the underlying file object. This
            is useful if you want the .data property to continue working
            after having .read() the file object. (Overridden if amt is
            set.)
        """
        self.init_decoder()
        if decode_content is None:
            decode_content = self.decode_content
    
        if self.fp is None:
            return
    
        flush_decoder = False
        fp_closed = getattr(self.fp, "closed", False)
    
        with self.error_catcher():
            data = self.fp_read(amt) if not fp_closed else b""
            if amt is None:
                flush_decoder = True
            else:
                cache_content = False
                if (
                    amt != 0 and not data
                ):  # Platform-specific: Buggy versions of Python.
                    # Close the connection when no data is returned
                    #
                    # This is redundant to what httplib/http.client should
                    # already do.  However, versions of python released before
                    # December 15, 2012 (http://bugs.python.org/issue16298)&nbsp;do
                    # not properly close the connection in all cases. There is
                    # no harm in redundantly calling close.
                    self.fp.close()
                    flush_decoder = True
                    if self.enforce_content_length and self.length_remaining not in (
                        0,
                        None,
                    ):
                        # This is an edge case that httplib failed to cover due
                        # to concerns of backward compatibility. We're
                        # addressing it here to make sure IncompleteRead is
                        # raised during streaming, so all calls with incorrect
                        # Content-Length are caught.
>                       raise IncompleteRead(self.fp_bytes_read, self.length_remaining)
E                       urllib3.exceptions.IncompleteRead: IncompleteRead(1357 bytes read, 177 more expected)

env/lib/python3.9/site-packages/urllib3/response.py:593: IncompleteRead

During handling of the above exception, another exception occurred:

    def generate():
        # Special case for urllib3.
        if hasattr(self.raw, "stream"):
            try:
>               yield from self.raw.stream(chunk_size, decode_content=True)

env/lib/python3.9/site-packages/requests/models.py:820: 
 
 
 
 
 
 
 
                                 
env/lib/python3.9/site-packages/urllib3/response.py:628: in stream
    data = self.read(amt=amt, decode_content=decode_content)
env/lib/python3.9/site-packages/urllib3/response.py:593: in read
    raise IncompleteRead(self.fp_bytes_read, self.length_remaining)
/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/contextlib.py:137: in exit
    self.gen.throw(typ, value, traceback)
                                        

self = <urllib3.response.HTTPResponse object at 0x7f4ed1b8f4c0>

    @contextmanager
    def error_catcher(self):
        """
        Catch low-level python exceptions, instead re-raising urllib3
        variants, so that low-level exceptions are not leaked in the
        high-level api.
    
        On exit, release the connection back to the pool.
        """
        clean_exit = False
    
        try:
            try:
                yield
    
            except SocketTimeout:
                # FIXME: Ideally we'd like to include the url in the ReadTimeoutError but
                # there is yet no clean way to get at it from this context.
                raise ReadTimeoutError(self.pool, None, "Read timed out.")
    
            except BaseSSLError as e:
                # FIXME: Is there a better way to differentiate between SSLErrors?
                if "read operation timed out" not in str(e):
                    # SSL errors related to framing/MAC get wrapped and reraised here
                    raise SSLError(e)
    
                raise ReadTimeoutError(self.pool, None, "Read timed out.")
    
            except (HTTPException, SocketError) as e:
                # This includes IncompleteRead.
>               raise ProtocolError("Connection broken: %r" % e, e)
E               urllib3.exceptions.ProtocolError: ('Connection broken: IncompleteRead(1357 bytes read, 177 more expected)', IncompleteRead(1357 bytes read, 177 more expected))

env/lib/python3.9/site-packages/urllib3/response.py:461: ProtocolError

During handling of the above exception, another exception occurred:

self = <azure.core.pipeline.transport.requests_basic.StreamDownloadGenerator object at 0x7f4ed1bdc1f0>

    def next(self):
        internal_response = self.response.internal_response
        try:
>           chunk = next(self.iter_content_func)

env/lib/python3.9/site-packages/azure/core/pipeline/transport/requests_basic.py:177: 
 
 
 
 
 
                                   

    def generate():
        # Special case for urllib3.
        if hasattr(self.raw, "stream"):
            try:
                yield from self.raw.stream(chunk_size, decode_content=True)
            except ProtocolError as e:
>               raise ChunkedEncodingError(e)
E               requests.exceptions.ChunkedEncodingError: ('Connection broken: IncompleteRead(1357 bytes read, 177 more expected)', IncompleteRead(1357 bytes read, 177 more expected))

env/lib/python3.9/site-packages/requests/models.py:822: ChunkedEncodingError

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

self = <azure.cli.command_modules.resource.tests.hybrid_2018_03_01.test_resource.ResourceScenarioTest testMethod=test_resource_scenario>
resource_group = 'cli_test_resource_scenario000001'
resource_group_location = 'southcentralus'

    @ResourceGroupPreparer(name_prefix='cli_test_resource_scenario', location='southcentralus')
    @AllowLargeResponse()
    def test_resource_scenario(self, resource_group, resource_group_location):
        self.kwargs.update({
            'loc': resource_group_location,
            'vnet': self.create_random_name('vnet-', 30),
            'subnet': self.create_random_name('subnet-', 30),
            'rt': 'Microsoft.Network/virtualNetworks'
        })
        vnet_count = self.cmd("resource list --query "length([?name=='{vnet}'])"").get_output_in_json() or 0
        self.cmd('network vnet create -g {rg} -n {vnet} --subnet-name {subnet} --tags cli-test=test')
        vnet_count += 1
    
        self.cmd('resource list',
                 checks=self.check("length([?name=='{vnet}'])", vnet_count))
        self.cmd('resource list -l {loc}',
                 checks=self.check("length([?location == '{loc}']) == length(@)", True))
        self.cmd('resource list --resource-type {rt}',
                 checks=self.check("length([?name=='{vnet}'])", vnet_count))
        self.cmd('resource list --name {vnet}', checks=[
            self.check("length([?name=='{vnet}'])", vnet_count),
            self.check('[0].provisioningState', 'Succeeded')
        ])
        self.cmd('resource list --tag cli-test',
                 checks=self.check("length([?name=='{vnet}'])", vnet_count))
        self.cmd('resource list --tag cli-test=test',
                 checks=self.check("length([?name=='{vnet}'])", vnet_count))
    
        # check for simple resource with tag
        self.cmd('resource show -n {vnet} -g {rg} --resource-type Microsoft.Network/virtualNetworks', checks=[
            self.check('name', '{vnet}'),
            self.check('location', '{loc}'),
            self.check('resourceGroup', '{rg}'),
            self.check('tags', {'cli-test': 'test'})
        ])
        # check for child resource
        self.cmd('resource show -n {subnet} -g {rg} --namespace Microsoft.Network --parent virtualNetworks/{vnet} --resource-type subnets', checks=[
            self.check('name', '{subnet}'),
            self.check('resourceGroup', '{rg}')
        ])
    
        # clear tag and verify
>       self.cmd('resource tag -n {vnet} -g {rg} --resource-type Microsoft.Network/virtualNetworks --tags')

src/azure-cli/azure/cli/command_modules/resource/tests/hybrid_2018_03_01/test_resource.py:104: 
                                        
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:666: in execute
    raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:734: in run_jobs_serially
    results.append(self.run_job(expanded_arg, cmd_copy))
src/azure-cli-core/azure/cli/core/commands/init.py:703: in run_job
    result = cmd_copy(params)
src/azure-cli-core/azure/cli/core/commands/init.py:336: in call
    return self.handler(*args, **kwargs)
src/azure-cli-core/azure/cli/core/commands/command_operation.py:120: in handler
    return op(**command_args)
src/azure-cli/azure/cli/command_modules/resource/custom.py:2187: in tag_resource
    return single_or_collection([LongRunningOperation(cmd.cli_ctx)(
src/azure-cli/azure/cli/command_modules/resource/custom.py:2188: in 
    get_rsrc_util_from_parsed_id(cmd.cli_ctx, id_dict, api_version, latest_include_preview).tag(
src/azure-cli/azure/cli/command_modules/resource/custom.py:4509: in tag
    return self.rcf.resources.begin_create_or_update(self.resource_group_name,
env/lib/python3.9/site-packages/azure/core/tracing/decorator.py:94: in wrapper_use_tracer
    return func(*args, **kwargs)
env/lib/python3.9/site-packages/azure/mgmt/resource/resources/v2018_02_01/operations/operations.py:3409: in begin_create_or_update
    raw_result.http_response.read()  # type: ignore
env/lib/python3.9/site-packages/azure/core/rest/http_response_impl.py:407: in read
    self.content = b"".join(self.iter_bytes())
env/lib/python3.9/site-packages/azure/core/rest/http_response_impl.py:423: in iter_bytes
    yield from self.stream_download_generator(
 
 
 
 
 
                                   

self = <azure.core.pipeline.transport._requests_basic.StreamDownloadGenerator object at 0x7f4ed1bdc1f0>

    def next(self):
        internal_response = self.response.internal_response
        try:
            chunk = next(self.iter_content_func)
            if not chunk:
                raise StopIteration()
            return chunk
        except StopIteration:
            internal_response.close()
            raise StopIteration()  # pylint: disable=raise-missing-from
        except requests.exceptions.StreamConsumedError:
            raise
        except requests.exceptions.ContentDecodingError as err:
            raise DecodeError(err, error=err) from err
        except requests.exceptions.ChunkedEncodingError as err:
            msg = err.str()
            if "IncompleteRead" in msg:
                _LOGGER.warning("Incomplete download: %s", err)
                internal_response.close()
>               raise IncompleteReadError(err, error=err) from err
E               azure.core.exceptions.IncompleteReadError: ('Connection broken: IncompleteRead(1357 bytes read, 177 more expected)', IncompleteRead(1357 bytes read, 177 more expected))

env/lib/python3.9/site-packages/azure/core/pipeline/transport/_requests_basic.py:193: IncompleteReadError
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_group_deployment self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f4ed1397bb0>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f4ed38ae0a0>
command = 'group deployment create -g cli_test_deployment000001 -n azure-cli-deployment --template-file "/mnt/vss/work/1/s/src/...sPools=@"/mnt/vss/work/1/s/src/azure-cli/azure/cli/command_modules/resource/tests/hybrid_2018_03_01/test-object.json"'
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 = AttributeError("'NoneType' object has no attribute 'internal_response'")
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 AttributeError 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.resource.tests.hybrid_2018_03_01.test_resource.DeploymentTest testMethod=test_group_deployment>
resource_group = 'cli_test_deployment000001'

    @ResourceGroupPreparer(name_prefix='cli_test_deployment')
    def test_group_deployment(self, resource_group):
        curr_dir = os.path.dirname(os.path.realpath(file))
        self.kwargs.update({
            'tf': os.path.join(curr_dir, 'test-template.json').replace('\', '\\'),
            'params': os.path.join(curr_dir, 'test-params.json').replace('\', '\\'),
            'of': os.path.join(curr_dir, 'test-object.json').replace('\', '\\'),
            'dn': 'azure-cli-deployment'
        })
        self.kwargs['subnet_id'] = self.cmd('network vnet create -g {rg} -n vnet1 --subnet-name subnet1').get_output_in_json()['newVNet']['subnets'][0]['id']
    
        self.cmd('group deployment validate -g {rg} --template-file "{tf}" --parameters @"{params}" --parameters subnetId="{subnet_id}" --parameters backendAddressPools=@"{of}"', checks=[
            self.check('properties.provisioningState', 'Succeeded')
        ])
    
>       self.cmd('group deployment create -g {rg} -n {dn} --template-file "{tf}" --parameters @"{params}" --parameters subnetId="{subnet_id}" --parameters backendAddressPools=@"{of}"', checks=[
            self.check('properties.provisioningState', 'Succeeded'),
            self.check('resourceGroup', '{rg}')
        ])

src/azure-cli/azure/cli/command_modules/resource/tests/hybrid_2018_03_01/test_resource.py:283: 
 
                                       
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:666: in execute
    raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:734: in run_jobs_serially
    results.append(self.run_job(expanded_arg, cmd_copy))
src/azure-cli-core/azure/cli/core/commands/init.py:726: in run_job
    return cmd_copy.exception_handler(ex)
 
 
 
 
                                   _ 

ex = IncompleteReadError("('Connection broken: IncompleteRead(1071 bytes read, 100 more expected)', IncompleteRead(1071 bytes read, 100 more expected))")

    def handle_template_based_exception(ex):
        try:
            raise CLIError(ex.inner_exception.error.message)
        except AttributeError:
            if hasattr(ex, 'response'):
>               raise_subdivision_deployment_error(ex.response.internal_response.text, ex.error.code if ex.error else None)
E               AttributeError: 'NoneType' object has no attribute 'internal_response'

src/azure-cli-core/azure/cli/core/commands/arm.py:112: AttributeError
azure/cli/command_modules/resource/tests/hybrid_2018_03_01/test_resource.py:267
Failed test_group_deployment_lite self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f4ed33f7190>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f4ed38be7f0>
command = 'group deployment create -g cli_test_deployment_lite000001 -n azure-cli-deployment000002 --template-file "/mnt/vss/work/1/s/src/azure-cli/azure/cli/command_modules/resource/tests/hybrid_2018_03_01/test-template-lite.json"'
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 = AttributeError("'NoneType' object has no attribute 'internal_response'")
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 AttributeError 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.resource.tests.hybrid_2018_03_01.test_resource.DeploymentTest testMethod=test_group_deployment_lite>
resource_group = 'cli_test_deployment_lite000001'

    @ResourceGroupPreparer(name_prefix='cli_test_deployment_lite')
    def test_group_deployment_lite(self, resource_group):
        # ensures that a template that is missing "parameters" or "resources" still deploys
        curr_dir = os.path.dirname(os.path.realpath(file))
    
        self.kwargs.update({
            'tf': os.path.join(curr_dir, 'test-template-lite.json').replace('\', '\\'),
            'dn': self.create_random_name('azure-cli-deployment', 30)
        })
    
>       self.cmd('group deployment create -g {rg} -n {dn} --template-file "{tf}"', checks=[
            self.check('properties.provisioningState', 'Succeeded'),
            self.check('resourceGroup', '{rg}')
        ])

src/azure-cli/azure/cli/command_modules/resource/tests/hybrid_2018_03_01/test_resource.py:263: 
                                        
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:666: in execute
    raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:734: in run_jobs_serially
    results.append(self.run_job(expanded_arg, cmd_copy))
src/azure-cli-core/azure/cli/core/commands/init.py:726: in run_job
    return cmd_copy.exception_handler(ex)
 
 
 
 
 
                                   

ex = IncompleteReadError("('Connection broken: IncompleteRead(472 bytes read, 53 more expected)', IncompleteRead(472 bytes read, 53 more expected))")

    def handle_template_based_exception(ex):
        try:
            raise CLIError(ex.inner_exception.error.message)
        except AttributeError:
            if hasattr(ex, 'response'):
>               raise_subdivision_deployment_error(ex.response.internal_response.text, ex.error.code if ex.error else None)
E               AttributeError: 'NoneType' object has no attribute 'internal_response'

src/azure-cli-core/azure/cli/core/commands/arm.py:112: AttributeError
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_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
🔄search
🔄latest
🔄3.12
️✔️security
️✔️latest
️✔️3.12
🔄servicebus
🔄latest
🔄3.12
️✔️serviceconnector
️✔️latest
️✔️3.12
❌servicefabric
❌latest
❌3.12
Type Test Case Error Message Line
Failed test_update_settings_and_reliability self = <urllib3.response.HTTPResponse object at 0x7fb775359c90>

    @contextmanager
    def error_catcher(self):
        """
        Catch low-level python exceptions, instead re-raising urllib3
        variants, so that low-level exceptions are not leaked in the
        high-level api.
    
        On exit, release the connection back to the pool.
        """
        clean_exit = False
    
        try:
            try:
>               yield

env/lib/python3.12/site-packages/urllib3/response.py:444: 
                                        

self = <urllib3.response.HTTPResponse object at 0x7fb775359c90>, amt = 4096
decode_content = True, cache_content = False

    def read(self, amt=None, decode_content=None, cache_content=False):
        """
        Similar to :meth:http.client.HTTPResponse.read, but with two additional
        parameters: decode_content and cache_content.
    
        :param amt:
            How much of the content to read. If specified, caching is skipped
            because it doesn't make sense to cache partial content as the full
            response.
    
        :param decode_content:
            If True, will attempt to decode the body based on the
            'content-encoding' header.
    
        :param cache_content:
            If True, will save the returned data such that the same result is
            returned despite of the state of the underlying file object. This
            is useful if you want the .data property to continue working
            after having .read() the file object. (Overridden if amt is
            set.)
        """
        self.init_decoder()
        if decode_content is None:
            decode_content = self.decode_content
    
        if self.fp is None:
            return
    
        flush_decoder = False
        fp_closed = getattr(self.fp, "closed", False)
    
        with self.error_catcher():
            data = self.fp_read(amt) if not fp_closed else b""
            if amt is None:
                flush_decoder = True
            else:
                cache_content = False
                if (
                    amt != 0 and not data
                ):  # Platform-specific: Buggy versions of Python.
                    # Close the connection when no data is returned
                    #
                    # This is redundant to what httplib/http.client should
                    # already do.  However, versions of python released before
                    # December 15, 2012 (http://bugs.python.org/issue16298)&nbsp;do
                    # not properly close the connection in all cases. There is
                    # no harm in redundantly calling close.
                    self.fp.close()
                    flush_decoder = True
                    if self.enforce_content_length and self.length_remaining not in (
                        0,
                        None,
                    ):
                        # This is an edge case that httplib failed to cover due
                        # to concerns of backward compatibility. We're
                        # addressing it here to make sure IncompleteRead is
                        # raised during streaming, so all calls with incorrect
                        # Content-Length are caught.
>                       raise IncompleteRead(self.fp_bytes_read, self.length_remaining)
E                       urllib3.exceptions.IncompleteRead: IncompleteRead(7217 bytes read, 12 more expected)

env/lib/python3.12/site-packages/urllib3/response.py:593: IncompleteRead

During handling of the above exception, another exception occurred:

    def generate():
        # Special case for urllib3.
        if hasattr(self.raw, "stream"):
            try:
>               yield from self.raw.stream(chunk_size, decode_content=True)

env/lib/python3.12/site-packages/requests/models.py:820: 
 
 
 
 
 
 
 
                                 
env/lib/python3.12/site-packages/urllib3/response.py:628: in stream
    data = self.read(amt=amt, decode_content=decode_content)
env/lib/python3.12/site-packages/urllib3/response.py:566: in read
    with self.error_catcher():
/opt/hostedtoolcache/Python/3.12.9/x64/lib/python3.12/contextlib.py:158: in exit
    self.gen.throw(value)
                                        

self = <urllib3.response.HTTPResponse object at 0x7fb775359c90>

    @contextmanager
    def error_catcher(self):
        """
        Catch low-level python exceptions, instead re-raising urllib3
        variants, so that low-level exceptions are not leaked in the
        high-level api.
    
        On exit, release the connection back to the pool.
        """
        clean_exit = False
    
        try:
            try:
                yield
    
            except SocketTimeout:
                # FIXME: Ideally we'd like to include the url in the ReadTimeoutError but
                # there is yet no clean way to get at it from this context.
                raise ReadTimeoutError(self.pool, None, "Read timed out.")
    
            except BaseSSLError as e:
                # FIXME: Is there a better way to differentiate between SSLErrors?
                if "read operation timed out" not in str(e):
                    # SSL errors related to framing/MAC get wrapped and reraised here
                    raise SSLError(e)
    
                raise ReadTimeoutError(self.pool, None, "Read timed out.")
    
            except (HTTPException, SocketError) as e:
                # This includes IncompleteRead.
>               raise ProtocolError("Connection broken: %r" % e, e)
E               urllib3.exceptions.ProtocolError: ('Connection broken: IncompleteRead(7217 bytes read, 12 more expected)', IncompleteRead(7217 bytes read, 12 more expected))

env/lib/python3.12/site-packages/urllib3/response.py:461: ProtocolError

During handling of the above exception, another exception occurred:

self = <azure.core.pipeline.transport.requests_basic.StreamDownloadGenerator object at 0x7fb775504e90>

    def next(self):
        internal_response = self.response.internal_response
        try:
>           chunk = next(self.iter_content_func)

env/lib/python3.12/site-packages/azure/core/pipeline/transport/requests_basic.py:177: 
 
 
 
 
 
                                   

    def generate():
        # Special case for urllib3.
        if hasattr(self.raw, "stream"):
            try:
                yield from self.raw.stream(chunk_size, decode_content=True)
            except ProtocolError as e:
>               raise ChunkedEncodingError(e)
E               requests.exceptions.ChunkedEncodingError: ('Connection broken: IncompleteRead(7217 bytes read, 12 more expected)', IncompleteRead(7217 bytes read, 12 more expected))

env/lib/python3.12/site-packages/requests/models.py:822: ChunkedEncodingError

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

self = <azure.cli.command_modules.servicefabric.tests.latest.test_sf_cluster.ServiceFabricClusterTests testMethod=test_update_settings_and_reliability>

    @ResourceGroupPreparer()
    def test_update_settings_and_reliability(self):
        self.kwargs.update({
            'kv_name': self.create_random_name('sfrp-cli-kv-', 24),
            'loc': 'westus',
            'cert_name': self.create_random_name('sfrp-cli-', 24),
            'cluster_name': self.create_random_name('sfrp-cli-', 24),
            'vm_password': "Pass123!@#",
            'primary_node_type': 'nt1vm',
            'new_node_type': 'nt2',
            'cluster_size': '5'
        })
>       create_cluster(self, self.kwargs)

src/azure-cli/azure/cli/command_modules/servicefabric/tests/latest/test_sf_cluster.py:44: 
                                        
src/azure-cli/azure/cli/command_modules/servicefabric/tests/latest/test_util.py:50: in create_cluster
    test.cmd('az sf cluster create -g {rg} -c {cluster_name} -l {loc} --certificate-subject-name {cluster_name} --vm-password "{vm_password}" --cluster-size {cluster_size}')
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:666: in execute
    raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:734: in run_jobs_serially
    results.append(self.run_job(expanded_arg, cmd_copy))
src/azure-cli-core/azure/cli/core/commands/init.py:703: in run_job
    result = cmd_copy(params)
src/azure-cli-core/azure/cli/core/commands/init.py:336: in call
    return self.handler(*args, **kwargs)
src/azure-cli-core/azure/cli/core/commands/command_operation.py:120: in handler
    return op(**command_args)
src/azure-cli/azure/cli/command_modules/servicefabric/custom.py:238: in new_cluster
    validate_and_deploy_arm_template(cmd, resource_group_name, template, parameters)
src/azure-cli/azure/cli/command_modules/servicefabric/arm_deployment_utils.py:22: in validate_and_deploy_arm_template
    validate_result = deploy_arm_template_core(
src/azure-cli/azure/cli/command_modules/servicefabric/arm_deployment_utils.py:50: in deploy_arm_template_core
    deploy_poll = sdk_no_wait(no_wait, client.deployments.begin_validate, resource_group_name, deployment_name,
src/azure-cli-core/azure/cli/core/util.py:744: in sdk_no_wait
    return func(*args, **kwargs)
env/lib/python3.12/site-packages/azure/core/tracing/decorator.py:94: in wrapper_use_tracer
    return func(*args, **kwargs)
env/lib/python3.12/site-packages/azure/mgmt/resource/resources/v2024_11_01/operations/operations.py:7416: in begin_validate
    raw_result.http_response.read()  # type: ignore
env/lib/python3.12/site-packages/azure/core/rest/http_response_impl.py:407: in read
    self.content = b"".join(self.iter_bytes())
env/lib/python3.12/site-packages/azure/core/rest/http_response_impl.py:423: in iter_bytes
    yield from self.stream_download_generator(
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
                         

self = <azure.core.pipeline.transport._requests_basic.StreamDownloadGenerator object at 0x7fb775504e90>

    def next(self):
        internal_response = self.response.internal_response
        try:
            chunk = next(self.iter_content_func)
            if not chunk:
                raise StopIteration()
            return chunk
        except StopIteration:
            internal_response.close()
            raise StopIteration()  # pylint: disable=raise-missing-from
        except requests.exceptions.StreamConsumedError:
            raise
        except requests.exceptions.ContentDecodingError as err:
            raise DecodeError(err, error=err) from err
        except requests.exceptions.ChunkedEncodingError as err:
            msg = err.str()
            if "IncompleteRead" in msg:
                _LOGGER.warning("Incomplete download: %s", err)
                internal_response.close()
>               raise IncompleteReadError(err, error=err) from err
E               azure.core.exceptions.IncompleteReadError: ('Connection broken: IncompleteRead(7217 bytes read, 12 more expected)', IncompleteRead(7217 bytes read, 12 more expected))

env/lib/python3.12/site-packages/azure/core/pipeline/transport/_requests_basic.py:193: IncompleteReadError
azure/cli/command_modules/servicefabric/tests/latest/test_sf_cluster.py:31
️✔️signalr
️✔️latest
️✔️3.12
🔄sql
🔄latest
🔄3.12
️✔️sqlvm
️✔️latest
️✔️3.12
🔄storage
️✔️2018-03-01-hybrid
️✔️3.12
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.9
🔄latest
🔄3.12
🔄synapse
🔄latest
🔄3.12
🔄telemetry
️✔️2018-03-01-hybrid
️✔️3.12
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.9
🔄latest
🔄3.12
️✔️util
️✔️latest
️✔️3.12
❌vm
❌2018-03-01-hybrid
❌3.12
Type Test Case Error Message Line
Failed test_vm_availset_convert self = <azure.cli.testsdk.base.ExecutionResult object at 0x7fc25e42be60>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7fc25fadc800>
command = 'vm availability-set create -g cli_test_availset_live000001 -n availset-test --unmanaged --platform-fault-domain-count 3 -l westus2'
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 = AttributeError("'NoneType' object has no attribute 'internal_response'")
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 AttributeError 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.VMAvailSetLiveScenarioTest testMethod=test_vm_availset_convert>
resource_group = 'cli_test_availset_live000001'

    @ResourceGroupPreparer(name_prefix='cli_test_availset_live')
    @AllowLargeResponse(size_kb=3072)
    def test_vm_availset_convert(self, resource_group):
    
        self.kwargs.update({
            'availset': 'availset-test'
        })
    
>       self.cmd('vm availability-set create -g {rg} -n {availset} --unmanaged --platform-fault-domain-count 3 -l westus2', checks=[
            self.check('name', '{availset}'),
            self.check('platformFaultDomainCount', 3),
            self.check('platformUpdateDomainCount', 5),  # server defaults to 5
            self.check('sku.name', 'Classic')
        ])

src/azure-cli/azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:766: 
 
                                       
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:666: in execute
    raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:734: in run_jobs_serially
    results.append(self.run_job(expanded_arg, cmd_copy))
src/azure-cli-core/azure/cli/core/commands/init.py:726: in run_job
    return cmd_copy.exception_handler(ex)
 
 
 
 
                                   _ 

ex = IncompleteReadError("('Connection broken: IncompleteRead(637 bytes read, 47 more expected)', IncompleteRead(637 bytes read, 47 more expected))")

    def handle_template_based_exception(ex):
        try:
            raise CLIError(ex.inner_exception.error.message)
        except AttributeError:
            if hasattr(ex, 'response'):
>               raise_subdivision_deployment_error(ex.response.internal_response.text, ex.error.code if ex.error else None)
E               AttributeError: 'NoneType' object has no attribute 'internal_response'

src/azure-cli-core/azure/cli/core/commands/arm.py:112: AttributeError
azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:757
❌3.9
Type Test Case Error Message Line
Failed test_vm_availset_convert self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f4ed3412d30>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f4ed89e29a0>
command = 'vm availability-set create -g cli_test_availset_live000001 -n availset-test --unmanaged --platform-fault-domain-count 3 -l westus2'
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 = AttributeError("'NoneType' object has no attribute 'internal_response'")
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 AttributeError 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.VMAvailSetLiveScenarioTest testMethod=test_vm_availset_convert>
resource_group = 'cli_test_availset_live000001'

    @ResourceGroupPreparer(name_prefix='cli_test_availset_live')
    @AllowLargeResponse(size_kb=3072)
    def test_vm_availset_convert(self, resource_group):
    
        self.kwargs.update({
            'availset': 'availset-test'
        })
    
>       self.cmd('vm availability-set create -g {rg} -n {availset} --unmanaged --platform-fault-domain-count 3 -l westus2', checks=[
            self.check('name', '{availset}'),
            self.check('platformFaultDomainCount', 3),
            self.check('platformUpdateDomainCount', 5),  # server defaults to 5
            self.check('sku.name', 'Classic')
        ])

src/azure-cli/azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:766: 
 
                                       
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:666: in execute
    raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:734: in run_jobs_serially
    results.append(self.run_job(expanded_arg, cmd_copy))
src/azure-cli-core/azure/cli/core/commands/init.py:726: in run_job
    return cmd_copy.exception_handler(ex)
 
 
 
 
                                   _ 

ex = IncompleteReadError("('Connection broken: IncompleteRead(637 bytes read, 47 more expected)', IncompleteRead(637 bytes read, 47 more expected))")

    def handle_template_based_exception(ex):
        try:
            raise CLIError(ex.inner_exception.error.message)
        except AttributeError:
            if hasattr(ex, 'response'):
>               raise_subdivision_deployment_error(ex.response.internal_response.text, ex.error.code if ex.error else None)
E               AttributeError: 'NoneType' object has no attribute 'internal_response'

src/azure-cli-core/azure/cli/core/commands/arm.py:112: AttributeError
azure/cli/command_modules/vm/tests/hybrid_2018_03_01/test_vm_commands.py:757
️✔️2020-09-01-hybrid
️✔️3.9
🔄latest
🔄3.12

@azure-client-tools-bot-prd
Copy link
Copy Markdown

azure-client-tools-bot-prd bot commented Mar 31, 2025

❌AzureCLI-BreakingChangeTest
❌rdbms
rule cmd_name rule_message suggest_message
1010 - ParaPropUpdate postgres flexible-server geo-restore cmd postgres flexible-server geo-restore update parameter restore_point_in_time: updated property default from 2025-04-10T04:27:09+00:00 to 2025-04-10T04:20:00+00:00 please change property default from 2025-04-10T04:20:00+00:00 to 2025-04-10T04:27:09+00:00 for parameter restore_point_in_time of cmd postgres flexible-server geo-restore

Please submit your Breaking Change Pre-announcement ASAP if you haven't already. Please note:

  • Breaking changes can only be merged during the designated breaking change window
  • A pre-announcement must be released at least one month in advance

For more details on how to introduce breaking changes, refer to the documentation: azure-cli/doc/how_to_introduce_breaking_changes.md

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented Mar 31, 2025

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

@github-actions
Copy link
Copy Markdown

The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR.

Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

@microsoft-github-policy-service microsoft-github-policy-service bot added the Auto-Assign Auto assign by bot label Mar 31, 2025
@microsoft-github-policy-service microsoft-github-policy-service bot added the ARM az resource/group/lock/tag/deployment/policy/managementapp/account management-group label Mar 31, 2025
@jeskew jeskew changed the title Update azure-mgmt-resource SDK to latest {ARM} Update azure-mgmt-resource SDK to latest Mar 31, 2025
VSTS_7b238909-6802-4b65-b90d-184bca47f458_build_220_0
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test_resource_id_arg_fmt000001?api-version=2022-09-01
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test_resource_id_arg_fmt000001?api-version=2024-11-01
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 try to re-record these YAML files using live testing instead of just replacing the api-version in the YAML files

Copy link
Copy Markdown
Contributor Author

@jeskew jeskew Apr 1, 2025

Choose a reason for hiding this comment

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

I'm having trouble finding any account where I can run azdev test resource --live without running into permissions issues.

Can I leave most of these files untouched (e.g., still using the 2022-09-01 API version), or would that cause the recorded tests to fail since the SDK will be using the 2024-11-01 API version? The API update is expected to have a minimal effect on only a handful of operations.

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.

@jeskew We recommend that you try our bump api-version pipeline, which can automatically re-record YAML files using the CI pipeline. doc link: how_to_bump_SDK_version_in_cli.md

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the guidance! All changes in this PR were now authored by that pipeline.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I did need to manually patch a large number of recordings after running the pipeline, but this PR should be ready for review now.

@jeskew jeskew force-pushed the update-azure-mgmt-resource-SDK branch from 8525a0b to dd1f1bf Compare April 7, 2025 01:57
@jeskew jeskew force-pushed the update-azure-mgmt-resource-SDK branch from 91bfdc0 to 612b6c6 Compare April 8, 2025 16:56
@jeskew jeskew force-pushed the update-azure-mgmt-resource-SDK branch from 612b6c6 to 89ce6dd Compare April 9, 2025 19:07
@zhoxing-ms
Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 3 pipeline(s).

@yanzhudd
Copy link
Copy Markdown
Contributor

please fix the CI issues and resolve the code conflicts.

@yanzhudd
Copy link
Copy Markdown
Contributor

please note that Azure CLI will have a code freeze on 04/21/2025 07:00 UTC for the upcoming release. Please address the comments ASAP, otherwise it has to be postponed to next sprint (05-19).

@anthony-c-martin
Copy link
Copy Markdown
Member

/azp run

@azure-pipelines
Copy link
Copy Markdown

Commenter does not have sufficient privileges for PR 31162 in repo Azure/azure-cli

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented Apr 24, 2025

Please fix conflicts

@zhoxing-ms
Copy link
Copy Markdown
Contributor

It should be replaced by PR https://github.com/Azure/azure-cli/pull/31449/files

@zhoxing-ms zhoxing-ms closed this May 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ARM az resource/group/lock/tag/deployment/policy/managementapp/account management-group Auto-Assign Auto assign by bot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants