refactor: drop process-level --plugin-config in favor of config files - #2
Closed
zhongxuanwang-nv wants to merge 1 commit into
Closed
zhongxuanwang-nv wants to merge 1 commit into
zhongxuanwang-nv wants to merge 1 commit into
Conversation
Remove the ad-hoc --plugin-config flag (and NEMO_RELAY_PLUGIN_CONFIG env) from `nemo-relay serve` and `nemo-relay run`, along with apply_cli_plugin_config and the run-vs-inherited precedence shim that only existed because both structs carried the flag. Gateway plugin configuration now comes only from plugins.toml or an inline [plugins].config block. The per-session hook-forward/install --plugin-config flag (which sets the x-nemo-relay-plugin-config session header) is a separate mechanism and is unchanged. Docs and the config/launcher tests are updated; obsolete --plugin-config tests are removed. BREAKING CHANGE: --plugin-config and NEMO_RELAY_PLUGIN_CONFIG are no longer accepted by `serve`/`run`; use plugins.toml or [plugins].config instead. Signed-off-by: Zhongxuan Wang <daniewang@nvidia.com>
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
Drops the process-level
--plugin-configad-hoc CLI flag in favor of configuration files. Gateway plugin configuration should come fromplugins.tomlor an inline[plugins].configblock, not from one-off command-line JSON.Details
What changed
--plugin-config(and theNEMO_RELAY_PLUGIN_CONFIGenv var) fromnemo-relay serve(ServerArgs) andnemo-relay run(RunCommand).apply_cli_plugin_configand the run-vs-inherited precedence shim that only existed because both structs carried the flag.plugins.tomlor[plugins].config); removed the--plugin-configrow, conflict clause, and the "use--plugin-configfor automation" guidance.--plugin-config↔file conflict and the run-overrides-inherited shim) and trimmed the flag from the remainingrun/serveconfig tests.Unchanged (separate mechanism)
nemo-relay hook-forward/ install--plugin-config, which sets thex-nemo-relay-plugin-configsession header, is a different feature (session metadata, not gateway activation) and is intentionally left in place.Why
Steer gateway plugin configuration toward configuration files instead of ad-hoc command-line JSON, and simplify the precedence model (the process-level
--plugin-configwas one of three competing sources for the sameGatewayConfig.plugin_config).How tested
cargo test -p nemo-relay-cli(0 failed),cargo clippy -- -D warnings,cargo fmt --check.Breaking changes
--plugin-configandNEMO_RELAY_PLUGIN_CONFIGare no longer accepted bynemo-relay serveornemo-relay run. Useplugins.tomlor[plugins].configinstead.Where should the reviewer start?
crates/cli/src/config.rs— the removal of theServerArgs/RunCommandplugin_configfields,apply_cli_plugin_config, and the simplifiedresolve_run_config.Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)