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
@@ -745,13 +745,13 @@ async def save_node_source(
|
||||
_follow_header, controller, name, node_id, source.code, drop
|
||||
)
|
||||
node_def = next((n for n in definition.nodes if n.id == node_id), None)
|
||||
device = (
|
||||
node_def.device
|
||||
if node_def is not None and node_def.device_policy == "require"
|
||||
worker = (
|
||||
node_def.worker
|
||||
if node_def is not None and node_def.worker_policy == "require"
|
||||
else None
|
||||
)
|
||||
error = await run_in_threadpool(
|
||||
controller.compile_check, name, node_id, source.code, device
|
||||
controller.compile_check, name, node_id, source.code, worker
|
||||
)
|
||||
return NodeSourceSaved(
|
||||
id=f"{name}.{node_id}",
|
||||
|
||||
@@ -83,7 +83,7 @@ class WorkerInfo(BaseModel):
|
||||
|
||||
class TokenRequest(BaseModel):
|
||||
name: str = Field(min_length=1, max_length=255)
|
||||
#: What a node's `device` may match on this worker; it cannot add to them.
|
||||
#: What a node's `worker` may match on this worker; it cannot add to them.
|
||||
labels: list[str] = Field(default_factory=list)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user