Skip to content

Push on master

Push on master #4141

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

895 tests run, 888 passed, 6 skipped, 1 failed.

Annotations

Check failure on line 186 in app/tests/e2e/test_tenants.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_tenants.test_create_tenant_issuer@issuer_test_group_5

fastapi.exceptions.HTTPException: 500: {"detail":"Error creating connection with endorser: 500: Failed to set the endorser info in the issuer-endorser connection, with connection id ea3e4d13-d040-4667-ba09-0a0a443f7b65. This is a known bug in ACA-Py. Please retry."}
Raw output
self = <shared.util.rich_async_client.RichAsyncClient object at 0x7fb69ff98200>
method = 'post', url = '/v1/tenants'
kwargs = {'json': {'group_id': 'TestGroup', 'image_url': 'https://image.ca', 'roles': ['issuer'], 'wallet_label': 'd0930c4aa2a243b7bae159b9792bee16'}}
attempt = 0, response = <Response [500 Internal Server Error]>, code = 500

    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 [500 Internal Server Error]>

    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 '500 Internal Server Error' for url 'http://multitenant-web:8000/tenant-admin/v1/tenants'
E       For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500

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

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

tenant_admin_client = <shared.util.rich_async_client.RichAsyncClient object at 0x7fb69ff98200>
tenant_admin_acapy_client = <aries_cloudcontroller.acapy_client.AcaPyClient object at 0x7fb69ffab0b0>
governance_acapy_client = <aries_cloudcontroller.acapy_client.AcaPyClient object at 0x7fb6a2248fb0>

    @pytest.mark.anyio
    @pytest.mark.skipif(
        TestMode.regression_run in TestMode.fixture_params,
        reason=skip_regression_test_reason,
    )
    @pytest.mark.xdist_group(name="issuer_test_group_5")
    async def test_create_tenant_issuer(
        tenant_admin_client: RichAsyncClient,
        tenant_admin_acapy_client: AcaPyClient,
        governance_acapy_client: AcaPyClient,
    ):
        wallet_label = uuid4().hex
>       response = await tenant_admin_client.post(
            TENANTS_BASE_PATH,
            json={
                "image_url": "https://image.ca",
                "wallet_label": wallet_label,
                "roles": ["issuer"],
                "group_id": group_id,
            },
        )

app/tests/e2e/test_tenants.py:186: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
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 0x7fb69ff98200>
e = HTTPStatusError("Server error '500 Internal Server Error' for url 'http://multitenant-web:8000/tenant-admin/v1/tenants'\nFor more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500")
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: 500: {"detail":"Error creating connection with endorser: 500: Failed to set the endorser info in the issuer-endorser connection, with connection id ea3e4d13-d040-4667-ba09-0a0a443f7b65. This is a known bug in ACA-Py. Please retry."}

shared/util/rich_async_client.py:61: HTTPException