Skip to content

refactor: drop process-level --plugin-config in favor of config files - #2

Closed
zhongxuanwang-nv wants to merge 1 commit into
mainfrom
refactor/drop-process-level-plugin-config
Closed

zhongxuanwang-nv wants to merge 1 commit into
mainfrom
refactor/drop-process-level-plugin-config

Conversation

@zhongxuanwang-nv

Copy link
Copy Markdown
Owner

Overview

Drops the process-level --plugin-config ad-hoc CLI flag in favor of configuration files. Gateway plugin configuration should come from plugins.toml or an inline [plugins].config block, not from one-off command-line JSON.

  • I confirm this contribution is my own work, or I have the right to submit it under this project's license.
  • I searched existing issues and open pull requests, and this does not duplicate existing work.

Details

What changed

  • Removed --plugin-config (and the NEMO_RELAY_PLUGIN_CONFIG env var) from nemo-relay serve (ServerArgs) and nemo-relay run (RunCommand).
  • Removed apply_cli_plugin_config and the run-vs-inherited precedence shim that only existed because both structs carried the flag.
  • Updated docs: the gateway now resolves plugin configuration from two mutually exclusive file source classes (plugins.toml or [plugins].config); removed the --plugin-config row, conflict clause, and the "use --plugin-config for automation" guidance.
  • Removed the now-obsolete tests (the --plugin-config↔file conflict and the run-overrides-inherited shim) and trimmed the flag from the remaining run/serve config tests.

Unchanged (separate mechanism)

  • The per-session nemo-relay hook-forward / install --plugin-config, which sets the x-nemo-relay-plugin-config session 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-config was one of three competing sources for the same GatewayConfig.plugin_config).

How tested

  • cargo test -p nemo-relay-cli (0 failed), cargo clippy -- -D warnings, cargo fmt --check.

Breaking changes

  • --plugin-config and NEMO_RELAY_PLUGIN_CONFIG are no longer accepted by nemo-relay serve or nemo-relay run. Use plugins.toml or [plugins].config instead.

Where should the reviewer start?

crates/cli/src/config.rs — the removal of the ServerArgs/RunCommand plugin_config fields, apply_cli_plugin_config, and the simplified resolve_run_config.

Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)

  • Relates to relay-183 (internal ticket; GitHub issues are disabled on this repo). Split out from the code-driven plugin config layer PR to keep that change scoped.

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant