Skip to content

Conversation

@aylei
Copy link
Collaborator

@aylei aylei commented Nov 17, 2025

This PR introduce API server plugin support. Usage:

plugins:
-  class: my_package.MyPlugin

A plugin can:

  • Extend server-side behavior via ExtensionPoints, e.g., add new routes/middlewares to the FastAPI app
  • Execute independent logic, e.g. starting background tasks
  • Patch class/modules

Semantics of plugin load:

  • Configured plugins are guaranteed to be loaded in all server processes and executor processes of the API server;
  • The install method of plugin is expected to be idempotent
  • Plugins should be independent with each other, but they are guaranteed to be loaded in the order defined in plugins.yaml

There are two example plugins that have been manually tested and a unit test for this PR.

Tested (run the relevant ones):

  • Code formatting: install pre-commit (auto-check on commit) or bash format.sh
  • Any manual or new tests for this PR (please specify below)
  • All smoke tests: /smoke-test (CI) or pytest tests/test_smoke.py (local)
  • Relevant individual tests: /smoke-test -k test_name (CI) or pytest tests/test_smoke.py::test_name (local)
  • Backward compatibility: /quicktest-core (CI) or pytest tests/smoke_tests/test_backward_compat.py (local)

@aylei
Copy link
Collaborator Author

aylei commented Nov 24, 2025

/quicktest-core

@aylei aylei marked this pull request as ready for review November 24, 2025 17:14
* include rbac rules for plugins

* update comment
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.

3 participants