Skip to content

Push on development #3225

Push on development

Push on development #3225

GitHub Actions / JUnit Test Report failed Oct 25, 2024 in 0s

835 tests run, 828 passed, 6 skipped, 1 failed.

Annotations

Check failure on line 1 in app/tests/e2e/issuer/test_save_exchange_record.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_save_exchange_record.test_issue_credential_with_save_exchange_record[clean-clean-clean-clean-clean-True]

failed on setup with "fastapi.exceptions.HTTPException: 503: upstream connect error or disconnect/reset before headers. reset reason: connection termination"
Raw output
self = <shared.util.rich_async_client.RichAsyncClient object at 0x7fe8cf355ee0>
url = '/v1/connections/accept-invitation'
kwargs = {'json': {'alias': 'AliceFaberConnection', 'invitation': {'@id': '400954a9-2755-45e8-beb0-fc47aa5dfdca', '@type': 'https://didcomm.org/connections/1.0/invitation', 'did': None, 'imageUrl': None, ...}}}
response = <Response [503 Service Unavailable]>, code = 503
message = 'upstream connect error or disconnect/reset before headers. reset reason: connection termination'
log_message = 'Tenant alice_WDIYW - HTTP POST `/v1/connections/accept-invitation` failed. Status code: 503. Response: `upstream connect error or disconnect/reset before headers. reset reason: connection termination`.'

    async def post(self, url: str, **kwargs) -> Response:
        try:
            response = await super().post(url, **kwargs)
            if self.raise_status_error:
>               response.raise_for_status()  # Raise exception for 4xx and 5xx status codes

shared/util/rich_async_client.py:33: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <Response [503 Service Unavailable]>

    def raise_for_status(self) -> Response:
        """
        Raise the `HTTPStatusError` if one occurred.
        """
        request = self._request
        if request is None:
            raise RuntimeError(
                "Cannot call `raise_for_status` as the request "
                "instance has not been set on this response."
            )
    
        if self.is_success:
            return self
    
        if self.has_redirect_location:
            message = (
                "{error_type} '{0.status_code} {0.reason_phrase}' for url '{0.url}'\n"
                "Redirect location: '{0.headers[location]}'\n"
                "For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/{0.status_code}"
            )
        else:
            message = (
                "{error_type} '{0.status_code} {0.reason_phrase}' for url '{0.url}'\n"
                "For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/{0.status_code}"
            )
    
        status_class = self.status_code // 100
        error_types = {
            1: "Informational response",
            3: "Redirect response",
            4: "Client error",
            5: "Server error",
        }
        error_type = error_types.get(status_class, "Invalid status code")
        message = message.format(self, error_type=error_type)
>       raise HTTPStatusError(message, request=request, response=self)
E       httpx.HTTPStatusError: Server error '503 Service Unavailable' for url 'https://governance-tenant-web.cloudapi.dev.didxtech.com/tenant/v1/connections/accept-invitation'
E       For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/503

/usr/local/lib/python3.12/site-packages/httpx/_models.py:763: HTTPStatusError

The above exception was the direct cause of the following exception:

anyio_backend = 'asyncio'
request = <SubRequest 'faber_and_alice_connection' for <Function test_issue_credential_with_save_exchange_record[clean-clean-clean-clean-clean-True]>>
args = ()
kwargs = {'alice_member_client': <shared.util.rich_async_client.RichAsyncClient object at 0x7fe8cf355ee0>, 'faber_client': <shared.util.rich_async_client.RichAsyncClient object at 0x7fe8cf355bb0>, 'test_mode': 'clean'}
local_func = <function faber_and_alice_connection at 0x7fe8d816c720>
backend_name = 'asyncio', backend_options = {}
runner = <anyio._backends._asyncio.TestRunner object at 0x7fe8cf31cb30>

    def wrapper(
        *args: Any, anyio_backend: Any, request: SubRequest, **kwargs: Any
    ) -> Any:
        # Rebind any fixture methods to the request instance
        if (
            request.instance
            and ismethod(func)
            and type(func.__self__) is type(request.instance)
        ):
            local_func = func.__func__.__get__(request.instance)
        else:
            local_func = func
    
        backend_name, backend_options = extract_backend_and_options(anyio_backend)
        if has_backend_arg:
            kwargs["anyio_backend"] = anyio_backend
    
        if has_request_arg:
            kwargs["request"] = request
    
        with get_runner(backend_name, backend_options) as runner:
            if isasyncgenfunction(local_func):
                yield from runner.run_asyncgen_fixture(local_func, kwargs)
            else:
>               yield runner.run_fixture(local_func, kwargs)

/usr/local/lib/python3.12/site-packages/anyio/pytest_plugin.py:100: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py:2237: in run_fixture
    retval = self.get_loop().run_until_complete(
/usr/local/lib/python3.12/asyncio/base_events.py:687: in run_until_complete
    return future.result()
/usr/local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py:2207: in _call_in_runner_task
    return await future
/usr/local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py:2174: in _run_tests_and_fixtures
    retval = await coro
app/tests/fixtures/member_connections.py:46: in faber_and_alice_connection
    bob_alice_connection = await create_connection_by_test_mode(
app/tests/util/connections.py:169: in create_connection_by_test_mode
    return await create_bob_alice_connection(
app/tests/util/connections.py:80: in create_bob_alice_connection
    await alice_member_client.post(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <shared.util.rich_async_client.RichAsyncClient object at 0x7fe8cf355ee0>
url = '/v1/connections/accept-invitation'
kwargs = {'json': {'alias': 'AliceFaberConnection', 'invitation': {'@id': '400954a9-2755-45e8-beb0-fc47aa5dfdca', '@type': 'https://didcomm.org/connections/1.0/invitation', 'did': None, 'imageUrl': None, ...}}}
response = <Response [503 Service Unavailable]>, code = 503
message = 'upstream connect error or disconnect/reset before headers. reset reason: connection termination'
log_message = 'Tenant alice_WDIYW - HTTP POST `/v1/connections/accept-invitation` failed. Status code: 503. Response: `upstream connect error or disconnect/reset before headers. reset reason: connection termination`.'

    async def post(self, url: str, **kwargs) -> Response:
        try:
            response = await super().post(url, **kwargs)
            if self.raise_status_error:
                response.raise_for_status()  # Raise exception for 4xx and 5xx status codes
        except HTTPStatusError as e:
            code = e.response.status_code
            message = e.response.text
            log_message = f"{self.name} POST `{url}` failed. Status code: {code}. Response: `{message}`."
            logger.error(log_message)
    
>           raise HTTPException(status_code=code, detail=message) from e
E           fastapi.exceptions.HTTPException: 503: upstream connect error or disconnect/reset before headers. reset reason: connection termination

shared/util/rich_async_client.py:40: HTTPException