Skip to content

refactor

0f28a75
Select commit
Loading
Failed to load commit list.
Merged

Use azpysdk next-* and ruff checks in CI #44679

refactor
0f28a75
Select commit
Loading
Failed to load commit list.
Azure Pipelines / python - core - tests-weekly failed Mar 2, 2026 in 39m 11s

Build #20260302.1 had test failures

Details

Tests

  • Failed: 2 (0.01%, 0 new, 2 recurring)
  • Passed: 17,135 (99.67%)
  • Other: 55 (0.32%)
  • Total: 17,192

Annotations

Check failure on line 4168 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / python - core - tests-weekly

Build log #L4168

The process '/opt/hostedtoolcache/Python/3.10.19/x64/bin/python' failed with exit code 30

Check failure on line 1594 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / python - core - tests-weekly

Build log #L1594

The process '/opt/hostedtoolcache/Python/3.10.19/x64/bin/python' failed with exit code 1

Check failure on line 1184 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / python - core - tests-weekly

Build log #L1184

The process '/opt/hostedtoolcache/Python/3.10.19/x64/bin/python' failed with exit code 1

Check failure on line 12 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / python - core - tests-weekly

Build log #L12

OpenTelemetry packages not available – Geneva logging disabled.

Check failure on line 1 in test_eventhubs_client_tracing

See this annotation in the file changed.

@azure-pipelines azure-pipelines / python - core - tests-weekly

test_eventhubs_client_tracing

assert 0 == 2
 +  where 0 = len(())
Raw output
self = <test_eventhubs_live.TestEventHubsTracing object at 0x0000022546CBC620>
config = {'eventhub_connection_string': 'Endpoint=sb://ta6229b92f1984e7eeh.servicebus.windows.net/;SharedAccessKeyName=RootMana...haredAccessKey=+qMhXw89vh0JKuREEieUYw+Nn6Biu/AC7+ASbIPVxz8=', 'servicebus_queue_name': 'ta6229b92f1984e7esbqueue', ...}
tracing_helper = <conftest.TracingTestHelper object at 0x00000225499BC200>

    @pytest.mark.live_test_only
    @pytest.mark.skipif(sys.platform.startswith("darwin"), reason="threading issues on mac CI")
    def test_eventhubs_client_tracing(self, config, tracing_helper):
    
        connection_string = config["eventhub_connection_string"]
        eventhub_name = config["eventhub_name"]
    
        producer_client = EventHubProducerClient.from_connection_string(
            conn_str=connection_string,
            eventhub_name=eventhub_name,
        )
    
        consumer_client = EventHubConsumerClient.from_connection_string(
            conn_str=connection_string,
            consumer_group="$Default",
            eventhub_name=eventhub_name,
        )
    
        with tracing_helper.tracer.start_as_current_span(name="root"):
    
            current_date = datetime.now()
    
            with producer_client:
    
                # Send batch of events
                event_data_batch = producer_client.create_batch()
                event_data_batch.add(EventData("First message inside an EventDataBatch"))
                event_data_batch.add(EventData("Second message inside an EventDataBatch"))
                producer_client.send_batch(event_data_batch)
    
            send_spans = tracing_helper.exporter.get_finished_spans()
    
            # We expect 3 spans to have finished: 1 send spans, and 2 message spans.
            assert len(send_spans) == 3
    
            server_address = producer_client._address.hostname
            dest_name = producer_client._address.path
    
            # Verify the spans from the batch send.
            self._verify_message(span=send_spans[0], dest=dest_name, server_address=server_address)
            self._verify_message(span=send_spans[1], dest=dest_name, server_address=server_address)
            self._verify_send(span=send_spans[2], dest=dest_name, server_address=server_address, message_count=2)
    
            # Verify span links from batch send.
            assert len(send_spans[2].links) == 2
            link = send_spans[2].links[0]
            assert link.context.span_id == send_spans[0].context.span_id
            assert link.context.trace_id == send_spans[0].context.trace_id
    
            link = send_spans[2].links[1]
            assert link.context.span_id == send_spans[1].context.span_id
            assert link.context.trace_id == send_spans[1].context.trace_id
    
            tracing_helper.exporter.clear()
    
            def on_event_batch(partition_context, event_batch):
                pass
    
            # Receive batch of events.
            worker = threading.Thread(
                target=with_current_context(consumer_client.receive_batch),
                args=(on_event_batch,),
                kwargs={"starting_position": current_date},
            )
            worker.daemon = True
            worker.start()
            worker.join(timeout=3)
    
            receive_spans = tracing_helper.exporter.get_finished_spans()
    
            # We expect 2 spans to have finished: 1 receive span and 1 process span.
>           assert len(receive_spans) == 2
E           assert 0 == 2
E            +  where 0 = len(())

tests\test_eventhubs_live.py:139: AssertionError

Check failure on line 1 in test_servicebus_client_tracing_queue

See this annotation in the file changed.

@azure-pipelines azure-pipelines / python - core - tests-weekly

test_servicebus_client_tracing_queue

assert 7 == 5
 +  where 7 = len((<opentelemetry.sdk.trace.ReadableSpan object at 0x0000022549D2B9E0>, <opentelemetry.sdk.trace.ReadableSpan object at 0x0000022549D2BA70>, <opentelemetry.sdk.trace.ReadableSpan object at 0x0000022549D70170>, <opentelemetry.sdk.trace.ReadableSpan object at 0x0000022549D70500>, <opentelemetry.sdk.trace.ReadableSpan object at 0x0000022549D70530>, <opentelemetry.sdk.trace.ReadableSpan object at 0x0000022549D70860>, ...))
Raw output
self = <test_servicebus_live.TestServiceBusTracing object at 0x0000022549362810>
config = {'eventhub_connection_string': 'Endpoint=sb://ta6229b92f1984e7eeh.servicebus.windows.net/;SharedAccessKeyName=RootMana...haredAccessKey=+qMhXw89vh0JKuREEieUYw+Nn6Biu/AC7+ASbIPVxz8=', 'servicebus_queue_name': 'ta6229b92f1984e7esbqueue', ...}
tracing_helper = <conftest.TracingTestHelper object at 0x0000022549650B00>

    @pytest.mark.live_test_only
    def test_servicebus_client_tracing_queue(self, config, tracing_helper):
        connection_string = config["servicebus_connection_string"]
        queue_name = config["servicebus_queue_name"]
        client = ServiceBusClient.from_connection_string(connection_string)
    
        with tracing_helper.tracer.start_as_current_span(name="root"):
            with client.get_queue_sender(queue_name) as sender:
    
                # Sending a single message
                sender.send_messages(ServiceBusMessage("Test foo message"))
    
                # Sending a batch of messages
                message_batch = sender.create_message_batch()
                message_batch.add_message(ServiceBusMessage("First batch foo message"))
                message_batch.add_message(ServiceBusMessage("Second batch foo message"))
                sender.send_messages(message_batch)
    
            send_spans = tracing_helper.exporter.get_finished_spans()
            server_address = sender.fully_qualified_namespace
    
            # We expect 5 spans to have finished: 2 send spans, and 3 message spans.
>           assert len(send_spans) == 5
E           assert 7 == 5
E            +  where 7 = len((<opentelemetry.sdk.trace.ReadableSpan object at 0x0000022549D2B9E0>, <opentelemetry.sdk.trace.ReadableSpan object at 0x0000022549D2BA70>, <opentelemetry.sdk.trace.ReadableSpan object at 0x0000022549D70170>, <opentelemetry.sdk.trace.ReadableSpan object at 0x0000022549D70500>, <opentelemetry.sdk.trace.ReadableSpan object at 0x0000022549D70530>, <opentelemetry.sdk.trace.ReadableSpan object at 0x0000022549D70860>, ...))

tests\test_servicebus_live.py:84: AssertionError