docs(relay): trim comments to the files' norm
The migrate module had no inline comments and the test files carry intent in their names; the additions were over that line. Signed-off-by: mschwab <mschwab@nvidia.com>
This commit is contained in:
@@ -129,10 +129,9 @@ def validate_relay_plugin_payload(payload: Mapping[str, Any]) -> list:
|
||||
Raises when Relay rejects the document, including by error-level diagnostics."""
|
||||
from nemo_relay import plugin
|
||||
|
||||
# Exact: the runtime loads this document as the explicit file, never layered over the
|
||||
# ambient user config that plain validate() would discover.
|
||||
# validate() would layer the payload over the ambient user config; the runtime never does.
|
||||
diagnostics = list(plugin.validate_exact(dict(payload))["config"]["diagnostics"])
|
||||
# Relay 0.8 raised on these from initialize(); 0.9's validator reports them instead.
|
||||
# Relay 0.8's initialize() raised on these; 0.9's validator only reports them.
|
||||
if errors := [d for d in diagnostics if d.get("level") == "error"]:
|
||||
raise ValueError("; ".join(str(d.get("message") or d.get("code") or d) for d in errors))
|
||||
return diagnostics
|
||||
|
||||
@@ -413,7 +413,6 @@ def test_present_plugins_section_is_validated_even_when_falsey(
|
||||
host._plugin_configuration_state
|
||||
is relay_runtime._RelayPluginConfigurationState.FAILED
|
||||
)
|
||||
# Hermes hands the file to Relay as-is; a falsey section is Relay's to reject.
|
||||
assert relay.initialized_from == [str(config)]
|
||||
assert "'plugins' must be a table" in caplog.text
|
||||
assert "Hermes Relay plugin initialization failed" in caplog.text
|
||||
@@ -539,7 +538,6 @@ manifest = "plugins/worker/relay-plugin.toml"
|
||||
|
||||
assert host_a.managed_execution_enabled()
|
||||
assert host_b.managed_execution_enabled()
|
||||
# Static components and [[plugins.dynamic]] travel together as the explicit file.
|
||||
assert relay.events == [("plugin.initialize", {})]
|
||||
assert relay.initialized_from == [str(config)]
|
||||
|
||||
@@ -891,8 +889,6 @@ mode = "strict"
|
||||
|
||||
assert relay_runtime._configured_plugin_inputs() == config
|
||||
|
||||
# Relay, not Hermes, now reads and validates the [[plugins.dynamic]] records. This
|
||||
# manifest is incomplete for Relay 0.9, and that rejection must fail Hermes open.
|
||||
with caplog.at_level("WARNING"):
|
||||
host = relay_runtime.RelayRuntime(relay=relay, profile_key="profile")
|
||||
try:
|
||||
|
||||
@@ -57,8 +57,7 @@ def test_legacy_env_becomes_validated_toml_selected_from_env(profile_env):
|
||||
sink = document["components"][0]["config"]["atof"]["sinks"][0]
|
||||
assert sink["type"] == "file" and sink["filename"] == "hermes-atof.jsonl"
|
||||
assert document["components"][0]["config"]["atif"]["filename_template"] == "trajectory-{session_id}.json"
|
||||
# Relay itself accepts the file Hermes will load at runtime, through the same layer
|
||||
# set the runtime uses: the explicit file, not the ambient user config.
|
||||
# Relay itself accepts the file Hermes will load at runtime.
|
||||
report = nemo_relay.plugin.validate({}, additional_plugins_toml=toml_path)
|
||||
assert report["config"]["diagnostics"] == []
|
||||
# .env now selects the file; the legacy lines survive as comments (not deleted), so the
|
||||
|
||||
Reference in New Issue
Block a user