diff --git a/pyproject.toml b/pyproject.toml index 7c525a7..2ab2678 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "plba" -version = "0.3.16" +version = "0.3.17" 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 3257b35..d7e47d5 100644 --- a/src/app_runtime/control/trace_presenter.py +++ b/src/app_runtime/control/trace_presenter.py @@ -71,7 +71,7 @@ class TraceResponseRenderer: f"trace_id: {trace_view.trace_id}", f"parent_id: {trace_view.parent_id or ''}", *self._child_id_lines(trace_view.child_ids), - "--------------------------------------------------", + "------------------------------", ] previous_step: str | None = None for record in trace_view.records: @@ -79,7 +79,7 @@ class TraceResponseRenderer: if previous_step is None: lines.append(f"step: {current_step}") elif current_step != previous_step: - lines.append("--------------------------------------------------") + lines.append("------------------------------") lines.append(f"step: {current_step}") previous_step = current_step lines.append(self._text_message(record, request.include_attrs_json)) @@ -177,7 +177,7 @@ class TraceResponseRenderer: self._html_plain_line(f"parent_id: {self._optional_trace_link(trace_view.parent_id, request)}"), self._html_plain_line("child_ids:"), *(self._html_plain_line(f" - {self._trace_link(child_id, request)}") for child_id in trace_view.child_ids), - self._html_plain_line("--------------------------------------------------"), + self._html_plain_line("------------------------------"), ] previous_step: str | None = None for record in trace_view.records: @@ -187,7 +187,7 @@ class TraceResponseRenderer: lines.append(self._html_plain_line("")) elif current_step != previous_step: lines.append(self._html_plain_line("")) - lines.append(self._html_plain_line("--------------------------------------------------")) + lines.append(self._html_plain_line("------------------------------")) lines.append(self._html_step_line(current_step)) lines.append(self._html_plain_line("")) previous_step = current_step diff --git a/tests/test_trace_endpoint.py b/tests/test_trace_endpoint.py index 900cbc5..66560a6 100644 --- a/tests/test_trace_endpoint.py +++ b/tests/test_trace_endpoint.py @@ -100,7 +100,7 @@ def test_trace_endpoint_returns_text_when_requested() -> None: "child_ids:\n" " - child-1\n" " - child-2\n" - "--------------------------------------------------\n" + "------------------------------\n" "step: process\n" "first error\n" "second warning" @@ -129,7 +129,7 @@ def test_trace_endpoint_appends_attrs_json_in_text_mode() -> None: "trace_id: trace-1\n" "parent_id: \n" "child_ids:\n" - "--------------------------------------------------\n" + "------------------------------\n" "step: process\n" 'failure, {"attempt":2,"source":"crm"}' ) @@ -159,11 +159,11 @@ def test_trace_endpoint_separates_messages_by_step_in_text_mode() -> None: "trace_id: trace-1\n" "parent_id: \n" "child_ids:\n" - "--------------------------------------------------\n" + "------------------------------\n" "step: load_stocks\n" "load first\n" "load second\n" - "--------------------------------------------------\n" + "------------------------------\n" "step: filter_stocks\n" "filter first" ) @@ -241,7 +241,7 @@ def test_trace_endpoint_returns_html_page_with_related_links() -> None: assert '
- child-1
' in response.text assert '
- child-2
' in response.text assert '
load_stocks
' in response.text - assert '
--------------------------------------------------
' in response.text + assert '
------------------------------
' in response.text assert '
filter_stocks
' in response.text assert "loaded prices" in response.text assert "filtered suspicious ticker" in response.text