Skip to content

PyPluginCallApi exposes internal helper methods to Python #26972

@caterryan

Description

@caterryan

Steps to reproduce:
List the minimal actions needed to reproduce the behaviour.

  1. run the following plugin
def process_writes(influxdb3_local, table_batches, args=None):
    allowed = {"info", "warn", "error", "query", "write", "cache"}
    attrs = {name for name in dir(influxdb3_local) if not name.startswith("__")}
    extras = attrs - allowed
    missing = allowed - attrs
    if extras or missing:
        raise RuntimeError(f"unexpected attributes: extras={sorted(extras)}, missing={sorted(missing)}")

Expected behaviour:
PyPluginCallApi should only expose Python methods info, warn, error, query, write, and cache, so the regression test should pass.

Actual behaviour:
The test fails with RuntimeError: unexpected attributes: extras=['log_args_to_string', 'write_to_db'], missing=[], showing that internal helpers were exported to Python.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions