From 9eb72824373ef0169c97c9da6c8dff8d3d2a571d Mon Sep 17 00:00:00 2001 From: zosimovaa Date: Thu, 30 Apr 2026 10:25:35 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=B1=D1=80=D0=B0=D0=BB=20=D1=82=D0=B5?= =?UTF-8?q?=D0=BA=D1=83=D1=89=D0=B8=D0=B9=20=D1=82=D1=80=D0=B5=D0=B9=D1=81?= =?UTF-8?q?=20=D0=B8=D0=B7=20=D1=81=D1=81=D1=8B=D0=BB=D0=BE=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyproject.toml | 2 +- src/app_runtime/control/trace_presenter.py | 2 +- tests/test_trace_endpoint.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index e465e86..044fc8e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "plba" -version = "0.3.6" +version = "0.3.7" description = "Platform runtime for business applications" readme = "README.md" requires-python = ">=3.11" diff --git a/src/app_runtime/control/trace_presenter.py b/src/app_runtime/control/trace_presenter.py index ec0576d..48b69af 100644 --- a/src/app_runtime/control/trace_presenter.py +++ b/src/app_runtime/control/trace_presenter.py @@ -260,7 +260,7 @@ class TraceResponseRenderer: return f"{record.message}, {json.dumps(record.attrs_json, ensure_ascii=False, separators=(',', ':'))}" def _related_trace_links(self, trace_view: TraceLogView, request: TraceQueryRequest) -> str: - links = [self._trace_link_item("current", trace_view.trace_id, request)] + links: list[str] = [] if trace_view.parent_id: links.append(self._trace_link_item("parent", trace_view.parent_id, request)) links.extend(self._trace_link_item("child", child_id, request) for child_id in trace_view.child_ids) diff --git a/tests/test_trace_endpoint.py b/tests/test_trace_endpoint.py index 5b8fd6d..188f63e 100644 --- a/tests/test_trace_endpoint.py +++ b/tests/test_trace_endpoint.py @@ -208,7 +208,7 @@ def test_trace_endpoint_returns_html_page_with_related_links() -> None: assert "filtered suspicious ticker" in response.text assert "2026-04-28T10:11:12+00:00 | INFO | ok" in response.text assert "2026-04-28T10:11:12+00:00 | WARNING | degraded" in response.text - assert 'href="/traces/trace-1?format=html&levels=ERROR%2CWARNING%2CINFO&attrs_json=true"' in response.text + assert 'href="/traces/trace-1?format=html&levels=ERROR%2CWARNING%2CINFO&attrs_json=true"' not in response.text assert 'href="/traces/parent-1?format=html&levels=ERROR%2CWARNING%2CINFO&attrs_json=true"' in response.text assert 'href="/traces/child-1?format=html&levels=ERROR%2CWARNING%2CINFO&attrs_json=true"' in response.text assert 'href="/traces/child-2?format=html&levels=ERROR%2CWARNING%2CINFO&attrs_json=true"' in response.text