Skip to content

[Network] Fix #33981: az network application-gateway show: Bump parent Application Gateway API version to 2025-07-01 so Managed HSM SSL certificate fields are preserved - #33982

Draft
Aditya Pujara (a0x1ab) wants to merge 1 commit into
Azure:devfrom
a0x1ab:agent-assist/azure-azure-cli-issue-33981-ef9e71dface1

Conversation

@a0x1ab

@a0x1ab Aditya Pujara (a0x1ab) commented Aug 25, 2026

Copy link
Copy Markdown
Member

🤖 PR Validation — ❌ Action needed

Breaking Changes Tests
️✔️ None ❌ 126/130
❌AzureCLI-FullTest
️✔️acr
️✔️latest
️✔️3.12
️✔️3.14
️✔️acs
️✔️latest
️✔️3.12
️✔️3.14
️✔️advisor
️✔️latest
️✔️3.12
️✔️3.14
️✔️ams
️✔️latest
️✔️3.12
️✔️3.14
️✔️apim
️✔️latest
️✔️3.12
️✔️3.14
️✔️appconfig
️✔️latest
️✔️3.12
️✔️3.14
️✔️appservice
️✔️latest
️✔️3.12
️✔️3.14
️✔️aro
️✔️latest
️✔️3.12
️✔️3.14
️✔️backup
️✔️latest
️✔️3.12
️✔️3.14
️✔️batch
️✔️latest
️✔️3.12
️✔️3.14
️✔️batchai
️✔️latest
️✔️3.12
️✔️3.14
️✔️billing
️✔️latest
️✔️3.12
️✔️3.14
️✔️botservice
️✔️latest
️✔️3.12
️✔️3.14
️✔️cloud
️✔️latest
️✔️3.12
️✔️3.14
️✔️cognitiveservices
️✔️latest
️✔️3.12
️✔️3.14
️✔️compute_recommender
️✔️latest
️✔️3.12
️✔️3.14
️✔️computefleet
️✔️latest
️✔️3.12
️✔️3.14
️✔️config
️✔️latest
️✔️3.12
️✔️3.14
️✔️configure
️✔️latest
️✔️3.12
️✔️3.14
️✔️consumption
️✔️latest
️✔️3.12
️✔️3.14
️✔️container
️✔️latest
️✔️3.12
️✔️3.14
️✔️containerapp
️✔️latest
️✔️3.12
️✔️3.14
️✔️core
️✔️latest
️✔️3.12
️✔️3.14
️✔️cosmosdb
️✔️latest
️✔️3.12
️✔️3.14
️✔️databoxedge
️✔️latest
️✔️3.12
️✔️3.14
️✔️dls
️✔️latest
️✔️3.12
️✔️3.14
️✔️dms
️✔️latest
️✔️3.12
️✔️3.14
️✔️eventgrid
️✔️latest
️✔️3.12
️✔️3.14
️✔️eventhubs
️✔️latest
️✔️3.12
️✔️3.14
️✔️feedback
️✔️latest
️✔️3.12
️✔️3.14
️✔️find
️✔️latest
️✔️3.12
️✔️3.14
️✔️hdinsight
️✔️latest
️✔️3.12
️✔️3.14
️✔️identity
️✔️latest
️✔️3.12
️✔️3.14
️✔️iot
️✔️latest
️✔️3.12
️✔️3.14
️✔️keyvault
️✔️latest
️✔️3.12
️✔️3.14
️✔️lab
️✔️latest
️✔️3.12
️✔️3.14
️✔️managedservices
️✔️latest
️✔️3.12
️✔️3.14
️✔️maps
️✔️latest
️✔️3.12
️✔️3.14
️✔️marketplaceordering
️✔️latest
️✔️3.12
️✔️3.14
❌monitor
❌latest
❌3.12
Type Test Case Error Message Line
Failed test_metric_alert_special_char_scenario self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f0693e62330>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f0695ede240>
command = 'network application-gateway show -g cli_test_metric_alert_special_char000001 -n ag1'
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:303: 
                                        
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:153: in exception_handler
    return handle_exception(ex)
           ^^^^^^^^^^^^^^^^^^^^
src/azure-cli-testsdk/azure/cli/testsdk/patches.py:33: in handle_main_exception
    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:677: in execute
    raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:820: in run_jobs_serially
    results.append(self.run_job(expanded_arg, cmd_copy))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:789: in run_job
    result = cmd_copy(params)
             ^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/aaz/command.py:154: in call
    return self.handler(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/application_gateway/__cmds.py:8215: in handler
    self.execute_operations()
src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/application_gateway/__cmds.py:8242: in execute_operations
    self.ApplicationGatewaysGet(ctx=self.ctx)()
src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/application_gateway/__cmds.py:8262: in call
    session = self.client.send_request(request=request, stream=False, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/aaz/client.py:107: in send_request
    session = self.pipeline.run(request, stream=stream, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:242: in run
    return first_node.send(pipeline_request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/mgmt/core/policies/base.py:95: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/policies/redirect.py:205: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/policies/retry.py:545: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/aaz/http_policy.py:112: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:130: in send
    self.sender.send(request.http_request, **request.context.options),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/transport/requests_basic.py:375: in send
    response = self.session.request(  # type: ignore
env/lib/python3.12/site-packages/requests/sessions.py:592: in request
    resp = self.send(prep, **send_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/requests/sessions.py:706: in send
    r = adapter.send(request, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/requests/adapters.py:645: in send
    resp = conn.urlopen(
env/lib/python3.12/site-packages/urllib3/connectionpool.py:788: in urlopen
    response = self.make_request(
env/lib/python3.12/site-packages/urllib3/connectionpool.py:534: in make_request
    response = conn.getresponse()
               ^^^^^^^^^^^^^^^^^^
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
         

self = <VCRRequestsHTTPSConnection/mnt/vss/work/1/s/src/azure-cli/azure/cli/command_modules/monitor/tests/latest/recordings/test_metric_alert_special_char_scenario.yaml(host='management.azure.com', port=443) at 0x7f0691e47f80>
 = False, kwargs = {}

    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, self.vcr_request.uri)
        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/monitor/tests/latest/recordings/test_metric_alert_special_char_scenario.yaml') in your current record mode (RecordMode.ONCE: 'once').
E               No match for the request (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_special_char000001/providers/Microsoft.Network/applicationGateways/ag1?api-version=2025-07-01>)&nbsp;was&nbsp;found.
E               Found 1 similar requests with 1 different matcher(s) :
E               
E               1 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_special_char000001/providers/Microsoft.Network/applicationGateways/ag1?api-version=2024-10-01>).
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:279: CannotOverwriteExistingCassetteException

During handling of the above exception, another exception occurred:

self = <azure.cli.command_modules.monitor.tests.latest.test_monitor_metric_alert_scenarios.MonitorTests testMethod=test_metric_alert_special_char_scenario>
resource_group = 'cli_test_metric_alert_special_char000001'

    @ResourceGroupPreparer(name_prefix='cli_test_metric_alert_special_char')
    def test_metric_alert_special_char_scenario(self, resource_group):
        self.kwargs.update({
            'alert': 'alert1',
        })
        self.cmd('network application-gateway create -g {rg} -n ag1 --public-ip-address ip1 --priority 1001')
>       gateway_json = self.cmd('network application-gateway show -g {rg} -n ag1').get_output_in_json()
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/azure-cli/azure/cli/command_modules/monitor/tests/latest/test_monitor_metric_alert_scenarios.py:122: 
 
 
 
 
 
 
 
 
                                
src/azure-cli-testsdk/azure/cli/testsdk/base.py:177: in cmd
    return execute(self.cli_ctx, command, expect_failure=expect_failure).assert_with_checks(checks)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-testsdk/azure/cli/testsdk/base.py:252: in init
    self.in_process_execute(cli_ctx, command, expect_failure=expect_failure)
 
                                       

self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f0693e62330>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f0695ede240>
command = 'network application-gateway show -g cli_test_metric_alert_special_char000001 -n ag1'
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
            self.output = stdout_buf.getvalue()
            self.applog = logging_buf.getvalue()
    
        except CannotOverwriteExistingCassetteException as ex:
>           raise AssertionError(ex)
E           AssertionError: Can't overwrite existing cassette ('/mnt/vss/_work/1/s/src/azure-cli/azure/cli/command_modules/monitor/tests/latest/recordings/test_metric_alert_special_char_scenario.yaml') in your current record mode (RecordMode.ONCE: 'once').
E           No match for the request (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_special_char000001/providers/Microsoft.Network/applicationGateways/ag1?api-version=2025-07-01>)&nbsp;was&nbsp;found.
E           Found 1 similar requests with 1 different matcher(s) :
E           
E           1 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_special_char000001/providers/Microsoft.Network/applicationGateways/ag1?api-version=2024-10-01>).
E           Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E           Matchers failed :
E           _custom_request_query_matcher - assertion failure :
E           None

src/azure-cli-testsdk/azure/cli/testsdk/base.py:308: AssertionError
azure/cli/command_modules/monitor/tests/latest/test_monitor_metric_alert_scenarios.py:115
❌3.14
Type Test Case Error Message Line
Failed test_metric_alert_special_char_scenario self = <azure.cli.testsdk.base.ExecutionResult object at 0x7fc9454c6710>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7fc94903ed50>
command = 'network application-gateway show -g cli_test_metric_alert_special_char000001 -n ag1'
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:303: 
                                        
env/lib/python3.14/site-packages/knack/cli.py:245: in invoke
    exit_code = self.exception_handler(ex)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/init.py:153: in exception_handler
    return handle_exception(ex)
           ^^^^^^^^^^^^^^^^^^^^
src/azure-cli-testsdk/azure/cli/testsdk/patches.py:33: in handle_main_exception
    raise ex
env/lib/python3.14/site-packages/knack/cli.py:233: in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:677: in execute
    raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:820: in run_jobs_serially
    results.append(self.run_job(expanded_arg, cmd_copy))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:789: in run_job
    result = cmd_copy(params)
             ^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/aaz/command.py:154: in call
    return self.handler(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/application_gateway/__cmds.py:715: in handler
    self.execute_operations()
src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/application_gateway/__cmds.py:742: in execute_operations
    self.ApplicationGatewaysGet(ctx=self.ctx)()
src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/application_gateway/__cmds.py:762: in call
    session = self.client.send_request(request=request, stream=False, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/aaz/client.py:107: in send_request
    session = self.pipeline.run(request, stream=stream, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:242: in run
    return first_node.send(pipeline_request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/mgmt/core/policies/base.py:95: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/policies/redirect.py:205: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/policies/retry.py:545: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/aaz/http_policy.py:112: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:130: in send
    self.sender.send(request.http_request, **request.context.options),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/transport/requests_basic.py:375: in send
    response = self.session.request(  # type: ignore
env/lib/python3.14/site-packages/requests/sessions.py:592: in request
    resp = self.send(prep, **send_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/requests/sessions.py:706: in send
    r = adapter.send(request, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/requests/adapters.py:645: in send
    resp = conn.urlopen(
env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen
    response = self.make_request(
env/lib/python3.14/site-packages/urllib3/connectionpool.py:534: in make_request
    response = conn.getresponse()
               ^^^^^^^^^^^^^^^^^^
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
         

self = <VCRRequestsHTTPSConnection/mnt/vss/work/1/s/src/azure-cli/azure/cli/command_modules/monitor/tests/latest/recordings/test_metric_alert_special_char_scenario.yaml(host='management.azure.com', port=443) at 0x7fc9453a2f20>
 = False, kwargs = {}

    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, self.vcr_request.uri)
        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/monitor/tests/latest/recordings/test_metric_alert_special_char_scenario.yaml') in your current record mode (RecordMode.ONCE: 'once').
E               No match for the request (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_special_char000001/providers/Microsoft.Network/applicationGateways/ag1?api-version=2025-07-01>)&nbsp;was&nbsp;found.
E               Found 1 similar requests with 1 different matcher(s) :
E               
E               1 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_special_char000001/providers/Microsoft.Network/applicationGateways/ag1?api-version=2024-10-01>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               custom_request_query_matcher - assertion failure :
E               None

env/lib/python3.14/site-packages/vcr/stubs/init.py:279: CannotOverwriteExistingCassetteException

During handling of the above exception, another exception occurred:

self = <azure.cli.command_modules.monitor.tests.latest.test_monitor_metric_alert_scenarios.MonitorTests testMethod=test_metric_alert_special_char_scenario>
resource_group = 'cli_test_metric_alert_special_char000001'

    @ResourceGroupPreparer(name_prefix='cli_test_metric_alert_special_char')
    def test_metric_alert_special_char_scenario(self, resource_group):
        self.kwargs.update({
            'alert': 'alert1',
        })
        self.cmd('network application-gateway create -g {rg} -n ag1 --public-ip-address ip1 --priority 1001')
>       gateway_json = self.cmd('network application-gateway show -g {rg} -n ag1').get_output_in_json()
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/azure-cli/azure/cli/command_modules/monitor/tests/latest/test_monitor_metric_alert_scenarios.py:122: 
 
 
 
 
 
 
 
 
                                
src/azure-cli-testsdk/azure/cli/testsdk/base.py:177: in cmd
    return execute(self.cli_ctx, command, expect_failure=expect_failure).assert_with_checks(checks)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-testsdk/azure/cli/testsdk/base.py:252: in init
    self.in_process_execute(cli_ctx, command, expect_failure=expect_failure)
 
                                       

self = <azure.cli.testsdk.base.ExecutionResult object at 0x7fc9454c6710>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7fc94903ed50>
command = 'network application-gateway show -g cli_test_metric_alert_special_char000001 -n ag1'
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
            self.output = stdout_buf.getvalue()
            self.applog = logging_buf.getvalue()
    
        except CannotOverwriteExistingCassetteException as ex:
>           raise AssertionError(ex)
E           AssertionError: Can't overwrite existing cassette ('/mnt/vss/_work/1/s/src/azure-cli/azure/cli/command_modules/monitor/tests/latest/recordings/test_metric_alert_special_char_scenario.yaml') in your current record mode (RecordMode.ONCE: 'once').
E           No match for the request (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_special_char000001/providers/Microsoft.Network/applicationGateways/ag1?api-version=2025-07-01>)&nbsp;was&nbsp;found.
E           Found 1 similar requests with 1 different matcher(s) :
E           
E           1 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_special_char000001/providers/Microsoft.Network/applicationGateways/ag1?api-version=2024-10-01>).
E           Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E           Matchers failed :
E           _custom_request_query_matcher - assertion failure :
E           None

src/azure-cli-testsdk/azure/cli/testsdk/base.py:308: AssertionError
azure/cli/command_modules/monitor/tests/latest/test_monitor_metric_alert_scenarios.py:115
️✔️mysql
️✔️latest
️✔️3.12
️✔️3.14
️✔️netappfiles
️✔️latest
️✔️3.12
️✔️3.14
❌network
❌latest
❌3.12
Type Test Case Error Message Line
Failed test_ag_with_non_v2_sku self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f5cc90420f0>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f5ccc191ee0>
command = 'network application-gateway show -n ag-000002 -g cli_test_ag_with_non_v2_sku_000001'
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:303: 
                                        
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:153: in exception_handler
    return handle_exception(ex)
           ^^^^^^^^^^^^^^^^^^^^
src/azure-cli-testsdk/azure/cli/testsdk/patches.py:33: in handle_main_exception
    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:677: in execute
    raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:820: in run_jobs_serially
    results.append(self.run_job(expanded_arg, cmd_copy))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:789: in run_job
    result = cmd_copy(params)
             ^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/aaz/command.py:154: in call
    return self.handler(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/application_gateway/__cmds.py:9256: in handler
    self.execute_operations()
src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/application_gateway/__cmds.py:9283: in execute_operations
    self.ApplicationGatewaysGet(ctx=self.ctx)()
src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/application_gateway/__cmds.py:9303: in call
    session = self.client.send_request(request=request, stream=False, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/aaz/client.py:107: in send_request
    session = self.pipeline.run(request, stream=stream, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:242: in run
    return first_node.send(pipeline_request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/mgmt/core/policies/base.py:95: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/policies/redirect.py:205: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/policies/retry.py:545: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/aaz/http_policy.py:112: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/base.py:130: in send
    self.sender.send(request.http_request, **request.context.options),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/azure/core/pipeline/transport/requests_basic.py:375: in send
    response = self.session.request(  # type: ignore
env/lib/python3.12/site-packages/requests/sessions.py:592: in request
    resp = self.send(prep, **send_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/requests/sessions.py:706: in send
    r = adapter.send(request, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.12/site-packages/requests/adapters.py:645: in send
    resp = conn.urlopen(
env/lib/python3.12/site-packages/urllib3/connectionpool.py:788: in urlopen
    response = self.make_request(
env/lib/python3.12/site-packages/urllib3/connectionpool.py:534: in make_request
    response = conn.getresponse()
               ^^^^^^^^^^^^^^^^^^
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
         

self = <VCRRequestsHTTPSConnection/mnt/vss/work/1/s/src/azure-cli/azure/cli/command_modules/network/tests/latest/recordings/test_ag_with_non_v2_sku.yaml(host='management.azure.com', port=443) at 0x7f5cc6833800>
 = False, kwargs = {}

    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, self.vcr_request.uri)
        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 (RecordMode.ONCE: 'once').
E               No match for the request (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_ag_with_non_v2_sku_000001/providers/Microsoft.Network/applicationGateways/ag-000002?api-version=2025-07-01>)&nbsp;was&nbsp;found.
E               Found 7 similar requests with 1 different matcher(s) :
E               
E               1 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_ag_with_non_v2_sku_000001/providers/Microsoft.Network/applicationGateways/ag-000002?api-version=2024-10-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/resourceGroups/cli_test_ag_with_non_v2_sku_000001/providers/Microsoft.Network/applicationGateways/ag-000002?api-version=2023-11-01>).
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/resourceGroups/cli_test_ag_with_non_v2_sku_000001/providers/Microsoft.Network/applicationGateways/ag-000002?api-version=2023-11-01>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               custom_request_query_matcher - assertion failure :
E               None
E               
E               4 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_ag_with_non_v2_sku_000001/providers/Microsoft.Network/applicationGateways/ag-000002?api-version=2024-10-01>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               custom_request_query_matcher - assertion failure :
E               None
E               
E               5 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_ag_with_non_v2_sku_000001/providers/Microsoft.Network/applicationGateways/ag-000002?api-version=2024-10-01>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               custom_request_query_matcher - assertion failure :
E               None
E               
E               6 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_ag_with_non_v2_sku_000001/providers/Microsoft.Network/applicationGateways/ag-000002?api-version=2024-10-01>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               custom_request_query_matcher - assertion failure :
E               None
E               
E               7 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_ag_with_non_v2_sku_000001/providers/Microsoft.Network/applicationGateways/ag-000002?api-version=2024-10-01>).
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:279: 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")
    
>       self.kwargs["front_ip"] = self.cmd("network application-gateway show -n {ag_name} -g {rg}").get_output_in_json()["frontendIPConfigurations"][0]["name"]
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:837: 
 
 
 
 
 
 
 
 
 
 
 
 
 
                           
src/azure-cli-testsdk/azure/cli/testsdk/base.py:177: in cmd
    return execute(self.cli_ctx, command, expect_failure=expect_failure).assert_with_checks(checks)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-testsdk/azure/cli/testsdk/base.py:252: in init
    self.in_process_execute(cli_ctx, command, expect_failure=expect_failure)
                                       _ 

self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f5cc90420f0>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f5ccc191ee0>
command = 'network application-gateway show -n ag-000002 -g cli_test_ag_with_non_v2_sku_000001'
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
            self.output = stdout_buf.getvalue()
            self.applog = logging_buf.getvalue()
    
        except CannotOverwriteExistingCassetteException as ex:
>           raise AssertionError(ex)
E           AssertionError: 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 (RecordMode.ONCE: 'once').
E           No match for the request (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_ag_with_non_v2_sku_000001/providers/Microsoft.Network/applicationGateways/ag-000002?api-version=2025-07-01>)&nbsp;was&nbsp;found.
E           Found 7 similar requests with 1 different matcher(s) :
E           
E           1 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_ag_with_non_v2_sku_000001/providers/Microsoft.Network/applicationGateways/ag-000002?api-version=2024-10-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/resourceGroups/cli_test_ag_with_non_v2_sku_000001/providers/Microsoft.Network/applicationGateways/ag-000002?api-version=2023-11-01>).
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/resourceGroups/cli_test_ag_with_non_v2_sku_000001/providers/Microsoft.Network/applicationGateways/ag-000002?api-version=2023-11-01>).
E           Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E           Matchers failed :
E           _custom_request_query_matcher - assertion failure :
E           None
E           
E           4 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_ag_with_non_v2_sku_000001/providers/Microsoft.Network/applicationGateways/ag-000002?api-version=2024-10-01>).
E           Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E           Matchers failed :
E           _custom_request_query_matcher - assertion failure :
E           None
E           
E           5 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_ag_with_non_v2_sku_000001/providers/Microsoft.Network/applicationGateways/ag-000002?api-version=2024-10-01>).
E           Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E           Matchers failed :
E           _custom_request_query_matcher - assertion failure :
E           None
E           
E           6 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_ag_with_non_v2_sku_000001/providers/Microsoft.Network/applicationGateways/ag-000002?api-version=2024-10-01>).
E           Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E           Matchers failed :
E           _custom_request_query_matcher - assertion failure :
E           None
E           
E           7 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_ag_with_non_v2_sku_000001/providers/Microsoft.Network/applicationGateways/ag-000002?api-version=2024-10-01>).
E           Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E           Matchers failed :
E           _custom_request_query_matcher - assertion failure :
E           None

src/azure-cli-testsdk/azure/cli/testsdk/base.py:308: AssertionError
src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:825
Failed test_network_app_gateway_with_defaults The error message is too long, please check the pipeline log for details. src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:770
Failed test_network_app_gateway_with_waf_v2_sku The error message is too long, please check the pipeline log for details. src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:804
Failed test_network_appgw_creation_with_public_and_private_ip The error message is too long, please check the pipeline log for details. src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:850
Failed test_network_app_gateway_with_ssl_profile The error message is too long, please check the pipeline log for details. src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:1046
Failed test_network_ag_zone The error message is too long, please check the pipeline log for details. src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:1096
Failed test_network_app_gateway_no_wait The error message is too long, please check the pipeline log for details. src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:1253
Failed test_appgw_with_tcp The error message is too long, please check the pipeline log for details. src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:1354
Failed test_network_app_gateway_with_private_ip The error message is too long, please check the pipeline log for details. src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:1279
Failed test_network_ag_http_listener_with_waf_policy The error message is too long, please check the pipeline log for details. src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:1666
Failed test_network_app_gateway_waf_policy_with_application_gateway The error message is too long, please check the pipeline log for details. src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:2624
Failed test_network_application_gateway_http_settings_validate_flags The error message is too long, please check the pipeline log for details. src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:10063
Failed test_ag_rule_create_preserves_http_settings_validate_flags The error message is too long, please check the pipeline log for details. src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:10117
Failed test_application_gateway_parent_api_version self = <azure.cli.command_modules.network.tests.latest.test_network_unit_tests.TestVpnConnectionCertAuthNoSharedKey testMethod=test_application_gateway_parent_api_version>

    def test_application_gateway_parent_api_version(self):
        """Parent application-gateway operations must use API version 2025-07-01 so that
        Managed HSM SSL certificate fields (hsm.keyId / hsm.publicCertData) are preserved."""
>       from azure.cli.command_modules.network.aaz.latest.network.application_gateway import _show, _create, _update
E       ImportError: cannot import name '_show' from 'azure.cli.command_modules.network.aaz.latest.network.application_gateway' (/mnt/vss/_work/1/s/src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/application_gateway/init.py)

src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_unit_tests.py:131: ImportError
src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_unit_tests.py:127
Failed test_application_gateway_show_ssl_cert_hsm_schema self = <azure.cli.command_modules.network.tests.latest.test_network_unit_tests.TestVpnConnectionCertAuthNoSharedKey testMethod=test_application_gateway_show_ssl_cert_hsm_schema>

    def test_application_gateway_show_ssl_cert_hsm_schema(self):
        """The parent application-gateway show response schema must include the
        sslCertificates[].properties.hsm object with keyId and publicCertData."""
>       from azure.cli.command_modules.network.aaz.latest.network.application_gateway._show import Show
E       ModuleNotFoundError: No module named 'azure.cli.command_modules.network.aaz.latest.network.application_gateway._show'

src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_unit_tests.py:150: ModuleNotFoundError
src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_unit_tests.py:146
Failed test_appgw_private_endpoint_with_default The error message is too long, please check the pipeline log for details. src/azure-cli/azure/cli/command_modules/network/tests/latest/test_private_endpoint_commands.py:1618
Failed test_appgw_private_endpoint_with_overwrite_default The error message is too long, please check the pipeline log for details. src/azure-cli/azure/cli/command_modules/network/tests/latest/test_private_endpoint_commands.py:1705
❌3.14
Type Test Case Error Message Line
Failed test_ag_with_non_v2_sku self = <azure.cli.testsdk.base.ExecutionResult object at 0x7fd0e9f5cb00>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7fd0ee85bed0>
command = 'network application-gateway show -n ag-000002 -g cli_test_ag_with_non_v2_sku_000001'
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:303: 
                                        
env/lib/python3.14/site-packages/knack/cli.py:245: in invoke
    exit_code = self.exception_handler(ex)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/init.py:153: in exception_handler
    return handle_exception(ex)
           ^^^^^^^^^^^^^^^^^^^^
src/azure-cli-testsdk/azure/cli/testsdk/patches.py:33: in handle_main_exception
    raise ex
env/lib/python3.14/site-packages/knack/cli.py:233: in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:677: in execute
    raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:820: in run_jobs_serially
    results.append(self.run_job(expanded_arg, cmd_copy))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:789: in run_job
    result = cmd_copy(params)
             ^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/aaz/command.py:154: in call
    return self.handler(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/application_gateway/__cmds.py:8620: in handler
    self.execute_operations()
src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/application_gateway/__cmds.py:8647: in execute_operations
    self.ApplicationGatewaysGet(ctx=self.ctx)()
src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/application_gateway/__cmds.py:8667: in call
    session = self.client.send_request(request=request, stream=False, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/aaz/client.py:107: in send_request
    session = self.pipeline.run(request, stream=stream, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:242: in run
    return first_node.send(pipeline_request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/mgmt/core/policies/base.py:95: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/policies/redirect.py:205: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/policies/retry.py:545: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/aaz/http_policy.py:112: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:98: in send
    response = self.next.send(request)
               ^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/base.py:130: in send
    self.sender.send(request.http_request, **request.context.options),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/azure/core/pipeline/transport/requests_basic.py:375: in send
    response = self.session.request(  # type: ignore
env/lib/python3.14/site-packages/requests/sessions.py:592: in request
    resp = self.send(prep, **send_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/requests/sessions.py:706: in send
    r = adapter.send(request, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
env/lib/python3.14/site-packages/requests/adapters.py:645: in send
    resp = conn.urlopen(
env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen
    response = self.make_request(
env/lib/python3.14/site-packages/urllib3/connectionpool.py:534: in make_request
    response = conn.getresponse()
               ^^^^^^^^^^^^^^^^^^
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
         

self = <VCRRequestsHTTPSConnection/mnt/vss/work/1/s/src/azure-cli/azure/cli/command_modules/network/tests/latest/recordings/test_ag_with_non_v2_sku.yaml(host='management.azure.com', port=443) at 0x7fd0e8dcb070>
 = False, kwargs = {}

    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, self.vcr_request.uri)
        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 (RecordMode.ONCE: 'once').
E               No match for the request (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_ag_with_non_v2_sku_000001/providers/Microsoft.Network/applicationGateways/ag-000002?api-version=2025-07-01>)&nbsp;was&nbsp;found.
E               Found 7 similar requests with 1 different matcher(s) :
E               
E               1 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_ag_with_non_v2_sku_000001/providers/Microsoft.Network/applicationGateways/ag-000002?api-version=2024-10-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/resourceGroups/cli_test_ag_with_non_v2_sku_000001/providers/Microsoft.Network/applicationGateways/ag-000002?api-version=2023-11-01>).
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/resourceGroups/cli_test_ag_with_non_v2_sku_000001/providers/Microsoft.Network/applicationGateways/ag-000002?api-version=2023-11-01>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               custom_request_query_matcher - assertion failure :
E               None
E               
E               4 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_ag_with_non_v2_sku_000001/providers/Microsoft.Network/applicationGateways/ag-000002?api-version=2024-10-01>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               custom_request_query_matcher - assertion failure :
E               None
E               
E               5 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_ag_with_non_v2_sku_000001/providers/Microsoft.Network/applicationGateways/ag-000002?api-version=2024-10-01>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               custom_request_query_matcher - assertion failure :
E               None
E               
E               6 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_ag_with_non_v2_sku_000001/providers/Microsoft.Network/applicationGateways/ag-000002?api-version=2024-10-01>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               custom_request_query_matcher - assertion failure :
E               None
E               
E               7 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_ag_with_non_v2_sku_000001/providers/Microsoft.Network/applicationGateways/ag-000002?api-version=2024-10-01>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E               Matchers failed :
E               custom_request_query_matcher - assertion failure :
E               None

env/lib/python3.14/site-packages/vcr/stubs/init.py:279: 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")
    
>       self.kwargs["front_ip"] = self.cmd("network application-gateway show -n {ag_name} -g {rg}").get_output_in_json()["frontendIPConfigurations"][0]["name"]
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:837: 
 
 
 
 
 
 
 
 
 
 
 
 
 
                           
src/azure-cli-testsdk/azure/cli/testsdk/base.py:177: in cmd
    return execute(self.cli_ctx, command, expect_failure=expect_failure).assert_with_checks(checks)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-testsdk/azure/cli/testsdk/base.py:252: in init
    self.in_process_execute(cli_ctx, command, expect_failure=expect_failure)
                                       _ 

self = <azure.cli.testsdk.base.ExecutionResult object at 0x7fd0e9f5cb00>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7fd0ee85bed0>
command = 'network application-gateway show -n ag-000002 -g cli_test_ag_with_non_v2_sku_000001'
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
            self.output = stdout_buf.getvalue()
            self.applog = logging_buf.getvalue()
    
        except CannotOverwriteExistingCassetteException as ex:
>           raise AssertionError(ex)
E           AssertionError: 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 (RecordMode.ONCE: 'once').
E           No match for the request (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_ag_with_non_v2_sku_000001/providers/Microsoft.Network/applicationGateways/ag-000002?api-version=2025-07-01>)&nbsp;was&nbsp;found.
E           Found 7 similar requests with 1 different matcher(s) :
E           
E           1 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_ag_with_non_v2_sku_000001/providers/Microsoft.Network/applicationGateways/ag-000002?api-version=2024-10-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/resourceGroups/cli_test_ag_with_non_v2_sku_000001/providers/Microsoft.Network/applicationGateways/ag-000002?api-version=2023-11-01>).
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/resourceGroups/cli_test_ag_with_non_v2_sku_000001/providers/Microsoft.Network/applicationGateways/ag-000002?api-version=2023-11-01>).
E           Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E           Matchers failed :
E           _custom_request_query_matcher - assertion failure :
E           None
E           
E           4 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_ag_with_non_v2_sku_000001/providers/Microsoft.Network/applicationGateways/ag-000002?api-version=2024-10-01>).
E           Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E           Matchers failed :
E           _custom_request_query_matcher - assertion failure :
E           None
E           
E           5 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_ag_with_non_v2_sku_000001/providers/Microsoft.Network/applicationGateways/ag-000002?api-version=2024-10-01>).
E           Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E           Matchers failed :
E           _custom_request_query_matcher - assertion failure :
E           None
E           
E           6 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_ag_with_non_v2_sku_000001/providers/Microsoft.Network/applicationGateways/ag-000002?api-version=2024-10-01>).
E           Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E           Matchers failed :
E           _custom_request_query_matcher - assertion failure :
E           None
E           
E           7 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_ag_with_non_v2_sku_000001/providers/Microsoft.Network/applicationGateways/ag-000002?api-version=2024-10-01>).
E           Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E           Matchers failed :
E           _custom_request_query_matcher - assertion failure :
E           None

src/azure-cli-testsdk/azure/cli/testsdk/base.py:308: AssertionError
src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:825
Failed test_network_app_gateway_with_defaults The error message is too long, please check the pipeline log for details. src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:770
Failed test_network_app_gateway_with_waf_v2_sku The error message is too long, please check the pipeline log for details. src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:804
Failed test_network_appgw_creation_with_public_and_private_ip The error message is too long, please check the pipeline log for details. src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:850
Failed test_network_app_gateway_with_ssl_profile The error message is too long, please check the pipeline log for details. src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:1046
Failed test_network_ag_zone The error message is too long, please check the pipeline log for details. src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:1096
Failed test_network_app_gateway_no_wait The error message is too long, please check the pipeline log for details. src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:1253
Failed test_appgw_with_tcp The error message is too long, please check the pipeline log for details. src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:1354
Failed test_network_app_gateway_with_private_ip The error message is too long, please check the pipeline log for details. src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:1279
Failed test_network_ag_http_listener_with_waf_policy The error message is too long, please check the pipeline log for details. src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:1666
Failed test_network_app_gateway_waf_policy_with_application_gateway The error message is too long, please check the pipeline log for details. src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:2624
Failed test_network_application_gateway_http_settings_validate_flags The error message is too long, please check the pipeline log for details. src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:10063
Failed test_ag_rule_create_preserves_http_settings_validate_flags The error message is too long, please check the pipeline log for details. src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_commands.py:10117
Failed test_application_gateway_parent_api_version self = <azure.cli.command_modules.network.tests.latest.test_network_unit_tests.TestVpnConnectionCertAuthNoSharedKey testMethod=test_application_gateway_parent_api_version>

    def test_application_gateway_parent_api_version(self):
        """Parent application-gateway operations must use API version 2025-07-01 so that
        Managed HSM SSL certificate fields (hsm.keyId / hsm.publicCertData) are preserved."""
>       from azure.cli.command_modules.network.aaz.latest.network.application_gateway import _show, _create, _update
E       ImportError: cannot import name '_show' from 'azure.cli.command_modules.network.aaz.latest.network.application_gateway' (/mnt/vss/_work/1/s/src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/application_gateway/init.py)

src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_unit_tests.py:131: ImportError
src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_unit_tests.py:127
Failed test_application_gateway_show_ssl_cert_hsm_schema self = <azure.cli.command_modules.network.tests.latest.test_network_unit_tests.TestVpnConnectionCertAuthNoSharedKey testMethod=test_application_gateway_show_ssl_cert_hsm_schema>

    def test_application_gateway_show_ssl_cert_hsm_schema(self):
        """The parent application-gateway show response schema must include the
        sslCertificates[].properties.hsm object with keyId and publicCertData."""
>       from azure.cli.command_modules.network.aaz.latest.network.application_gateway._show import Show
E       ModuleNotFoundError: No module named 'azure.cli.command_modules.network.aaz.latest.network.application_gateway._show'

src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_unit_tests.py:150: ModuleNotFoundError
src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_unit_tests.py:146
Failed test_appgw_private_endpoint_with_default The error message is too long, please check the pipeline log for details. src/azure-cli/azure/cli/command_modules/network/tests/latest/test_private_endpoint_commands.py:1618
Failed test_appgw_private_endpoint_with_overwrite_default The error message is too long, please check the pipeline log for details. src/azure-cli/azure/cli/command_modules/network/tests/latest/test_private_endpoint_commands.py:1705
️✔️policyinsights
️✔️latest
️✔️3.12
️✔️3.14
️✔️postgresql
️✔️latest
️✔️3.12
️✔️3.14
️✔️privatedns
️✔️latest
️✔️3.12
️✔️3.14
️✔️profile
️✔️latest
️✔️3.12
️✔️3.14
️✔️rdbms
️✔️latest
️✔️3.12
️✔️3.14
️✔️redis
️✔️latest
️✔️3.12
️✔️3.14
️✔️relay
️✔️latest
️✔️3.12
️✔️3.14
️✔️resource
️✔️latest
️✔️3.12
️✔️3.14
️✔️role
️✔️latest
️✔️3.12
️✔️3.14
️✔️search
️✔️latest
️✔️3.12
️✔️3.14
️✔️security
️✔️latest
️✔️3.12
️✔️3.14
️✔️servicebus
️✔️latest
️✔️3.12
️✔️3.14
️✔️serviceconnector
️✔️latest
️✔️3.12
️✔️3.14
️✔️servicefabric
️✔️latest
️✔️3.12
️✔️3.14
️✔️signalr
️✔️latest
️✔️3.12
️✔️3.14
️✔️sql
️✔️latest
️✔️3.12
️✔️3.14
️✔️sqlvm
️✔️latest
️✔️3.12
️✔️3.14
️✔️storage
️✔️latest
️✔️3.12
️✔️3.14
️✔️synapse
️✔️latest
️✔️3.12
️✔️3.14
️✔️telemetry
️✔️latest
️✔️3.12
️✔️3.14
️✔️util
️✔️latest
️✔️3.12
️✔️3.14
️✔️vm
️✔️latest
️✔️3.12
️✔️3.14

Description

Fixes #33981.

Related command
az network application-gateway show / az network application-gateway create / az network application-gateway update

Description

The parent application_gateway AAZ operations (show, create, update) were using API version 2024-10-01, while the ssl_cert sub-group already used 2025-07-01. This mismatch caused sslCertificates[].properties.hsm.keyId and hsm.publicCertData (Managed HSM–backed certificate fields, introduced in 2025-07-01) to be silently dropped on any GET or PUT round-trip through the parent resource.

  • _show.py / _create.py / _update.py: Bumped _aaz_info["version"], the resources entry, and all api-version query parameters from 2024-10-012025-07-01.
  • Response schema (_show.py, _create.py, _update.py): Added sslCertificates[].properties.hsm (AAZObjectType) with hsm.key_id (keyId) and hsm.public_cert_data (publicCertData) to match the schema already present in the ssl_cert sub-group.

Testing Guide

New unit tests in test_network_unit_tests.py:

  • test_application_gateway_parent_api_version — asserts all three operations declare 2025-07-01 in _aaz_info and resources.
  • test_application_gateway_show_ssl_cert_hsm_schema — introspects the built ApplicationGatewaysGet response schema at runtime, asserting hsm, key_id, and public_cert_data are present under ssl_certificates.Element.properties.

History Notes

[Network] az network application-gateway show: Bump API version to 2025-07-01 so Managed HSM SSL certificate fields (hsm.keyId / hsm.publicCertData) are preserved on show/create/update

Generation source

Azure/aaz#1071

…p parent Application Gateway API version to 2025-07-01 so Managed HSM SSL certificate fields are preserved

* Initial plan

* Bump Application Gateway API version to 2025-07-01 and add Managed HSM SSL certificate fields

Co-authored-by: a0x1ab <59631311+a0x1ab@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: a0x1ab <59631311+a0x1ab@users.noreply.github.com>
@azure-client-tools-agent

Copy link
Copy Markdown
Contributor

Live test results — azdev test --live --series (changed test files only)

PASS

Selectors: test_network_unit_tests (module)
PR head ref: agent-assist/azure-azure-cli-issue-33981-ef9e71dface1
PR head sha: 6dd2eaa6a12177f8ec3ec4c4192c9d91e05f583b
PR base ref: dev
New test files in PR: false

Changed test files run
src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_unit_tests.py

Workflow run: https://github.com/Azure/issue-sentinel/actions/runs/32838009808

Last 80 lines of azdev output

=============
| Run Tests |
=============


=====================
| Discovering Tests |
=====================

/home/runner/work/issue-sentinel/issue-sentinel/azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:13705: SyntaxWarning: invalid escape sequence '\]'
  self.cmd('vmss application set -g {rg} -n {vmss} --app-version-ids {vid1} {vid2} --enable-automatic-upgrade True\]', checks=[
/home/runner/work/issue-sentinel/issue-sentinel/azure-cli/src/azure-cli/azure/cli/command_modules/identity/tests/latest/test_identity.py:18: SyntaxWarning: invalid escape sequence '\{'
  'resource_restriction_compute': '\{"providers":\["Microsoft.Compute"\]\}',
/home/runner/work/issue-sentinel/issue-sentinel/azure-cli/src/azure-cli/azure/cli/command_modules/identity/tests/latest/test_identity.py:19: SyntaxWarning: invalid escape sequence '\{'
  'resource_restriction_empty': '\{"providers":\[\]\}'

test index updated: /home/runner/.azdev/env_config/home/runner/work/issue-sentinel/issue-sentinel/.venv/test_index/latest.json

Test on modules: test_network_unit_tests

WARNING: RUNNING TESTS LIVE
The tests are set to run against current profile "latest"
============================= test session starts ==============================
platform linux -- Python 3.12.14, pytest-9.1.1, pluggy-1.6.0 -- /home/runner/work/issue-sentinel/issue-sentinel/.venv/bin/python
cachedir: .pytest_cache
rootdir: /home/runner/work/issue-sentinel/issue-sentinel/azure-cli/src/azure-cli
plugins: forked-1.7.5, xdist-3.8.0
collecting ... collected 6 items

azure-cli/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_unit_tests.py::TestNetworkUnitTests::test_network_get_nic_ip_config PASSED [ 16%]
azure-cli/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_unit_tests.py::TestNetworkUnitTests::test_network_upsert PASSED [ 33%]
azure-cli/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_unit_tests.py::TestVpnConnectionCertAuthNoSharedKey::test_application_gateway_parent_api_version PASSED [ 50%]
azure-cli/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_unit_tests.py::TestVpnConnectionCertAuthNoSharedKey::test_application_gateway_show_ssl_cert_hsm_schema PASSED [ 66%]
azure-cli/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_unit_tests.py::TestVpnConnectionCertAuthNoSharedKey::test_cert_auth_without_shared_key_should_not_raise PASSED [ 83%]
azure-cli/src/azure-cli/azure/cli/command_modules/network/tests/latest/test_network_unit_tests.py::TestVpnConnectionCertAuthNoSharedKey::test_no_shared_key_without_cert_auth_should_raise PASSED [100%]

- generated xml file: /home/runner/work/issue-sentinel/issue-sentinel/test-output/results.xml -
============================== 6 passed in 4.49s ===============================

Posted by agent-assist live-test workflow.

@azure-client-tools-agent azure-client-tools-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Aditya Pujara (@a0x1ab)

CI review: PR #33982

Upstream CI

Azure.azure-cli Full Test

  • Result: failure
  • Included checks: Azure.azure-cli Full Test (Automation Full Test Python314 Profile Latest instance1), Azure.azure-cli Full Test (Automation Full Test Python312 Profile Latest instance1), Azure.azure-cli Full Test (Automation Full Test Python312 Profile Latest instance7), Azure.azure-cli Full Test (Automation Full Test Python314 Profile Latest instance7)
  • Failure details:
      raise AssertionError(ex)

E AssertionError: Can't overwrite existing cassette ('/mnt/vss/_work/1/s/src/azure-cli/azure/cli/command_modules/network/tests/latest/recordings/test_appgw_private_endpoint_with_overwrite_default.yaml') in your current record mode (<RecordMode.ONCE: 'once'>).
E No match for the request (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_appgw_private_endpoint_with_overwrite_default000001/providers/Microsoft.Network/applicationGateways/appgw?api-version=2025-07-01>) was found.
E Found 4 similar requests with 1 different matcher(s) :
E
- Next action: Address the first actionable diagnostic quoted from the task log; do not infer a source-code cause from the aggregate build status.
- Verify: Re-run Automation Full Test Python314 Profile Latest instance1 / azdev test and confirm the quoted diagnostic is gone.

      raise AssertionError(ex)

E AssertionError: Can't overwrite existing cassette ('/mnt/vss/_work/1/s/src/azure-cli/azure/cli/command_modules/network/tests/latest/recordings/test_appgw_private_endpoint_with_overwrite_default.yaml') in your current record mode (<RecordMode.ONCE: 'once'>).
E No match for the request (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_appgw_private_endpoint_with_overwrite_default000001/providers/Microsoft.Network/applicationGateways/appgw?api-version=2025-07-01>) was found.
E Found 4 similar requests with 1 different matcher(s) :
E
- Next action: Address the first actionable diagnostic quoted from the task log; do not infer a source-code cause from the aggregate build status.
- Verify: Re-run Automation Full Test Python312 Profile Latest instance1 / azdev test and confirm the quoted diagnostic is gone.

      raise AssertionError(ex)

E AssertionError: Can't overwrite existing cassette ('/mnt/vss/_work/1/s/src/azure-cli/azure/cli/command_modules/monitor/tests/latest/recordings/test_metric_alert_special_char_scenario.yaml') in your current record mode (<RecordMode.ONCE: 'once'>).
E No match for the request (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_special_char000001/providers/Microsoft.Network/applicationGateways/ag1?api-version=2025-07-01>) was found.
E Found 1 similar requests with 1 different matcher(s) :
E
- Next action: Address the first actionable diagnostic quoted from the task log; do not infer a source-code cause from the aggregate build status.
- Verify: Re-run Automation Full Test Python314 Profile Latest instance7 / azdev test and confirm the quoted diagnostic is gone.

      raise AssertionError(ex)

E AssertionError: Can't overwrite existing cassette ('/mnt/vss/_work/1/s/src/azure-cli/azure/cli/command_modules/monitor/tests/latest/recordings/test_metric_alert_special_char_scenario.yaml') in your current record mode (<RecordMode.ONCE: 'once'>).
E No match for the request (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_special_char000001/providers/Microsoft.Network/applicationGateways/ag1?api-version=2025-07-01>) was found.
E Found 1 similar requests with 1 different matcher(s) :
E
- Next action: Address the first actionable diagnostic quoted from the task log; do not infer a source-code cause from the aggregate build status.
- Verify: Re-run Automation Full Test Python312 Profile Latest instance7 / azdev test and confirm the quoted diagnostic is gone.

Azure.azure-cli

  • Result: failure
  • Failure details:
    • Unit Test for Core Python314 (Not PR-related)
      • Evidence: The job running on agent pool-ubuntu-2204 6 ran longer than the maximum time of 10 minutes. For more information, see https://go.microsoft.com/fwlink/?linkid=2077134
      • Next action: Re-run the timed-out job. If it times out again at the same setup or checkout step, escalate to the pipeline owner instead of changing unrelated PR source.
      • Verify: Re-run Unit Test for Core Python314 and confirm the job completes within its limit.

Analysis

The PR bumps the Application Gateway API version from an older version to 2025-07-01 in _create.py, _show.py, and _update.py. The recorded CI failures are all the same root cause: the existing recorded cassette test_appgw_private_endpoint_with_overwrite_default.yaml was captured against the previous API version and no longer matches the new api-version=2025-07-01 request URL emitted by the updated code (CannotOverwriteExistingCassetteException / "No match for the request"). This is PR-related: the API version bump changes outgoing request URLs, and the existing recording was not re-generated to match.

Next action: Re-record (or regenerate) the test_appgw_private_endpoint_with_overwrite_default cassette (and any other Application Gateway recordings referencing the previous API version) against the 2025-07-01 API version, then rerun the Azure.azure-cli Full Test check to confirm the recordings match.

Test validation

  • Live test: Passed. Workflow run
  • Regression coverage: Present for network: 1 focused test file(s) changed.

No further evidence-confirmed semantic findings beyond the deterministic skill checklist above.

Risk assessment

56/100 · High · High confidence

The High rating is driven by security-sensitive behavior, public CLI behavior, generated output.

  • Change scope: 4 changed files, 93 changed lines (+83 / -10), including 3 production files.
  • Affected components: network
  • Risk drivers: security-sensitive behavior (+28); public CLI behavior (+18); generated output (+12)
  • Regression evidence: Changed regression tests are included, reducing risk.
  • Confidence: High because changed-line patches were available for every production file.
  • Required review: Owning-squad review is required for network before merge.

@azure-client-tools-agent azure-client-tools-agent Bot added azure-client-tools-agent Pull request reviewed by Azure Client Tools Agent and removed Azure Client Tools Agent Requested Request Azure Client Tools Agent testing and review labels Aug 25, 2026
@microsoft-github-policy-service

Copy link
Copy Markdown
Contributor

🔔 Routing this PR to @Azure/act-quality-productivity-squad.

@yonzhan

Copy link
Copy Markdown
Collaborator

network

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

Labels

act-quality-productivity-squad Auto-Assign Auto assign by bot azure-client-tools-agent Pull request reviewed by Azure Client Tools Agent Network az network vnet/lb/nic/dns/etc...

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The latest Azure CLI release (2.89.1) still generates the parent Application Gateway GET command with API version 2024-10-01

4 participants