Skip to content

Add plugins option support for TRACE_START and TRACE_LIST#68

Merged
pcisar merged 3 commits into
FirebirdSQL:masterfrom
Noremos:master_tracemgr_plugins
May 20, 2026
Merged

Add plugins option support for TRACE_START and TRACE_LIST#68
pcisar merged 3 commits into
FirebirdSQL:masterfrom
Noremos:master_tracemgr_plugins

Conversation

@Noremos
Copy link
Copy Markdown

@Noremos Noremos commented Apr 20, 2026

Add support for the plugin option for user trace session (introduced in the FirebirdSQL/firebird#8707 )

This should solve #55

Examples:

with connect_server('', user='SYSDBA', password='masterkey') as srv:
    trace_session_id = srv.trace.start(config="database\n{\nenabled = true\n}", name="mytrace", plugins=["myplugin","fbtrace"])
    print(trace_session_id)
with connect_server('', user='SYSDBA', password='masterkey') as srv:
    for k,v in srv.trace.sessions.items():
        if v.flags[0] == 'active':
            print(f"Trace {v.name}: Plugins: {v.plugins}")

@Noremos Noremos changed the title Add plugin parsing to tracemgr output Add plugins option support for TRACE_START and TRACE_LIST Apr 22, 2026
@dyemanov dyemanov requested a review from pcisar May 19, 2026 13:50
@pcisar pcisar merged commit 5e3c3c8 into FirebirdSQL:master May 20, 2026
@Noremos
Copy link
Copy Markdown
Author

Noremos commented May 20, 2026

@pcisar, I commited the ‎src/test.py file by mistake. Could you remove it?

fdcastel added a commit to fdcastel/python3-driver that referenced this pull request May 21, 2026
FirebirdSQL#68 added a `plugins` keyword-only parameter to start() but without a
default, making it required and breaking every existing caller (including
the project's own test_server.py::test_trace) with "missing 1 required
keyword-only argument: 'plugins'". The method body already treats it as
optional (`if plugins is not None:`) and the docstring marks it FB6+ only,
so restore the `= None` default. Unrelated to FirebirdSQL#69; surfaced because this
branch runs CI (master has none) against current master.
pcisar pushed a commit that referenced this pull request May 22, 2026
#68 added a `plugins` keyword-only parameter to
ServerTraceServices.start() but without a default value, making it
required. This breaks every existing caller -- including this project's
own tests/test_server.py::test_trace -- with:

    TypeError: ServerTraceServices.start() missing 1 required
    keyword-only argument: 'plugins'

The method body already treats the argument as optional
(`if plugins is not None:`) and its docstring documents it as FB6+ only,
so restore the `= None` default. Adds a regression test asserting the
parameter keeps a default of None.
pcisar added a commit that referenced this pull request May 22, 2026
Make ServerTraceServices.start() plugins argument optional (regression from #68)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants