Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

{RDBMS} az postgres flexible-server parameter set : Fix error message when invalid configuration name or source is provided #30691

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

nasc17
Copy link
Member

@nasc17 nasc17 commented Jan 22, 2025

Related command
az postgres flexible-server parameter set

Description
az postgres flexible-server parameter set --resource-group rg-nacho-playground --server-name pgtest16 --name existing_or_non_existing_something --source valid_or:invalid_source

reports back this:

Code: InternalServerError
Message: An unexpected error occured while processing the request.

Testing Guide
PS C:\azure-cli> az postgres flexible-server parameter set --resource-group nasc-runner --server-name nasc-pg812 --name invalidetest --source invalidtest
(ConfigurationNotExists) The configuration 'invalidetest' does not exist for nasc-pg812 server version 16.
Code: ConfigurationNotExists
Message: The configuration 'invalidetest' does not exist for nasc-pg812 server version 16.

History Notes

[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change
[Component Name 2] az command b: Add some customer-facing feature


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

Copy link

azure-client-tools-bot-prd bot commented Jan 22, 2025

❌AzureCLI-FullTest
️✔️acr
️✔️2020-09-01-hybrid
️✔️3.12
️✔️3.9
️✔️latest
️✔️3.12
️✔️3.9
️✔️acs
️✔️2020-09-01-hybrid
️✔️3.12
️✔️3.9
️✔️latest
️✔️3.12
️✔️3.9
️✔️advisor
️✔️latest
️✔️3.12
️✔️3.9
️✔️ams
️✔️latest
️✔️3.12
️✔️3.9
️✔️apim
️✔️latest
️✔️3.12
️✔️3.9
️✔️appconfig
️✔️latest
️✔️3.12
️✔️3.9
️✔️appservice
️✔️latest
️✔️3.12
️✔️3.9
️✔️aro
️✔️latest
️✔️3.12
️✔️3.9
️✔️backup
️✔️latest
️✔️3.12
️✔️3.9
️✔️batch
️✔️latest
️✔️3.12
️✔️3.9
️✔️batchai
️✔️latest
️✔️3.12
️✔️3.9
️✔️billing
️✔️latest
️✔️3.12
️✔️3.9
️✔️botservice
️✔️latest
️✔️3.12
️✔️3.9
️✔️cdn
️✔️latest
️✔️3.12
️✔️3.9
️✔️cloud
️✔️latest
️✔️3.12
️✔️3.9
️✔️cognitiveservices
️✔️latest
️✔️3.12
️✔️3.9
️✔️compute_recommender
️✔️latest
️✔️3.12
️✔️3.9
️✔️computefleet
️✔️latest
️✔️3.12
️✔️3.9
️✔️config
️✔️latest
️✔️3.12
️✔️3.9
️✔️configure
️✔️latest
️✔️3.12
️✔️3.9
️✔️consumption
️✔️latest
️✔️3.12
️✔️3.9
️✔️container
️✔️latest
️✔️3.12
️✔️3.9
️✔️containerapp
️✔️latest
️✔️3.12
️✔️3.9
️✔️core
️✔️2018-03-01-hybrid
️✔️3.12
️✔️3.9
️✔️2019-03-01-hybrid
️✔️3.12
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.12
️✔️3.9
️✔️latest
️✔️3.12
️✔️3.9
️✔️cosmosdb
️✔️latest
️✔️3.12
️✔️3.9
️✔️databoxedge
️✔️2019-03-01-hybrid
️✔️3.12
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.12
️✔️3.9
️✔️latest
️✔️3.12
️✔️3.9
️✔️dls
️✔️latest
️✔️3.12
️✔️3.9
️✔️dms
️✔️latest
️✔️3.12
️✔️3.9
️✔️eventgrid
️✔️latest
️✔️3.12
️✔️3.9
️✔️eventhubs
️✔️latest
️✔️3.12
️✔️3.9
️✔️feedback
️✔️latest
️✔️3.12
️✔️3.9
️✔️find
️✔️latest
️✔️3.12
️✔️3.9
️✔️hdinsight
️✔️latest
️✔️3.12
️✔️3.9
️✔️identity
️✔️latest
️✔️3.12
️✔️3.9
️✔️iot
️✔️2019-03-01-hybrid
️✔️3.12
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.12
️✔️3.9
️✔️latest
️✔️3.12
️✔️3.9
️✔️keyvault
️✔️2018-03-01-hybrid
️✔️3.12
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.12
️✔️3.9
️✔️latest
️✔️3.12
️✔️3.9
️✔️lab
️✔️latest
️✔️3.12
️✔️3.9
️✔️managedservices
️✔️latest
️✔️3.12
️✔️3.9
️✔️maps
️✔️latest
️✔️3.12
️✔️3.9
️✔️marketplaceordering
️✔️latest
️✔️3.12
️✔️3.9
️✔️monitor
️✔️latest
️✔️3.12
️✔️3.9
️✔️mysql
️✔️latest
️✔️3.12
️✔️3.9
️✔️netappfiles
️✔️latest
️✔️3.12
️✔️3.9
️✔️network
️✔️2018-03-01-hybrid
️✔️3.12
️✔️3.9
️✔️latest
️✔️3.12
️✔️3.9
️✔️policyinsights
️✔️latest
️✔️3.12
️✔️3.9
️✔️privatedns
️✔️latest
️✔️3.12
️✔️3.9
️✔️profile
️✔️latest
️✔️3.12
️✔️3.9
❌rdbms
❌latest
❌3.12
Type Test Case Error Message Line
Failed test_postgres_flexible_server_proxy_resource self = <azure.cli.testsdk.base.ExecutionResult object at 0x7fb120866930>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7fb1235d5580>
command = 'postgres flexible-server parameter set --name lock_timeout -v 2000 --source user-override -s azuredbclitest-000002 -g clitest.rg000001'
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)
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: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:714: in run_job
    result = LongRunningOperation(cmd_copy.cli_ctx, 'Starting {}'.format(cmd_copy.name))(result)
src/azure-cli-core/azure/cli/core/commands/init.py:1063: in call
    result = poller.result()
env/lib/python3.12/site-packages/azure/core/polling/poller.py:251: in result
    self.wait(timeout)
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/core/polling/poller.py:270: in wait
    raise self.exception  # type: ignore
env/lib/python3.12/site-packages/azure/core/polling/poller.py:185: in start
    self.polling_method.run()
env/lib/python3.12/site-packages/azure/core/polling/base_polling.py:757: in run
    self.poll()
env/lib/python3.12/site-packages/azure/core/polling/base_polling.py:793: in poll
    self.pipeline_response = self.request_status(final_get_url)
env/lib/python3.12/site-packages/azure/core/polling/base_polling.py:833: in request_status
    self.client.send_request(rest_request, return_pipeline_response=True, **self.operation_config),
env/lib/python3.12/site-packages/azure/core/pipeline_client.py:198: in send_request
    pipeline_response = self.pipeline.run(request, stream=stream, **kwargs)  # 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/rdbms/tests/latest/recordings/test_postgres_flexible_server_proxy_resource.yaml object at 0x7fb1208a9130>
 = 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/rdbms/tests/latest/recordings/test_postgres_flexible_server_proxy_resource.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/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/flexibleServers/azuredbclitest-000002/configurations/lock_timeout?api-version=2024-11-01-preview>)&nbsp;was&nbsp;found.
E               Found 2 similar requests with 0 different matcher(s) :
E               
E               1 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/flexibleServers/azuredbclitest-000002/configurations/lock_timeout?api-version=2024-11-01-preview>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path', 'custom_request_query_matcher']
E               Matchers failed :
E               
E               2 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/flexibleServers/azuredbclitest-000002/configurations/lock_timeout?api-version=2024-11-01-preview>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path', 'custom_request_query_matcher']
E               Matchers failed :

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.rdbms.tests.latest.test_rdbms_flexible_commands.FlexibleServerProxyResourceMgmtScenarioTest testMethod=test_postgres_flexible_server_proxy_resource>
resource_group = 'clitest.rg000001', server = 'azuredbclitest-000002'

    @AllowLargeResponse()
    @ResourceGroupPreparer(location=postgres_location)
    @ServerPreparer(engine_type='postgres', location=postgres_location)
    def test_postgres_flexible_server_proxy_resource(self, resource_group, server):
        self.test_firewall_rule_mgmt('postgres', resource_group, server)
>       self.test_parameter_mgmt('postgres', resource_group, server)

src/azure-cli/azure/cli/command_modules/rdbms/tests/latest/test_rdbms_flexible_commands.py:1029: 
 
 
 
 
 
 
 
 
 
                               
src/azure-cli/azure/cli/command_modules/rdbms/tests/latest/test_rdbms_flexible_commands.py:1101: in test_parameter_mgmt
    self.cmd('{} flexible-server parameter set --name {} -v {} --source {} -s {} -g {}'.format(database_engine, parameter_name, value, source, server, resource_group),
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)
 
                                       

self = <azure.cli.testsdk.base.ExecutionResult object at 0x7fb120866930>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7fb1235d5580>
command = 'postgres flexible-server parameter set --name lock_timeout -v 2000 --source user-override -s azuredbclitest-000002 -g clitest.rg000001'
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/rdbms/tests/latest/recordings/test_postgres_flexible_server_proxy_resource.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/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/flexibleServers/azuredbclitest-000002/configurations/lock_timeout?api-version=2024-11-01-preview>)&nbsp;was&nbsp;found.
E           Found 2 similar requests with 0 different matcher(s) :
E           
E           1 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/flexibleServers/azuredbclitest-000002/configurations/lock_timeout?api-version=2024-11-01-preview>).
E           Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path', '_custom_request_query_matcher']
E           Matchers failed :
E           
E           2 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/flexibleServers/azuredbclitest-000002/configurations/lock_timeout?api-version=2024-11-01-preview>).
E           Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path', '_custom_request_query_matcher']
E           Matchers failed :

src/azure-cli-testsdk/azure/cli/testsdk/base.py:307: AssertionError
azure/cli/command_modules/rdbms/tests/latest/test_rdbms_flexible_commands.py:1023
Failed test_postgres_flexible_server_logs_mgmt self = <azure.cli.testsdk.base.ExecutionResult object at 0x7fb121014680>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7fb1232e8530>
command = 'postgres flexible-server parameter set -g clitest.rg000001 --server-name azuredbclitest-000002 --name logfiles.download_enable --value on'
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)
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: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:714: in run_job
    result = LongRunningOperation(cmd_copy.cli_ctx, 'Starting {}'.format(cmd_copy.name))(result)
src/azure-cli-core/azure/cli/core/commands/init.py:1063: in call
    result = poller.result()
env/lib/python3.12/site-packages/azure/core/polling/poller.py:251: in result
    self.wait(timeout)
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/core/polling/poller.py:270: in wait
    raise self.exception  # type: ignore
env/lib/python3.12/site-packages/azure/core/polling/poller.py:185: in start
    self.polling_method.run()
env/lib/python3.12/site-packages/azure/core/polling/base_polling.py:757: in run
    self.poll()
env/lib/python3.12/site-packages/azure/core/polling/base_polling.py:793: in poll
    self.pipeline_response = self.request_status(final_get_url)
env/lib/python3.12/site-packages/azure/core/polling/base_polling.py:833: in request_status
    self.client.send_request(rest_request, return_pipeline_response=True, **self.operation_config),
env/lib/python3.12/site-packages/azure/core/pipeline_client.py:198: in send_request
    pipeline_response = self.pipeline.run(request, stream=stream, **kwargs)  # 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/rdbms/tests/latest/recordings/test_postgres_flexible_server_logs_mgmt.yaml object at 0x7fb121092900>
 = 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/rdbms/tests/latest/recordings/test_postgres_flexible_server_logs_mgmt.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/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/flexibleServers/azuredbclitest-000002/configurations/logfiles.download_enable?api-version=2024-11-01-preview>)&nbsp;was&nbsp;found.
E               Found 1 similar requests with 0 different matcher(s) :
E               
E               1 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/flexibleServers/azuredbclitest-000002/configurations/logfiles.download_enable?api-version=2024-11-01-preview>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path', 'custom_request_query_matcher']
E               Matchers failed :

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.rdbms.tests.latest.test_rdbms_flexible_commands.FlexibleServerLogsMgmtScenarioTest testMethod=test_postgres_flexible_server_logs_mgmt>
resource_group = 'clitest.rg000001'

    @AllowLargeResponse()
    @ResourceGroupPreparer(location=postgres_location)
    def test_postgres_flexible_server_logs_mgmt(self, resource_group):
>       self.test_server_logs_mgmt('postgres', resource_group)

src/azure-cli/azure/cli/command_modules/rdbms/tests/latest/test_rdbms_flexible_commands.py:2491: 
 
 
 
 
 
 
 
                                 
src/azure-cli/azure/cli/command_modules/rdbms/tests/latest/test_rdbms_flexible_commands.py:2504: in test_server_logs_mgmt
    self.cmd('{} flexible-server parameter set -g {} --server-name {} --name logfiles.download_enable --value on'
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)
 
                                       

self = <azure.cli.testsdk.base.ExecutionResult object at 0x7fb121014680>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7fb1232e8530>
command = 'postgres flexible-server parameter set -g clitest.rg000001 --server-name azuredbclitest-000002 --name logfiles.download_enable --value on'
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/rdbms/tests/latest/recordings/test_postgres_flexible_server_logs_mgmt.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/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/flexibleServers/azuredbclitest-000002/configurations/logfiles.download_enable?api-version=2024-11-01-preview>)&nbsp;was&nbsp;found.
E           Found 1 similar requests with 0 different matcher(s) :
E           
E           1 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/flexibleServers/azuredbclitest-000002/configurations/logfiles.download_enable?api-version=2024-11-01-preview>).
E           Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path', '_custom_request_query_matcher']
E           Matchers failed :

src/azure-cli-testsdk/azure/cli/testsdk/base.py:307: AssertionError
azure/cli/command_modules/rdbms/tests/latest/test_rdbms_flexible_commands.py:2487
❌3.9
Type Test Case Error Message Line
Failed test_postgres_flexible_server_proxy_resource self = <azure.cli.testsdk.base.ExecutionResult object at 0x7fe72f3741f0>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7fe7321700d0>
command = 'postgres flexible-server parameter set --name lock_timeout -v 2000 --source user-override -s azuredbclitest-000002 -g clitest.rg000001'
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)
src/azure-cli-testsdk/azure/cli/testsdk/patches.py:33: in handle_main_exception
    raise ex
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:714: in run_job
    result = LongRunningOperation(cmd_copy.cli_ctx, 'Starting {}'.format(cmd_copy.name))(result)
src/azure-cli-core/azure/cli/core/commands/init.py:1063: in call
    result = poller.result()
env/lib/python3.9/site-packages/azure/core/polling/poller.py:251: in result
    self.wait(timeout)
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/core/polling/poller.py:270: in wait
    raise self.exception  # type: ignore
env/lib/python3.9/site-packages/azure/core/polling/poller.py:185: in start
    self.polling_method.run()
env/lib/python3.9/site-packages/azure/core/polling/base_polling.py:757: in run
    self.poll()
env/lib/python3.9/site-packages/azure/core/polling/base_polling.py:793: in poll
    self.pipeline_response = self.request_status(final_get_url)
env/lib/python3.9/site-packages/azure/core/polling/base_polling.py:833: in request_status
    self.client.send_request(rest_request, return_pipeline_response=True, **self.operation_config),
env/lib/python3.9/site-packages/azure/core/pipeline_client.py:198: in send_request
    pipeline_response = self.pipeline.run(request, stream=stream, **kwargs)  # pylint: disable=protected-access
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:229: in run
    return first_node.send(pipeline_request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:86: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:86: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:86: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:86: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:86: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/mgmt/core/policies/base.py:47: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/policies/redirect.py:197: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/policies/retry.py:532: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/policies/authentication.py:147: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:86: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:86: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:86: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:86: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:86: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:118: in send
    self.sender.send(request.http_request, **request.context.options),
env/lib/python3.9/site-packages/azure/core/pipeline/transport/requests_basic.py:355: in send
    response = self.session.request(  # type: ignore
env/lib/python3.9/site-packages/requests/sessions.py:589: in request
    resp = self.send(prep, **send_kwargs)
env/lib/python3.9/site-packages/requests/sessions.py:703: in send
    r = adapter.send(request, **kwargs)
env/lib/python3.9/site-packages/requests/adapters.py:667: in send
    resp = conn.urlopen(
env/lib/python3.9/site-packages/urllib3/connectionpool.py:715: in urlopen
    httplib_response = self.make_request(
env/lib/python3.9/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/rdbms/tests/latest/recordings/test_postgres_flexible_server_proxy_resource.yaml object at 0x7fe72f3bad30>
 = 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/rdbms/tests/latest/recordings/test_postgres_flexible_server_proxy_resource.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/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/flexibleServers/azuredbclitest-000002/configurations/lock_timeout?api-version=2024-11-01-preview>)&nbsp;was&nbsp;found.
E               Found 2 similar requests with 0 different matcher(s) :
E               
E               1 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/flexibleServers/azuredbclitest-000002/configurations/lock_timeout?api-version=2024-11-01-preview>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path', 'custom_request_query_matcher']
E               Matchers failed :
E               
E               2 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/flexibleServers/azuredbclitest-000002/configurations/lock_timeout?api-version=2024-11-01-preview>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path', 'custom_request_query_matcher']
E               Matchers failed :

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

During handling of the above exception, another exception occurred:

self = <azure.cli.command_modules.rdbms.tests.latest.test_rdbms_flexible_commands.FlexibleServerProxyResourceMgmtScenarioTest testMethod=test_postgres_flexible_server_proxy_resource>
resource_group = 'clitest.rg000001', server = 'azuredbclitest-000002'

    @AllowLargeResponse()
    @ResourceGroupPreparer(location=postgres_location)
    @ServerPreparer(engine_type='postgres', location=postgres_location)
    def test_postgres_flexible_server_proxy_resource(self, resource_group, server):
        self.test_firewall_rule_mgmt('postgres', resource_group, server)
>       self.test_parameter_mgmt('postgres', resource_group, server)

src/azure-cli/azure/cli/command_modules/rdbms/tests/latest/test_rdbms_flexible_commands.py:1029: 
 
 
 
 
 
 
 
 
 
                               
src/azure-cli/azure/cli/command_modules/rdbms/tests/latest/test_rdbms_flexible_commands.py:1101: in test_parameter_mgmt
    self.cmd('{} flexible-server parameter set --name {} -v {} --source {} -s {} -g {}'.format(database_engine, parameter_name, value, source, server, resource_group),
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)
 
                                       

self = <azure.cli.testsdk.base.ExecutionResult object at 0x7fe72f3741f0>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7fe7321700d0>
command = 'postgres flexible-server parameter set --name lock_timeout -v 2000 --source user-override -s azuredbclitest-000002 -g clitest.rg000001'
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/rdbms/tests/latest/recordings/test_postgres_flexible_server_proxy_resource.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/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/flexibleServers/azuredbclitest-000002/configurations/lock_timeout?api-version=2024-11-01-preview>)&nbsp;was&nbsp;found.
E           Found 2 similar requests with 0 different matcher(s) :
E           
E           1 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/flexibleServers/azuredbclitest-000002/configurations/lock_timeout?api-version=2024-11-01-preview>).
E           Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path', '_custom_request_query_matcher']
E           Matchers failed :
E           
E           2 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/flexibleServers/azuredbclitest-000002/configurations/lock_timeout?api-version=2024-11-01-preview>).
E           Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path', '_custom_request_query_matcher']
E           Matchers failed :

src/azure-cli-testsdk/azure/cli/testsdk/base.py:307: AssertionError
azure/cli/command_modules/rdbms/tests/latest/test_rdbms_flexible_commands.py:1023
Failed test_postgres_flexible_server_logs_mgmt self = <azure.cli.testsdk.base.ExecutionResult object at 0x7fe72fbb9040>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7fe731f48850>
command = 'postgres flexible-server parameter set -g clitest.rg000001 --server-name azuredbclitest-000002 --name logfiles.download_enable --value on'
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)
src/azure-cli-testsdk/azure/cli/testsdk/patches.py:33: in handle_main_exception
    raise ex
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:714: in run_job
    result = LongRunningOperation(cmd_copy.cli_ctx, 'Starting {}'.format(cmd_copy.name))(result)
src/azure-cli-core/azure/cli/core/commands/init.py:1063: in call
    result = poller.result()
env/lib/python3.9/site-packages/azure/core/polling/poller.py:251: in result
    self.wait(timeout)
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/core/polling/poller.py:270: in wait
    raise self.exception  # type: ignore
env/lib/python3.9/site-packages/azure/core/polling/poller.py:185: in start
    self.polling_method.run()
env/lib/python3.9/site-packages/azure/core/polling/base_polling.py:757: in run
    self.poll()
env/lib/python3.9/site-packages/azure/core/polling/base_polling.py:793: in poll
    self.pipeline_response = self.request_status(final_get_url)
env/lib/python3.9/site-packages/azure/core/polling/base_polling.py:833: in request_status
    self.client.send_request(rest_request, return_pipeline_response=True, **self.operation_config),
env/lib/python3.9/site-packages/azure/core/pipeline_client.py:198: in send_request
    pipeline_response = self.pipeline.run(request, stream=stream, **kwargs)  # pylint: disable=protected-access
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:229: in run
    return first_node.send(pipeline_request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:86: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:86: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:86: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:86: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:86: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/mgmt/core/policies/base.py:47: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/policies/redirect.py:197: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/policies/retry.py:532: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/policies/authentication.py:147: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:86: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:86: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:86: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:86: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:86: in send
    response = self.next.send(request)
env/lib/python3.9/site-packages/azure/core/pipeline/base.py:118: in send
    self.sender.send(request.http_request, **request.context.options),
env/lib/python3.9/site-packages/azure/core/pipeline/transport/requests_basic.py:355: in send
    response = self.session.request(  # type: ignore
env/lib/python3.9/site-packages/requests/sessions.py:589: in request
    resp = self.send(prep, **send_kwargs)
env/lib/python3.9/site-packages/requests/sessions.py:703: in send
    r = adapter.send(request, **kwargs)
env/lib/python3.9/site-packages/requests/adapters.py:667: in send
    resp = conn.urlopen(
env/lib/python3.9/site-packages/urllib3/connectionpool.py:715: in urlopen
    httplib_response = self.make_request(
env/lib/python3.9/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/rdbms/tests/latest/recordings/test_postgres_flexible_server_logs_mgmt.yaml object at 0x7fe72fad0ac0>
 = 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/rdbms/tests/latest/recordings/test_postgres_flexible_server_logs_mgmt.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/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/flexibleServers/azuredbclitest-000002/configurations/logfiles.download_enable?api-version=2024-11-01-preview>)&nbsp;was&nbsp;found.
E               Found 1 similar requests with 0 different matcher(s) :
E               
E               1 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/flexibleServers/azuredbclitest-000002/configurations/logfiles.download_enable?api-version=2024-11-01-preview>).
E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path', 'custom_request_query_matcher']
E               Matchers failed :

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

During handling of the above exception, another exception occurred:

self = <azure.cli.command_modules.rdbms.tests.latest.test_rdbms_flexible_commands.FlexibleServerLogsMgmtScenarioTest testMethod=test_postgres_flexible_server_logs_mgmt>
resource_group = 'clitest.rg000001'

    @AllowLargeResponse()
    @ResourceGroupPreparer(location=postgres_location)
    def test_postgres_flexible_server_logs_mgmt(self, resource_group):
>       self.test_server_logs_mgmt('postgres', resource_group)

src/azure-cli/azure/cli/command_modules/rdbms/tests/latest/test_rdbms_flexible_commands.py:2491: 
 
 
 
 
 
 
 
                                 
src/azure-cli/azure/cli/command_modules/rdbms/tests/latest/test_rdbms_flexible_commands.py:2504: in test_server_logs_mgmt
    self.cmd('{} flexible-server parameter set -g {} --server-name {} --name logfiles.download_enable --value on'
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)
 
                                       

self = <azure.cli.testsdk.base.ExecutionResult object at 0x7fe72fbb9040>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7fe731f48850>
command = 'postgres flexible-server parameter set -g clitest.rg000001 --server-name azuredbclitest-000002 --name logfiles.download_enable --value on'
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/rdbms/tests/latest/recordings/test_postgres_flexible_server_logs_mgmt.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/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/flexibleServers/azuredbclitest-000002/configurations/logfiles.download_enable?api-version=2024-11-01-preview>)&nbsp;was&nbsp;found.
E           Found 1 similar requests with 0 different matcher(s) :
E           
E           1 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.DBforPostgreSQL/flexibleServers/azuredbclitest-000002/configurations/logfiles.download_enable?api-version=2024-11-01-preview>).
E           Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path', '_custom_request_query_matcher']
E           Matchers failed :

src/azure-cli-testsdk/azure/cli/testsdk/base.py:307: AssertionError
azure/cli/command_modules/rdbms/tests/latest/test_rdbms_flexible_commands.py:2487
️✔️redis
️✔️latest
️✔️3.12
️✔️3.9
️✔️relay
️✔️latest
️✔️3.12
️✔️3.9
️✔️resource
️✔️2018-03-01-hybrid
️✔️3.12
️✔️3.9
️✔️2019-03-01-hybrid
️✔️3.12
️✔️3.9
️✔️latest
️✔️3.12
️✔️3.9
️✔️role
️✔️latest
️✔️3.12
️✔️3.9
️✔️search
️✔️latest
️✔️3.12
️✔️3.9
️✔️security
️✔️latest
️✔️3.12
️✔️3.9
️✔️servicebus
️✔️latest
️✔️3.12
️✔️3.9
️✔️serviceconnector
️✔️latest
️✔️3.12
️✔️3.9
️✔️servicefabric
️✔️latest
️✔️3.12
️✔️3.9
️✔️signalr
️✔️latest
️✔️3.12
️✔️3.9
️✔️sql
️✔️latest
️✔️3.12
️✔️3.9
️✔️sqlvm
️✔️latest
️✔️3.12
️✔️3.9
️✔️storage
️✔️2018-03-01-hybrid
️✔️3.12
️✔️3.9
️✔️2019-03-01-hybrid
️✔️3.12
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.12
️✔️3.9
️✔️latest
️✔️3.12
️✔️3.9
️✔️synapse
️✔️latest
️✔️3.12
️✔️3.9
️✔️telemetry
️✔️2018-03-01-hybrid
️✔️3.12
️✔️3.9
️✔️2019-03-01-hybrid
️✔️3.12
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.12
️✔️3.9
️✔️latest
️✔️3.12
️✔️3.9
️✔️util
️✔️latest
️✔️3.12
️✔️3.9
️✔️vm
️✔️2018-03-01-hybrid
️✔️3.12
️✔️3.9
️✔️2019-03-01-hybrid
️✔️3.12
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.12
️✔️3.9
️✔️latest
️✔️3.12
️✔️3.9

Copy link

Hi @nasc17,
Since the current milestone time is less than 7 days, this pr will be reviewed in the next milestone.

Copy link

azure-client-tools-bot-prd bot commented Jan 22, 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-01-23T03:03:43+00:00 to 2025-01-23T03:01:28+00:00 please change property default from 2025-01-23T03:01:28+00:00 to 2025-01-23T03:03:43+00:00 for parameter restore_point_in_time of cmd postgres flexible-server geo-restore

@yonzhan
Copy link
Collaborator

yonzhan commented Jan 22, 2025

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

@evelyn-ys
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

Copy link
Contributor

@nachoalonsoportillo nachoalonsoportillo left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Assign Auto assign by bot
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants