python3-driver icon indicating copy to clipboard operation
python3-driver copied to clipboard

Add ability to see list of running trace sessions after 'plugins' item was introduced

Open pavel-zotov opened this issue 3 months ago • 1 comments

On FB 6.x since 20-aug-2025 list of sessions contain name of plugin, see: f9ac3d34 ("Print trace plugins in tracecmgr LIST output")

Current version of firebird-driver can not correctly handle this and fails on obtaining content of srv.trace.sessions with: "firebird.driver.types.InterfaceError: Unexpected line in trace session list: plugins: "

Of course, one may to launch subprocess.Popen(['fbsvcmgr', 'action_trace_list' ... ]) and parse its output - but this is inconvenient.

We have two QA tests: 7139, 7141 -- that still fail on attempt to get list of running trace sessions. Error stack tail:

             else:  # pragma: no cover
>               raise InterfaceError(f"Unexpected line in trace session list: {line}")
E               firebird.driver.types.InterfaceError: Unexpected line in trace session list:   plugins: <default>

(tickets: 7139; 7141)

It seems that it is sufficient to add small change in the core.py source: Image

Patch: core-patch-for-tracelist-plugins-item.patch.zip

Please add ability to use new item in the trace list ('plugins').

pavel-zotov avatar Sep 06 '25 08:09 pavel-zotov

PS. Also, following must be applied to the 'types.py' file:

diff --git a/src/firebird/driver/types.py b/src/firebird/driver/types.py
index 7077aed..ec3e765 100644
--- a/src/firebird/driver/types.py
+++ b/src/firebird/driver/types.py
@@ -1378,6 +1378,7 @@ class TraceSession:
     timestamp: datetime.datetime
     name: str = ''
     flags: list = field(default_factory=list)
+    plugins: list = field(default_factory=list)

 @dataclass
 class ImpData:

pavel-zotov avatar Sep 14 '25 08:09 pavel-zotov