feat(python): activate dynamic plugins#365
Draft
bbednarski9 wants to merge 9 commits into
Draft
Conversation
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
a252f6a to
9615c1d
Compare
License DiffCompared against Lockfile license changesLockfile License ChangesRustAdded
Removed
Updated/Changed
NodeAdded
Removed
Updated/Changed
PythonAdded
Removed
Updated/Changed
Status output |
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
9615c1d to
8263c93
Compare
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
8263c93 to
d2a1746
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This adds an owned Python binding for explicit native and worker dynamic-plugin activation. It is stacked on #364; once that PR lands, this diff reduces to the Python binding and its tests.
Static-only harness-native applications keep using
plugin.initialize()/plugin.clear().activate_dynamic_plugins(...)requires at least one dynamic specification; its base config may also contain static components, which initialize before components appended by the dynamic plugins.Details
DynamicPluginActivationSpecand asyncactivate_dynamic_plugins(...)tonemo_relay.plugin.PluginHostActivationwith the successful validation report and active-state inspection.close(),async with, and best-effort finalization without blocking the Python finalizer or holding the GIL during teardown.Nonevalues as JSONnullin plugin configuration while still omitting optional top-level specification fields.plugin.initialize()andplugin.clear()APIs. Empty dynamic activation is rejected without claiming process ownership, so static initialization remains available.Where should the reviewer start?
Start with
python/nemo_relay/plugin.pyfor the public API andcrates/python/src/py_plugin.rsfor shared ownership, cancellation-resistant cleanup, and exception translation. End-to-end fixture cases are inpython/tests/test_dynamic_plugin_host.py.Validation
python/tests/test_dynamic_plugin_host.py— 10 passedcargo fmt --all -- --checkcargo clippy -p nemo-relay-python --all-targets -- -D warningsgit diff --checkRelated Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)
Relates to #364.