Skip to content

PR #1307

PR #1307 #3848

GitHub Actions / JUnit Test Report failed Feb 3, 2025 in 0s

897 tests run, 889 passed, 6 skipped, 2 failed.

Annotations

Check failure on line 1 in app/tests/e2e/verifier/test_verifier.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_verifier.test_accept_proof_request_verifier_has_issuer_role[clean-clean-clean-clean-clean-trust_registry]

failed on setup with "fastapi.exceptions.HTTPException: 504: <html>
<head><title>504 Gateway Time-out</title></head>
<body>
<center><h1>504 Gateway Time-out</h1></center>
<hr><center>nginx</center>
</body>
</html>"
Raw output
self = <shared.util.rich_async_client.RichAsyncClient object at 0x7f615a316300>
method = 'post', url = '/v1/tenants'
kwargs = {'json': {'extra_settings': None, 'group_id': 'IssuerAndVerifierGroup', 'image_url': None, 'roles': ['issuer', 'verifier'], ...}}
attempt = 0, response = <Response [504 Gateway Time-out]>, code = 504

    async def _request_with_retries(self, method: str, url: str, **kwargs) -> Response:
        for attempt in range(self.retries):
            try:
                response = await getattr(super(), method)(url, **kwargs)
>               return await self._handle_response(response)

shared/util/rich_async_client.py:67: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
shared/util/rich_async_client.py:50: in _handle_response
    response.raise_for_status()  # Raise exception for 4xx and 5xx status codes
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <Response [504 Gateway Time-out]>

    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 '504 Gateway Time-out' for url 'https://multitenant-web.cloudapi.dev.didxtech.com/tenant-admin/v1/tenants'
E       For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/504

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

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

anyio_backend = 'asyncio'
request = <SubRequest 'meld_co_issuer_verifier' for <Function test_accept_proof_request_verifier_has_issuer_role[clean-clean-clean-clean-clean-trust_registry]>>
args = ()
kwargs = {'request': <SubRequest 'meld_co_issuer_verifier' for <Function test_accept_proof_request_verifier_has_issuer_role[clean-clean-clean-clean-clean-trust_registry]>>}
local_func = <function meld_co_issuer_verifier at 0x7f615d854cc0>
backend_name = 'asyncio', backend_options = {}
runner = <anyio._backends._asyncio.TestRunner object at 0x7f615cf631d0>

    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)

/usr/local/lib/python3.12/site-packages/anyio/pytest_plugin.py:98: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py:2234: in run_asyncgen_fixture
    fixturevalue: T_Retval = self.get_loop().run_until_complete(
/usr/local/lib/python3.12/asyncio/base_events.py:686: in run_until_complete
    return future.result()
/usr/local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py:2226: in _call_in_runner_task
    return await future
/usr/local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py:2193: in _run_tests_and_fixtures
    retval = await coro
app/tests/fixtures/member_wallets.py:103: in meld_co_issuer_verifier
    issuer_and_verifier_tenant = await create_issuer_and_verifier_tenant(
app/tests/util/tenants.py:44: in create_issuer_and_verifier_tenant
    return await post_tenant_request(admin_client, request)
app/tests/util/tenants.py:16: in post_tenant_request
    response = await admin_client.post(TENANT_BASE_PATH, json=request.model_dump())
shared/util/rich_async_client.py:86: in post
    return await self._request_with_retries("post", url, **kwargs)
shared/util/rich_async_client.py:72: in _request_with_retries
    await self._handle_error(e, url, method)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <shared.util.rich_async_client.RichAsyncClient object at 0x7f615a316300>
e = HTTPStatusError("Server error '504 Gateway Time-out' for url 'https://multitenant-web.cloudapi.dev.didxtech.com/tenant-admin/v1/tenants'\nFor more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/504")
url = '/v1/tenants', method = 'post'

    async def _handle_error(self, e: HTTPStatusError, url: str, method: str) -> None:
        code = e.response.status_code
        message = e.response.text
        log_message = (
            f"{self.name} {method} `{url}` failed. "
            f"Status code: {code}. Response: `{message}`."
        )
        logger.error(log_message)
>       raise HTTPException(status_code=code, detail=message) from e
E       fastapi.exceptions.HTTPException: 504: <html>
E       <head><title>504 Gateway Time-out</title></head>
E       <body>
E       <center><h1>504 Gateway Time-out</h1></center>
E       <hr><center>nginx</center>
E       </body>
E       </html>

shared/util/rich_async_client.py:61: HTTPException

Check failure on line 1 in app/tests/e2e/verifier/test_verifier.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_verifier.test_accept_proof_request_verifier_has_issuer_role[clean-clean-clean-clean-clean-default]

failed on setup with "fastapi.exceptions.HTTPException: 504: <html>
<head><title>504 Gateway Time-out</title></head>
<body>
<center><h1>504 Gateway Time-out</h1></center>
<hr><center>nginx</center>
</body>
</html>"
Raw output
self = <shared.util.rich_async_client.RichAsyncClient object at 0x7f615a316300>
method = 'post', url = '/v1/tenants'
kwargs = {'json': {'extra_settings': None, 'group_id': 'IssuerAndVerifierGroup', 'image_url': None, 'roles': ['issuer', 'verifier'], ...}}
attempt = 0, response = <Response [504 Gateway Time-out]>, code = 504

    async def _request_with_retries(self, method: str, url: str, **kwargs) -> Response:
        for attempt in range(self.retries):
            try:
                response = await getattr(super(), method)(url, **kwargs)
>               return await self._handle_response(response)

shared/util/rich_async_client.py:67: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
shared/util/rich_async_client.py:50: in _handle_response
    response.raise_for_status()  # Raise exception for 4xx and 5xx status codes
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <Response [504 Gateway Time-out]>

    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 '504 Gateway Time-out' for url 'https://multitenant-web.cloudapi.dev.didxtech.com/tenant-admin/v1/tenants'
E       For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/504

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

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

anyio_backend = 'asyncio'
request = <SubRequest 'meld_co_issuer_verifier' for <Function test_accept_proof_request_verifier_has_issuer_role[clean-clean-clean-clean-clean-trust_registry]>>
args = ()
kwargs = {'request': <SubRequest 'meld_co_issuer_verifier' for <Function test_accept_proof_request_verifier_has_issuer_role[clean-clean-clean-clean-clean-trust_registry]>>}
local_func = <function meld_co_issuer_verifier at 0x7f615d854cc0>
backend_name = 'asyncio', backend_options = {}
runner = <anyio._backends._asyncio.TestRunner object at 0x7f615cf631d0>

    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)

/usr/local/lib/python3.12/site-packages/anyio/pytest_plugin.py:98: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py:2234: in run_asyncgen_fixture
    fixturevalue: T_Retval = self.get_loop().run_until_complete(
/usr/local/lib/python3.12/asyncio/base_events.py:686: in run_until_complete
    return future.result()
/usr/local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py:2226: in _call_in_runner_task
    return await future
/usr/local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py:2193: in _run_tests_and_fixtures
    retval = await coro
app/tests/fixtures/member_wallets.py:103: in meld_co_issuer_verifier
    issuer_and_verifier_tenant = await create_issuer_and_verifier_tenant(
app/tests/util/tenants.py:44: in create_issuer_and_verifier_tenant
    return await post_tenant_request(admin_client, request)
app/tests/util/tenants.py:16: in post_tenant_request
    response = await admin_client.post(TENANT_BASE_PATH, json=request.model_dump())
shared/util/rich_async_client.py:86: in post
    return await self._request_with_retries("post", url, **kwargs)
shared/util/rich_async_client.py:72: in _request_with_retries
    await self._handle_error(e, url, method)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <shared.util.rich_async_client.RichAsyncClient object at 0x7f615a316300>
e = HTTPStatusError("Server error '504 Gateway Time-out' for url 'https://multitenant-web.cloudapi.dev.didxtech.com/tenant-admin/v1/tenants'\nFor more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/504")
url = '/v1/tenants', method = 'post'

    async def _handle_error(self, e: HTTPStatusError, url: str, method: str) -> None:
        code = e.response.status_code
        message = e.response.text
        log_message = (
            f"{self.name} {method} `{url}` failed. "
            f"Status code: {code}. Response: `{message}`."
        )
        logger.error(log_message)
>       raise HTTPException(status_code=code, detail=message) from e
E       fastapi.exceptions.HTTPException: 504: <html>
E       <head><title>504 Gateway Time-out</title></head>
E       <body>
E       <center><h1>504 Gateway Time-out</h1></center>
E       <hr><center>nginx</center>
E       </body>
E       </html>

shared/util/rich_async_client.py:61: HTTPException