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

[EG] Archboard Feedback #35738

Merged
merged 31 commits into from
May 30, 2024

caps

e015d32
Select commit
Loading
Failed to load commit list.
Merged

[EG] Archboard Feedback #35738

caps
e015d32
Select commit
Loading
Failed to load commit list.
Azure Pipelines / python - eventgrid - tests failed May 30, 2024 in 18m 13s

Build #20240529.3 had test failures

Details

Tests

  • Failed: 17 (2.25%)
  • Passed: 694 (91.80%)
  • Other: 45 (5.95%)
  • Total: 756
Code coverage

  • 379 of 725 branches covered (52.28%)
  • 2200 of 2792 lines covered (78.80%)

Annotations

Check failure on line 320 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / python - eventgrid - tests

Build log #L320

The process 'C:\hostedtoolcache\windows\Python\3.10.11\x64\python.exe' failed with exit code 1

Check failure on line 1 in test_receive_release_data

See this annotation in the file changed.

@azure-pipelines azure-pipelines / python - eventgrid - tests

test_receive_release_data

azure.core.exceptions.HttpResponseError: (ServerError) Unexpected server error
Code: ServerError
Message: Unexpected server error
Raw output
self = <test_eg_consumer_client_async.TestEventGridConsumerClientAsync object at 0x0000024473826CD0>
kwargs = {'__aggregate_cache_key': ('EnvironmentVariableLoader',), 'eventgrid_cloud_event_domain_endpoint': 'https://ta08ef9dce..._cloud_event_topic_endpoint': 'https://ta08ef9dce9dc4275cloudevent-topic.eastus-1.eventgrid.azure.net/api/events', ...}
eventgrid_endpoint = 'https://ta08ef9dce9dc4275-2.eastus-1.eventgrid.azure.net'
eventgrid_key = 'euQt1P2uLyGApPXIr9zo1jkOeQz1ADNh2AZEGBAsn+4='
eventgrid_topic_name = 'testtopic1'
eventgrid_event_subscription_name = 'testsubscription1'
publisher = <EventGridPublisherClient: namespace_topic=testtopic1, credential type=<class 'azure.core.credentials.AzureKeyCredential'>>
consumer = <EventGridConsumerClient: namespace_topic=testtopic1, subscription=testsubscription1, credential type=<class 'azure.core.credentials.AzureKeyCredential'>>
cloud_event = CloudEvent(source=http://samplesource.dev, type=Sample.Cloud.Event, specversion=1.0, id=d2aeebb5-0961-48a7-adc4-24cc5427f08d, time=2024-05-29 21:33:59.227883+00:00)

    @pytest.mark.live_test_only
    @EventGridPreparer()
    @pytest.mark.asyncio
    async def test_receive_release_data(self, **kwargs):
        eventgrid_endpoint = kwargs["eventgrid_endpoint"]
        eventgrid_key = kwargs["eventgrid_key"]
        eventgrid_topic_name = kwargs["eventgrid_topic_name"]
        eventgrid_event_subscription_name = kwargs["eventgrid_event_subscription_name"]
        publisher = EventGridPublisherClient(
            eventgrid_endpoint, AzureKeyCredential(eventgrid_key), namespace_topic=eventgrid_topic_name
        )
        consumer = EventGridConsumerClient(
            eventgrid_endpoint,
            AzureKeyCredential(eventgrid_key),
            namespace_topic=eventgrid_topic_name,
            subscription=eventgrid_event_subscription_name,
        )
        cloud_event = CloudEvent(
            source="http://samplesource.dev",
            data={"sample": "cloudevent"},
            type="Sample.Cloud.Event",
        )
        await publisher.send(cloud_event)
    
>       received_event = await consumer.receive(max_events=1)

tests\test_eg_consumer_client_async.py:132: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox\whl\lib\site-packages\azure\core\tracing\decorator_async.py:94: in wrapper_use_tracer
    return await func(*args, **kwargs)
.tox\whl\lib\site-packages\azure\eventgrid\aio\_operations\_patch.py:157: in receive
    receive_result = await self._receive(
.tox\whl\lib\site-packages\azure\core\tracing\decorator_async.py:94: in wrapper_use_tracer
    return await func(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <EventGridConsumerClient: namespace_topic=testtopic1, subscription=testsubscription1, credential type=<class 'azure.core.credentials.AzureKeyCredential'>>
topic_name = 'testtopic1', event_subscription_name = 'testsubscription1'
max_events = 1, max_wait_time = None, kwargs = {}
error_map = {304: <class 'azure.core.exceptions.ResourceNotModifiedError'>, 401: <class 'azure.core.exceptions.ClientAuthenticatio..., 404: <class 'azure.core.exceptions.ResourceNotFoundError'>, 409: <class 'azure.core.exceptions.ResourceExistsError'>}
_headers = {}, _params = {}, cls = None
_request = <HttpRequest [POST], url: 'https://ta08ef9dce9dc4275-2.eastus-1.eventgrid.azure.net/topics/testtopic1/eventsubscriptions/testsubscription1:receive?api-version=2024-06-01&maxEvents=1'>

    @distributed_trace_async
    async def _receive(  # pylint: disable=protected-access
        self,
        topic_name: str,
        event_subscription_name: str,
        *,
        max_events: Optional[int] = None,
        max_wait_time: Optional[int] = None,
        **kwargs: Any
    ) -> _models._models.ReceiveResult:
        # pylint: disable=line-too-long
        """Receive a batch of Cloud Events from a subscription.
    
        :param topic_name: Topic Name. Required.
 

Check failure on line 1 in test_receive_reject_data

See this annotation in the file changed.

@azure-pipelines azure-pipelines / python - eventgrid - tests

test_receive_reject_data

azure.core.exceptions.HttpResponseError: (ServerError) Unexpected server error
Code: ServerError
Message: Unexpected server error
Raw output
self = <test_eg_consumer_client_async.TestEventGridConsumerClientAsync object at 0x0000024473826EB0>
kwargs = {'__aggregate_cache_key': ('EnvironmentVariableLoader',), 'eventgrid_cloud_event_domain_endpoint': 'https://ta08ef9dce..._cloud_event_topic_endpoint': 'https://ta08ef9dce9dc4275cloudevent-topic.eastus-1.eventgrid.azure.net/api/events', ...}
eventgrid_endpoint = 'https://ta08ef9dce9dc4275-2.eastus-1.eventgrid.azure.net'
eventgrid_key = 'euQt1P2uLyGApPXIr9zo1jkOeQz1ADNh2AZEGBAsn+4='
eventgrid_topic_name = 'testtopic1'
eventgrid_event_subscription_name = 'testsubscription1'
publisher = <EventGridPublisherClient: namespace_topic=testtopic1, credential type=<class 'azure.core.credentials.AzureKeyCredential'>>
consumer = <EventGridConsumerClient: namespace_topic=testtopic1, subscription=testsubscription1, credential type=<class 'azure.core.credentials.AzureKeyCredential'>>
cloud_event = CloudEvent(source=http://samplesource.dev, type=Sample.Cloud.Event, specversion=1.0, id=b73f18e6-4d1f-4a83-839d-9860457af4f2, time=2024-05-29 21:34:07.059134+00:00)

    @pytest.mark.live_test_only
    @EventGridPreparer()
    @pytest.mark.asyncio
    async def test_receive_reject_data(self, **kwargs):
        eventgrid_endpoint = kwargs["eventgrid_endpoint"]
        eventgrid_key = kwargs["eventgrid_key"]
        eventgrid_topic_name = kwargs["eventgrid_topic_name"]
        eventgrid_event_subscription_name = kwargs["eventgrid_event_subscription_name"]
        publisher = EventGridPublisherClient(
            eventgrid_endpoint, AzureKeyCredential(eventgrid_key), namespace_topic=eventgrid_topic_name
        )
        consumer = EventGridConsumerClient(
            eventgrid_endpoint,
            AzureKeyCredential(eventgrid_key),
            namespace_topic=eventgrid_topic_name,
            subscription=eventgrid_event_subscription_name,
        )
        cloud_event = CloudEvent(
            source="http://samplesource.dev",
            data={"sample": "cloudevent"},
            type="Sample.Cloud.Event",
        )
        await publisher.send(cloud_event)
    
>       received_event = await consumer.receive(max_events=1)

tests\test_eg_consumer_client_async.py:163: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox\whl\lib\site-packages\azure\core\tracing\decorator_async.py:94: in wrapper_use_tracer
    return await func(*args, **kwargs)
.tox\whl\lib\site-packages\azure\eventgrid\aio\_operations\_patch.py:157: in receive
    receive_result = await self._receive(
.tox\whl\lib\site-packages\azure\core\tracing\decorator_async.py:94: in wrapper_use_tracer
    return await func(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <EventGridConsumerClient: namespace_topic=testtopic1, subscription=testsubscription1, credential type=<class 'azure.core.credentials.AzureKeyCredential'>>
topic_name = 'testtopic1', event_subscription_name = 'testsubscription1'
max_events = 1, max_wait_time = None, kwargs = {}
error_map = {304: <class 'azure.core.exceptions.ResourceNotModifiedError'>, 401: <class 'azure.core.exceptions.ClientAuthenticatio..., 404: <class 'azure.core.exceptions.ResourceNotFoundError'>, 409: <class 'azure.core.exceptions.ResourceExistsError'>}
_headers = {}, _params = {}, cls = None
_request = <HttpRequest [POST], url: 'https://ta08ef9dce9dc4275-2.eastus-1.eventgrid.azure.net/topics/testtopic1/eventsubscriptions/testsubscription1:receive?api-version=2024-06-01&maxEvents=1'>

    @distributed_trace_async
    async def _receive(  # pylint: disable=protected-access
        self,
        topic_name: str,
        event_subscription_name: str,
        *,
        max_events: Optional[int] = None,
        max_wait_time: Optional[int] = None,
        **kwargs: Any
    ) -> _models._models.ReceiveResult:
        # pylint: disable=line-too-long
        """Receive a batch of Cloud Events from a subscription.
    
        :param topic_name: Topic Name. Required.
  

Check failure on line 1 in test_receive_data

See this annotation in the file changed.

@azure-pipelines azure-pipelines / python - eventgrid - tests

test_receive_data

azure.core.exceptions.HttpResponseError: (ServerError) Unexpected server error
Code: ServerError
Message: Unexpected server error
Raw output
self = <test_eg_consumer_client.TestEventGridConsumerClient object at 0x000001B0DA2CE950>
kwargs = {'__aggregate_cache_key': ('EnvironmentVariableLoader',), 'eventgrid_cloud_event_domain_endpoint': 'https://td883c1bfd..._cloud_event_topic_endpoint': 'https://td883c1bfde0e4241cloudevent-topic.eastus-1.eventgrid.azure.net/api/events', ...}
eventgrid_endpoint = 'https://td883c1bfde0e4241-2.eastus-1.eventgrid.azure.net'
eventgrid_key = 'r/+ssghLFbqwJKEa4wagC+XaKGtM0jkh3AZEGFInc5U='
eventgrid_topic_name = 'testtopic1'
eventgrid_event_subscription_name = 'testsubscription1'
publisher = <EventGridPublisherClient: namespace_topic=testtopic1, credential type=<class 'azure.core.credentials.AzureKeyCredential'>>
consumer = <EventGridConsumerClient: namespace_topic=testtopic1, subscription=testsubscription1, credential type=<class 'azure.core.credentials.AzureKeyCredential'>>
cloud_event = CloudEvent(source=http://samplesource.dev, type=Sample.Cloud.Event, specversion=1.0, id=cc0e6fd6-12f8-4bb5-ba71-8cb59eec1012, time=2024-05-29 21:34:08.947441+00:00)

    @pytest.mark.live_test_only
    @EventGridPreparer()
    def test_receive_data(self, **kwargs):
        eventgrid_endpoint = kwargs["eventgrid_endpoint"]
        eventgrid_key = kwargs["eventgrid_key"]
        eventgrid_topic_name = kwargs["eventgrid_topic_name"]
        eventgrid_event_subscription_name = kwargs["eventgrid_event_subscription_name"]
        publisher = EventGridPublisherClient(
            eventgrid_endpoint, AzureKeyCredential(eventgrid_key), namespace_topic=eventgrid_topic_name
        )
        consumer = EventGridConsumerClient(
            eventgrid_endpoint,
            AzureKeyCredential(eventgrid_key),
            namespace_topic=eventgrid_topic_name,
            subscription=eventgrid_event_subscription_name,
        )
        cloud_event = CloudEvent(
            source="http://samplesource.dev",
            data={"sample": "cloudevent"},
            type="Sample.Cloud.Event",
        )
        publisher.send(cloud_event)
    
>       received_event = consumer.receive(max_events=1)

tests\test_eg_consumer_client.py:67: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox\whl\lib\site-packages\azure\core\tracing\decorator.py:94: in wrapper_use_tracer
    return func(*args, **kwargs)
.tox\whl\lib\site-packages\azure\eventgrid\_operations\_patch.py:196: in receive
    received_result = self._receive(
.tox\whl\lib\site-packages\azure\core\tracing\decorator.py:94: in wrapper_use_tracer
    return func(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <EventGridConsumerClient: namespace_topic=testtopic1, subscription=testsubscription1, credential type=<class 'azure.core.credentials.AzureKeyCredential'>>
topic_name = 'testtopic1', event_subscription_name = 'testsubscription1'
max_events = 1, max_wait_time = None, kwargs = {}
error_map = {304: <class 'azure.core.exceptions.ResourceNotModifiedError'>, 401: <class 'azure.core.exceptions.ClientAuthenticatio..., 404: <class 'azure.core.exceptions.ResourceNotFoundError'>, 409: <class 'azure.core.exceptions.ResourceExistsError'>}
_headers = {}, _params = {}, cls = None
_request = <HttpRequest [POST], url: 'https://td883c1bfde0e4241-2.eastus-1.eventgrid.azure.net/topics/testtopic1/eventsubscriptions/testsubscription1:receive?api-version=2024-06-01&maxEvents=1'>

    @distributed_trace
    def _receive(  # pylint: disable=protected-access
        self,
        topic_name: str,
        event_subscription_name: str,
        *,
        max_events: Optional[int] = None,
        max_wait_time: Optional[int] = None,
        **kwargs: Any
    ) -> _models._models.ReceiveResult:
        # pylint: disable=line-too-long
        """Receive a batch of Cloud Events from a subscription.
    
        :param topic_name: Topic Name. Required.
        :type topic_name: str
        :param event_subscription_name: Event Subscription Name. Required.
        :t

Check failure on line 1 in test_receive_renew_data

See this annotation in the file changed.

@azure-pipelines azure-pipelines / python - eventgrid - tests

test_receive_renew_data

azure.core.exceptions.HttpResponseError: (ServerError) Unexpected server error
Code: ServerError
Message: Unexpected server error
Raw output
self = <test_eg_consumer_client.TestEventGridConsumerClient object at 0x000001B0DA2CEB90>
kwargs = {'__aggregate_cache_key': ('EnvironmentVariableLoader',), 'eventgrid_cloud_event_domain_endpoint': 'https://td883c1bfd..._cloud_event_topic_endpoint': 'https://td883c1bfde0e4241cloudevent-topic.eastus-1.eventgrid.azure.net/api/events', ...}
eventgrid_endpoint = 'https://td883c1bfde0e4241-2.eastus-1.eventgrid.azure.net'
eventgrid_key = 'r/+ssghLFbqwJKEa4wagC+XaKGtM0jkh3AZEGFInc5U='
eventgrid_topic_name = 'testtopic1'
eventgrid_event_subscription_name = 'testsubscription1'
publisher = <EventGridPublisherClient: namespace_topic=testtopic1, credential type=<class 'azure.core.credentials.AzureKeyCredential'>>
consumer = <EventGridConsumerClient: namespace_topic=testtopic1, subscription=testsubscription1, credential type=<class 'azure.core.credentials.AzureKeyCredential'>>
cloud_event = CloudEvent(source=http://samplesource.dev, type=Sample.Cloud.Event, specversion=1.0, id=daa21ff4-a1dd-4d24-a7f3-4ac26399a583, time=2024-05-29 21:34:15.099643+00:00)

    @pytest.mark.live_test_only
    @EventGridPreparer()
    def test_receive_renew_data(self, **kwargs):
        eventgrid_endpoint = kwargs["eventgrid_endpoint"]
        eventgrid_key = kwargs["eventgrid_key"]
        eventgrid_topic_name = kwargs["eventgrid_topic_name"]
        eventgrid_event_subscription_name = kwargs["eventgrid_event_subscription_name"]
        publisher = EventGridPublisherClient(
            eventgrid_endpoint, AzureKeyCredential(eventgrid_key), namespace_topic=eventgrid_topic_name
        )
        consumer = EventGridConsumerClient(
            eventgrid_endpoint,
            AzureKeyCredential(eventgrid_key),
            namespace_topic=eventgrid_topic_name,
            subscription=eventgrid_event_subscription_name,
        )
        cloud_event = CloudEvent(
            source="http://samplesource.dev",
            data={"sample": "cloudevent"},
            type="Sample.Cloud.Event",
        )
        publisher.send(cloud_event)
    
>       received_event = consumer.receive(max_events=1)

tests\test_eg_consumer_client.py:97: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox\whl\lib\site-packages\azure\core\tracing\decorator.py:94: in wrapper_use_tracer
    return func(*args, **kwargs)
.tox\whl\lib\site-packages\azure\eventgrid\_operations\_patch.py:196: in receive
    received_result = self._receive(
.tox\whl\lib\site-packages\azure\core\tracing\decorator.py:94: in wrapper_use_tracer
    return func(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <EventGridConsumerClient: namespace_topic=testtopic1, subscription=testsubscription1, credential type=<class 'azure.core.credentials.AzureKeyCredential'>>
topic_name = 'testtopic1', event_subscription_name = 'testsubscription1'
max_events = 1, max_wait_time = None, kwargs = {}
error_map = {304: <class 'azure.core.exceptions.ResourceNotModifiedError'>, 401: <class 'azure.core.exceptions.ClientAuthenticatio..., 404: <class 'azure.core.exceptions.ResourceNotFoundError'>, 409: <class 'azure.core.exceptions.ResourceExistsError'>}
_headers = {}, _params = {}, cls = None
_request = <HttpRequest [POST], url: 'https://td883c1bfde0e4241-2.eastus-1.eventgrid.azure.net/topics/testtopic1/eventsubscriptions/testsubscription1:receive?api-version=2024-06-01&maxEvents=1'>

    @distributed_trace
    def _receive(  # pylint: disable=protected-access
        self,
        topic_name: str,
        event_subscription_name: str,
        *,
        max_events: Optional[int] = None,
        max_wait_time: Optional[int] = None,
        **kwargs: Any
    ) -> _models._models.ReceiveResult:
        # pylint: disable=line-too-long
        """Receive a batch of Cloud Events from a subscription.
    
        :param topic_name: Topic Name. Required.
        :type topic_name: str
        :param event_subscription_name: Event Subscription Name. Required.