A node's worker label is worker, so a device is only a paired one
- NodeDef `device`/`device_policy` become `worker`/`worker_policy`, the issue `ignored_device` becomes `ignored_worker`, and the SDK's `@node` takes `worker=` and `worker_policy=` - FlowStore._migrate renames the keys in published and draft documents once, bumping their version; a queued run's `needs` reads the old key - placement passes the label as `label`, client regenerated - docs: worker placement wording, MCP issuer without DOMAIN, device rows in the CLI data directory and the API table, device links in compose comments Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
f8011d2a8a
commit
a9d453c9d9
@@ -125,8 +125,8 @@ def test_a_published_node_with_no_body_is_reported(store: FlowStore):
|
||||
assert [i for i in controller.issues if i.code == "missing_source"] == []
|
||||
|
||||
|
||||
def test_a_device_on_a_node_without_code_is_reported(store: FlowStore):
|
||||
"""Only code travels to a worker, so the device would be ignored silently."""
|
||||
def test_a_worker_on_a_node_without_code_is_reported(store: FlowStore):
|
||||
"""Only code travels to a worker, so the worker would be ignored silently."""
|
||||
store.write_flow(
|
||||
FlowDef(
|
||||
name="heating",
|
||||
@@ -134,7 +134,7 @@ def test_a_device_on_a_node_without_code_is_reported(store: FlowStore):
|
||||
NodeDef(
|
||||
id="relay",
|
||||
type="change",
|
||||
device="gpu",
|
||||
worker="gpu",
|
||||
provides=[MessageSpec(name="temp")],
|
||||
)
|
||||
],
|
||||
@@ -143,7 +143,7 @@ def test_a_device_on_a_node_without_code_is_reported(store: FlowStore):
|
||||
controller = FlowController(store)
|
||||
|
||||
asyncio.run(controller.reload())
|
||||
(issue,) = [i for i in controller.issues if i.code == "ignored_device"]
|
||||
(issue,) = [i for i in controller.issues if i.code == "ignored_worker"]
|
||||
assert issue.node == "heating.relay"
|
||||
assert issue.advisory
|
||||
|
||||
|
||||
Reference in New Issue
Block a user