Add Otel Integrations #45343
Add Otel Integrations #45343
Build #20260520.9 had test failures
Details
- Failed: 2 (0.02%)
- Passed: 10,697 (99.38%)
- Other: 65 (0.60%)
- Total: 10,764
Annotations
Check failure on line 27 in Build log
azure-pipelines / python - cosmos - ci
Build log #L27
There are one or more test failures detected in result files. Detailed summary of published test results can be viewed in the Tests tab.
Check failure on line 347 in Build log
azure-pipelines / python - cosmos - ci
Build log #L347
The Operation will be canceled. The next steps may not contain expected logs.
Check failure on line 370 in Build log
azure-pipelines / python - cosmos - ci
Build log #L370
The operation was canceled.
Check failure on line 1 in test_service_response_retry_policy
azure-pipelines / python - cosmos - ci
test_service_response_retry_policy
assert 1 == 3
+ where 1 = <test_service_retry_policies.TestServiceRetryPolicies.MockExecuteServiceResponseExceptionIgnoreQuery object at 0x0000020F6710C910>.counter
Raw output
self = <test_service_retry_policies.TestServiceRetryPolicies testMethod=test_service_response_retry_policy>
def test_service_response_retry_policy(self):
mock_client = CosmosClient(self.host, self.masterKey)
db = mock_client.get_database_client(self.TEST_DATABASE_ID)
container = db.get_container_client(self.TEST_CONTAINER_ID)
created_item = container.create_item({"id": str(uuid.uuid4()), "pk": str(uuid.uuid4())})
# Change the location cache to have 3 preferred read regions
original_location_cache = mock_client.client_connection._global_endpoint_manager.location_cache
self._setup_read_regions(original_location_cache, [self.REGION1, self.REGION2, self.REGION3])
mf = self.MockExecuteServiceResponseExceptionIgnoreQuery(Exception, _retry_utility.ExecuteFunction)
with patch.object(_retry_utility, 'ExecuteFunction', mf):
with pytest.raises(ServiceResponseError):
container.read_item(created_item['id'], created_item['pk'])
> assert mf.counter == 3
E assert 1 == 3
E + where 1 = <test_service_retry_policies.TestServiceRetryPolicies.MockExecuteServiceResponseExceptionIgnoreQuery object at 0x0000020F6710C910>.counter
tests\test_service_retry_policies.py:120: AssertionError
Check failure on line 1 in test_cross_region_retry[503]
azure-pipelines / python - cosmos - ci
test_cross_region_retry[503]
AssertionError: assert 'https://127.0.0.1:8081/' == 'other-region'
- other-region
+ https://127.0.0.1:8081/
Raw output
self = <test_timeout_and_failover_retry_policy.TestTimeoutRetryPolicy object at 0x0000020F6DEE0810>
setup = {'created_collection': <ContainerProxy [dbs/PythonSDKTestDatabase-e47a87ef-2c16-433d-928f-fb2a00855439/colls/test-timeout-retry-policy-container-2652e518-563a-472b-a957-40386a8ab434]>}
error_code = 503
@pytest.mark.parametrize("error_code", error_codes())
def test_cross_region_retry(self, setup, error_code):
mock_client = cosmos_client.CosmosClient(self.host, self.masterKey)
db = mock_client.get_database_client(self.TEST_DATABASE_ID)
container = db.get_container_client(self.TEST_CONTAINER_SINGLE_PARTITION_ID)
document_definition = {'id': 'failoverDoc' + str(uuid.uuid4()),
'pk': 'pk',
'name': 'sample document',
'key': 'value'}
created_document = container.create_item(body=document_definition)
self.original_execute_function = _retry_utility.ExecuteFunction
original_location_cache = mock_client.client_connection._global_endpoint_manager.location_cache
fake_endpoint = "other-region"
region_1 = "East US"
region_2 = "West US"
regional_routing_context = RegionalRoutingContext(self.host)
regional_routing_context_2 = RegionalRoutingContext(fake_endpoint)
original_location_cache.account_read_locations = [region_1, region_2]
original_location_cache.account_read_regional_routing_contexts_by_location = {region_1: regional_routing_context,
region_2: regional_routing_context_2
}
original_location_cache.read_regional_routing_contexts = [regional_routing_context, regional_routing_context_2]
try:
# should retry once and then succeed
mf = self.MockExecuteFunctionCrossRegion(self.original_execute_function, error_code, fake_endpoint)
_retry_utility.ExecuteFunction = mf
> container.read_item(item=created_document['id'],
partition_key=created_document['pk'])
tests\test_timeout_and_failover_retry_policy.py:144:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
..\..\..\.venv\azure-cosmos\.venv_sdist\Lib\site-packages\azure\core\tracing\decorator.py:119: in wrapper_use_tracer
return func(*args, **kwargs)
..\..\..\.venv\azure-cosmos\.venv_sdist\Lib\site-packages\azure\cosmos\_cosmos_span_attributes.py:236: in wrapper
result = func(*args, **func_kwargs)
..\..\..\.venv\azure-cosmos\.venv_sdist\Lib\site-packages\azure\cosmos\container.py:306: in read_item
return self.client_connection.ReadItem(document_link=doc_link, options=request_options, **kwargs)
..\..\..\.venv\azure-cosmos\.venv_sdist\Lib\site-packages\azure\cosmos\_cosmos_client_connection.py:1520: in ReadItem
return self.Read(path, http_constants.ResourceType.Document, document_id, None, options, **kwargs)
..\..\..\.venv\azure-cosmos\.venv_sdist\Lib\site-packages\azure\cosmos\_cosmos_client_connection.py:2964: in Read
result, last_response_headers = self.__Get(path, request_params, headers, **kwargs)
..\..\..\.venv\azure-cosmos\.venv_sdist\Lib\site-packages\azure\cosmos\_cosmos_client_connection.py:3036: in __Get
return synchronized_request.SynchronizedRequest(
..\..\..\.venv\azure-cosmos\.venv_sdist\Lib\site-packages\azure\cosmos\_synchronized_request.py:288: in SynchronizedRequest
return _retry_utility.Execute(
..\..\..\.venv\azure-cosmos\.venv_sdist\Lib\site-packages\azure\cosmos\_retry_utility.py:138: in Execute
result = ExecuteFunction(function, global_endpoint_manager, *arg
... [The stack trace has been truncated as it exceeded the maximum allowed size. Please refer to the complete log available in the Test Run attachments for full details.]