Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Implement WAL plugin test API #25704

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

pauldix
Copy link
Member

@pauldix pauldix commented Dec 23, 2024

This implements the WAL plugin test API. It also introduces a new API for the Python plugins to be called, get their data, and call back into the database server.

There are some things that I'll want to address in follow on work:

  • CLI tests, but will wait on feat: Cleanup CLI flags for InfluxDB 3 Core #25737 to land for a refactor of the CLI here
  • It uses a _testdb that it injects into the catalog, which might run afoul of the db limits, so need to get around that
  • Would be better to hook the Python logging to call back into the plugin return state like here: https://pyo3.rs/v0.23.3/ecosystem/logging.html#the-python-to-rust-direction
  • We should only load the LineBuilder interface once in a module, rather than on every execution of a WAL plugin'
  • Ideally, we'd be able to validate each line on the write and write_to_db part of the APIs so that a proper error can be returned to the Python code so that plugin authors would be able to handle them. But that will require moving the validator out of the influxdb3_write crate so it's a much larger piece of work
  • More tests all around

But I want to get this in so that the actual plugin and trigger system can get udated to build around this model.

@pauldix pauldix force-pushed the pd/plugin-development branch 3 times, most recently from e43581e to f5e251e Compare January 5, 2025 21:53
@pauldix pauldix changed the title WIP: plugin development flow feat: Implement WAL plugin test API Jan 5, 2025
@pauldix pauldix marked this pull request as ready for review January 5, 2025 21:56
This implements the WAL plugin test API. It also introduces a new API for the Python plugins to be called, get their data, and call back into the database server.

There are some things that I'll want to address in follow on work:
* CLI tests, but will wait on #25737 to land for a refactor of the CLI here
* Would be better to hook the Python logging to call back into the plugin return state like here: https://pyo3.rs/v0.23.3/ecosystem/logging.html#the-python-to-rust-direction
* We should only load the LineBuilder interface once in a module, rather than on every execution of a WAL plugin
* More tests all around

But I want to get this in so that the actual plugin and trigger system can get udated to build around this model.
@pauldix pauldix force-pushed the pd/plugin-development branch from f5e251e to 068d0d8 Compare January 5, 2025 22:00
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.

1 participant