Skip to content

🐛 fix DidRotate Hangup error #2672

🐛 fix DidRotate Hangup error

🐛 fix DidRotate Hangup error #2672

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

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

Annotations

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

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_predicate_proofs.test_predicate_proofs[clean-clean-clean-clean-clean-clean->]

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 0x7f630f52a690>
url = '/v1/issuer/credentials/v2-55c27469-7b5a-4a27-8a1d-f874b4c7f9b6/request'
kwargs = {'json': {}}, response = <Response [503 Service Unavailable]>
code = 503
message = 'upstream connect error or disconnect/reset before headers. reset reason: connection termination'
log_message = 'Tenant alice_SFYOS - HTTP POST `/v1/issuer/credentials/v2-55c27469-7b5a-4a27-8a1d-f874b4c7f9b6/request` 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/issuer/credentials/v2-55c27469-7b5a-4a27-8a1d-f874b4c7f9b6/request'
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 'issue_credential_to_alice' for <Function test_predicate_proofs[clean-clean-clean-clean-clean-clean->]>>
args = ()
kwargs = {'alice_member_client': <shared.util.rich_async_client.RichAsyncClient object at 0x7f630f52a690>, 'credential_definiti...1f9-4a5d-94c2-a0aef402e8e5'), 'faber_client': <shared.util.rich_async_client.RichAsyncClient object at 0x7f630f9e2390>}
local_func = <function issue_credential_to_alice at 0x7f631352ec00>
backend_name = 'asyncio', backend_options = {}
runner = <anyio._backends._asyncio.TestRunner object at 0x7f630fd87d70>

    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/credentials.py:56: in issue_credential_to_alice
    response = await alice_member_client.post(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <shared.util.rich_async_client.RichAsyncClient object at 0x7f630f52a690>
url = '/v1/issuer/credentials/v2-55c27469-7b5a-4a27-8a1d-f874b4c7f9b6/request'
kwargs = {'json': {}}, response = <Response [503 Service Unavailable]>
code = 503
message = 'upstream connect error or disconnect/reset before headers. reset reason: connection termination'
log_message = 'Tenant alice_SFYOS - HTTP POST `/v1/issuer/credentials/v2-55c27469-7b5a-4a27-8a1d-f874b4c7f9b6/request` 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