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

[AutoRelease] t2-devopsinfrastructure-2024-10-21-49326(can only be merged by SDK owner) #38004

Closed

code and test

ec91b50
Select commit
Loading
Failed to load commit list.
Closed

[AutoRelease] t2-devopsinfrastructure-2024-10-21-49326(can only be merged by SDK owner) #38004

code and test
ec91b50
Select commit
Loading
Failed to load commit list.
Azure Pipelines / python - pullrequest failed Oct 21, 2024 in 43m 27s

Build #20241020.10 had test failures

Details

Tests

  • Failed: 56 (0.17%)
  • Passed: 27,352 (84.67%)
  • Other: 4,898 (15.16%)
  • Total: 32,306

Annotations

Check failure on line 60 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / python - pullrequest

Build log #L60

ENOENT: no such file or directory, stat '/mnt/vss/_work/1/s/eng/common/scripts/Verify-Readme.ps1'

Check failure on line 57 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / python - pullrequest

Build log #L57

ENOENT: no such file or directory, stat '/mnt/vss/_work/1/s/scripts/devops_tasks/dispatch_tox.py'

Check failure on line 13656 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / python - pullrequest

Build log #L13656

PowerShell exited with code '1'.

Check failure on line 73 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / python - pullrequest

Build log #L73

ENOENT: no such file or directory, stat '/mnt/vss/_work/1/s/eng/common/scripts/Detect-Api-Changes.ps1'

Check failure on line 1 in test_list_pools_by_resource_group

See this annotation in the file changed.

@azure-pipelines azure-pipelines / python - pullrequest

test_list_pools_by_resource_group

azure.core.exceptions.ResourceNotFoundError: Unable to find a record for the request GET https://Sanitized.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.DevOpsInfrastructure/pools?api-version=2024-10-19
Remaining entry: https://Sanitized.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.DevOpsInfrastructure/pools?api-version=2024-04-04-preview
Uri doesn't match:
    request <https://Sanitized.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.DevOpsInfrastructure/pools?api-version=2024-10-19>
    record  <https://Sanitized.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.DevOpsInfrastructure/pools?api-version=2024-04-04-preview>
Header differences:
Body differences:

Content: {"Message":"Unable to find a record for the request GET https://Sanitized.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.DevOpsInfrastructure/pools?api-version=2024-10-19\nRemaining entry: https://Sanitized.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.DevOpsInfrastructure/pools?api-version=2024-04-04-preview\nUri doesn\u0027t match:\n    request \u003Chttps://Sanitized.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.DevOpsInfrastructure/pools?api-version=2024-10-19\u003E\n    record  \u003Chttps://Sanitized.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.DevOpsInfrastructure/pools?api-version=2024-04-04-preview\u003E\nHeader differences:\nBody differences:\n","Status":"NotFound"}
Raw output
args = (<test_cli_mgmt_devopsinfrastructure.TestMgmtDevOpsInfrastructure object at 0x7f462508e5d0>,)
kwargs = {'__aggregate_cache_key': ('ResourceGroupPreparer', 'resource_group', ''), 'location': 'eastus', 'resource_group': FakeResource(name='rgname', id='/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname')}
trimmed_kwargs = {'resource_group': FakeResource(name='rgname', id='/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname')}
test_id = 'sdk/devopsinfrastructure/azure-mgmt-devopsinfrastructure/tests/recordings/test_cli_mgmt_devopsinfrastructure.pyTestMgmtDevOpsInfrastructuretest_list_pools_by_resource_group'
variables = {}
combined_call = <function recorded_by_proxy.<locals>.record_wrap.<locals>.combined_call at 0x7f4625161760>
test_variables = None, test_run = False, logger = <RootLogger root (INFO)>

    def record_wrap(*args, **kwargs):
        def transform_args(*args, **kwargs):
            copied_positional_args = list(args)
            request = copied_positional_args[1]
    
            transform_request(request, recording_id)
    
            return tuple(copied_positional_args), kwargs
    
        trimmed_kwargs = {k: v for k, v in kwargs.items()}
        trim_kwargs_from_test_function(test_func, trimmed_kwargs)
    
        if is_live_and_not_recording():
            return test_func(*args, **trimmed_kwargs)
    
        test_id = get_test_id()
        recording_id, variables = start_record_or_playback(test_id)
        original_transport_func = RequestsTransport.send
    
        def combined_call(*args, **kwargs):
            adjusted_args, adjusted_kwargs = transform_args(*args, **kwargs)
            result = original_transport_func(*adjusted_args, **adjusted_kwargs)
    
            # make the x-recording-upstream-base-uri the URL of the request
            # this makes the request look like it was made to the original endpoint instead of to the proxy
            # without this, things like LROPollers can get broken by polling the wrong endpoint
            parsed_result = url_parse.urlparse(result.request.url)
            upstream_uri = url_parse.urlparse(result.request.headers["x-recording-upstream-base-uri"])
            upstream_uri_dict = {
                "scheme": upstream_uri.scheme,
                "netloc": upstream_uri.netloc,
            }
            original_target = parsed_result._replace(**upstream_uri_dict).geturl()
    
            result.request.url = original_target
            return result
    
        RequestsTransport.send = combined_call
    
        # call the modified function
        # we define test_variables before invoking the test so the variable is defined in case of an exception
        test_variables = None
        # this tracks whether the test has been run yet; used when calling the test function with/without `variables`
        # running without `variables` in the `except` block leads to unnecessary exceptions in test execution output
        test_run = False
        try:
            try:
                test_variables = test_func(*args, variables=variables, **trimmed_kwargs)
                test_run = True
            except TypeError as error:
                if "unexpected keyword argument" in str(error) and "variables" in str(error):
                    logger = logging.getLogger()
                    logger.info(
                        "This test can't accept variables as input. The test method should accept `**kwargs` and/or a "
                        "`variables` parameter to make use of recorded test variables."
                    )
                else:
                    raise error
            # if the test couldn't accept `variables`, run the test without passing them
            if not test_run:
>               test_variables = test_func(*args, **trimmed_kwargs)

.tox/mindependency/lib/python3.13/site-packages/devtools_testutils/proxy_testcase.py:238: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Check failure on line 1 in test_list_sku

See this annotation in the file changed.

@azure-pipelines azure-pipelines / python - pullrequest

test_list_sku

azure.core.exceptions.ResourceNotFoundError: Unable to find a record for the request GET https://Sanitized.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DevOpsInfrastructure/locations/eastus/skus?api-version=2024-10-19
Remaining entry: https://Sanitized.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DevOpsInfrastructure/locations/eastus/skus?api-version=2024-04-04-preview
Uri doesn't match:
    request <https://Sanitized.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DevOpsInfrastructure/locations/eastus/skus?api-version=2024-10-19>
    record  <https://Sanitized.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DevOpsInfrastructure/locations/eastus/skus?api-version=2024-04-04-preview>
Header differences:
Body differences:

Content: {"Message":"Unable to find a record for the request GET https://Sanitized.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DevOpsInfrastructure/locations/eastus/skus?api-version=2024-10-19\nRemaining entry: https://Sanitized.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DevOpsInfrastructure/locations/eastus/skus?api-version=2024-04-04-preview\nUri doesn\u0027t match:\n    request \u003Chttps://Sanitized.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DevOpsInfrastructure/locations/eastus/skus?api-version=2024-10-19\u003E\n    record  \u003Chttps://Sanitized.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DevOpsInfrastructure/locations/eastus/skus?api-version=2024-04-04-preview\u003E\nHeader differences:\nBody differences:\n","Status":"NotFound"}
Raw output
args = (<test_cli_mgmt_devopsinfrastructure.TestMgmtDevOpsInfrastructure object at 0x7f462508e710>,)
kwargs = {}, trimmed_kwargs = {}
test_id = 'sdk/devopsinfrastructure/azure-mgmt-devopsinfrastructure/tests/recordings/test_cli_mgmt_devopsinfrastructure.pyTestMgmtDevOpsInfrastructuretest_list_sku'
variables = {}
combined_call = <function recorded_by_proxy.<locals>.record_wrap.<locals>.combined_call at 0x7f4624e62160>
test_variables = None, test_run = False, logger = <RootLogger root (INFO)>

    def record_wrap(*args, **kwargs):
        def transform_args(*args, **kwargs):
            copied_positional_args = list(args)
            request = copied_positional_args[1]
    
            transform_request(request, recording_id)
    
            return tuple(copied_positional_args), kwargs
    
        trimmed_kwargs = {k: v for k, v in kwargs.items()}
        trim_kwargs_from_test_function(test_func, trimmed_kwargs)
    
        if is_live_and_not_recording():
            return test_func(*args, **trimmed_kwargs)
    
        test_id = get_test_id()
        recording_id, variables = start_record_or_playback(test_id)
        original_transport_func = RequestsTransport.send
    
        def combined_call(*args, **kwargs):
            adjusted_args, adjusted_kwargs = transform_args(*args, **kwargs)
            result = original_transport_func(*adjusted_args, **adjusted_kwargs)
    
            # make the x-recording-upstream-base-uri the URL of the request
            # this makes the request look like it was made to the original endpoint instead of to the proxy
            # without this, things like LROPollers can get broken by polling the wrong endpoint
            parsed_result = url_parse.urlparse(result.request.url)
            upstream_uri = url_parse.urlparse(result.request.headers["x-recording-upstream-base-uri"])
            upstream_uri_dict = {
                "scheme": upstream_uri.scheme,
                "netloc": upstream_uri.netloc,
            }
            original_target = parsed_result._replace(**upstream_uri_dict).geturl()
    
            result.request.url = original_target
            return result
    
        RequestsTransport.send = combined_call
    
        # call the modified function
        # we define test_variables before invoking the test so the variable is defined in case of an exception
        test_variables = None
        # this tracks whether the test has been run yet; used when calling the test function with/without `variables`
        # running without `variables` in the `except` block leads to unnecessary exceptions in test execution output
        test_run = False
        try:
            try:
                test_variables = test_func(*args, variables=variables, **trimmed_kwargs)
                test_run = True
            except TypeError as error:
                if "unexpected keyword argument" in str(error) and "variables" in str(error):
                    logger = logging.getLogger()
                    logger.info(
                        "This test can't accept variables as input. The test method should accept `**kwargs` and/or a "
                        "`variables` parameter to make use of recorded test variables."
                    )
                else:
                    raise error
            # if the test couldn't accept `variables`, run the test without passing them
            if not test_run:
>               test_variables = test_func(*args, **trimmed_kwargs)

.tox/mindependency/lib/python3.13/site-packages/devtools_testutils/proxy_testcase.py:238: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <test_cli_mgmt_devopsinfrastructure.TestMgmtDevOpsInfrastructure object at 0x7f462508e710>

    @recorded_by_proxy
    def test_list_sku(self):
>       assert list(self.client.sku.list_by_location(AZURE_LOCATION)) != []

tests/test_cli_mgmt_devopsinfrastructure.py:27: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Check failure on line 1 in test_list_operations

See this annotation in the file changed.

@azure-pipelines azure-pipelines / python - pullrequest

test_list_operations

azure.core.exceptions.ResourceNotFoundError: Unable to find a record for the request GET https://Sanitized.azure.com/providers/Microsoft.DevOpsInfrastructure/operations?api-version=2024-10-19
Remaining entry: https://Sanitized.azure.com/providers/Microsoft.DevOpsInfrastructure/operations?api-version=2024-04-04-preview
Uri doesn't match:
    request <https://Sanitized.azure.com/providers/Microsoft.DevOpsInfrastructure/operations?api-version=2024-10-19>
    record  <https://Sanitized.azure.com/providers/Microsoft.DevOpsInfrastructure/operations?api-version=2024-04-04-preview>
Header differences:
Body differences:

Content: {"Message":"Unable to find a record for the request GET https://Sanitized.azure.com/providers/Microsoft.DevOpsInfrastructure/operations?api-version=2024-10-19\nRemaining entry: https://Sanitized.azure.com/providers/Microsoft.DevOpsInfrastructure/operations?api-version=2024-04-04-preview\nUri doesn\u0027t match:\n    request \u003Chttps://Sanitized.azure.com/providers/Microsoft.DevOpsInfrastructure/operations?api-version=2024-10-19\u003E\n    record  \u003Chttps://Sanitized.azure.com/providers/Microsoft.DevOpsInfrastructure/operations?api-version=2024-04-04-preview\u003E\nHeader differences:\nBody differences:\n","Status":"NotFound"}
Raw output
args = (<test_cli_mgmt_devopsinfrastructure.TestMgmtDevOpsInfrastructure object at 0x7f4625207490>,)
kwargs = {}, trimmed_kwargs = {}
test_id = 'sdk/devopsinfrastructure/azure-mgmt-devopsinfrastructure/tests/recordings/test_cli_mgmt_devopsinfrastructure.pyTestMgmtDevOpsInfrastructuretest_list_operations'
variables = {}
combined_call = <function recorded_by_proxy.<locals>.record_wrap.<locals>.combined_call at 0x7f46250449a0>
test_variables = None, test_run = False, logger = <RootLogger root (INFO)>

    def record_wrap(*args, **kwargs):
        def transform_args(*args, **kwargs):
            copied_positional_args = list(args)
            request = copied_positional_args[1]
    
            transform_request(request, recording_id)
    
            return tuple(copied_positional_args), kwargs
    
        trimmed_kwargs = {k: v for k, v in kwargs.items()}
        trim_kwargs_from_test_function(test_func, trimmed_kwargs)
    
        if is_live_and_not_recording():
            return test_func(*args, **trimmed_kwargs)
    
        test_id = get_test_id()
        recording_id, variables = start_record_or_playback(test_id)
        original_transport_func = RequestsTransport.send
    
        def combined_call(*args, **kwargs):
            adjusted_args, adjusted_kwargs = transform_args(*args, **kwargs)
            result = original_transport_func(*adjusted_args, **adjusted_kwargs)
    
            # make the x-recording-upstream-base-uri the URL of the request
            # this makes the request look like it was made to the original endpoint instead of to the proxy
            # without this, things like LROPollers can get broken by polling the wrong endpoint
            parsed_result = url_parse.urlparse(result.request.url)
            upstream_uri = url_parse.urlparse(result.request.headers["x-recording-upstream-base-uri"])
            upstream_uri_dict = {
                "scheme": upstream_uri.scheme,
                "netloc": upstream_uri.netloc,
            }
            original_target = parsed_result._replace(**upstream_uri_dict).geturl()
    
            result.request.url = original_target
            return result
    
        RequestsTransport.send = combined_call
    
        # call the modified function
        # we define test_variables before invoking the test so the variable is defined in case of an exception
        test_variables = None
        # this tracks whether the test has been run yet; used when calling the test function with/without `variables`
        # running without `variables` in the `except` block leads to unnecessary exceptions in test execution output
        test_run = False
        try:
            try:
                test_variables = test_func(*args, variables=variables, **trimmed_kwargs)
                test_run = True
            except TypeError as error:
                if "unexpected keyword argument" in str(error) and "variables" in str(error):
                    logger = logging.getLogger()
                    logger.info(
                        "This test can't accept variables as input. The test method should accept `**kwargs` and/or a "
                        "`variables` parameter to make use of recorded test variables."
                    )
                else:
                    raise error
            # if the test couldn't accept `variables`, run the test without passing them
            if not test_run:
>               test_variables = test_func(*args, **trimmed_kwargs)

.tox/mindependency/lib/python3.13/site-packages/devtools_testutils/proxy_testcase.py:238: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <test_cli_mgmt_devopsinfrastructure.TestMgmtDevOpsInfrastructure object at 0x7f4625207490>

    @recorded_by_proxy
    def test_list_operations(self):
>       assert list(self.client.operations.list())

tests/test_cli_mgmt_devopsinfrastructure.py:35: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

Check failure on line 1 in test_list_subscription_usages

See this annotation in the file changed.

@azure-pipelines azure-pipelines / python - pullrequest

test_list_subscription_usages

AttributeError: 'SubscriptionUsagesOperations' object has no attribute 'list_by_location'
Raw output
args = (<test_cli_mgmt_devopsinfrastructure.TestMgmtDevOpsInfrastructure object at 0x7f4625206c40>,)
kwargs = {}, trimmed_kwargs = {}
test_id = 'sdk/devopsinfrastructure/azure-mgmt-devopsinfrastructure/tests/recordings/test_cli_mgmt_devopsinfrastructure.pyTestMgmtDevOpsInfrastructuretest_list_subscription_usages'
variables = {}
combined_call = <function recorded_by_proxy.<locals>.record_wrap.<locals>.combined_call at 0x7f4624e63920>
test_variables = None, test_run = False, logger = <RootLogger root (INFO)>

    def record_wrap(*args, **kwargs):
        def transform_args(*args, **kwargs):
            copied_positional_args = list(args)
            request = copied_positional_args[1]
    
            transform_request(request, recording_id)
    
            return tuple(copied_positional_args), kwargs
    
        trimmed_kwargs = {k: v for k, v in kwargs.items()}
        trim_kwargs_from_test_function(test_func, trimmed_kwargs)
    
        if is_live_and_not_recording():
            return test_func(*args, **trimmed_kwargs)
    
        test_id = get_test_id()
        recording_id, variables = start_record_or_playback(test_id)
        original_transport_func = RequestsTransport.send
    
        def combined_call(*args, **kwargs):
            adjusted_args, adjusted_kwargs = transform_args(*args, **kwargs)
            result = original_transport_func(*adjusted_args, **adjusted_kwargs)
    
            # make the x-recording-upstream-base-uri the URL of the request
            # this makes the request look like it was made to the original endpoint instead of to the proxy
            # without this, things like LROPollers can get broken by polling the wrong endpoint
            parsed_result = url_parse.urlparse(result.request.url)
            upstream_uri = url_parse.urlparse(result.request.headers["x-recording-upstream-base-uri"])
            upstream_uri_dict = {
                "scheme": upstream_uri.scheme,
                "netloc": upstream_uri.netloc,
            }
            original_target = parsed_result._replace(**upstream_uri_dict).geturl()
    
            result.request.url = original_target
            return result
    
        RequestsTransport.send = combined_call
    
        # call the modified function
        # we define test_variables before invoking the test so the variable is defined in case of an exception
        test_variables = None
        # this tracks whether the test has been run yet; used when calling the test function with/without `variables`
        # running without `variables` in the `except` block leads to unnecessary exceptions in test execution output
        test_run = False
        try:
            try:
                test_variables = test_func(*args, variables=variables, **trimmed_kwargs)
                test_run = True
            except TypeError as error:
                if "unexpected keyword argument" in str(error) and "variables" in str(error):
                    logger = logging.getLogger()
                    logger.info(
                        "This test can't accept variables as input. The test method should accept `**kwargs` and/or a "
                        "`variables` parameter to make use of recorded test variables."
                    )
                else:
                    raise error
            # if the test couldn't accept `variables`, run the test without passing them
            if not test_run:
>               test_variables = test_func(*args, **trimmed_kwargs)

.tox/mindependency/lib/python3.13/site-packages/devtools_testutils/proxy_testcase.py:238: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <test_cli_mgmt_devopsinfrastructure.TestMgmtDevOpsInfrastructure object at 0x7f4625206c40>

    @recorded_by_proxy
    def test_list_subscription_usages(self):
>       assert list(self.client.subscription_usages.list_by_location(AZURE_LOCATION)) != []
E       AttributeError: 'SubscriptionUsagesOperations' object has n