Rename orchestration, splice and routes: a Renamer runs one rename at a time, closing the gate, taking the controller lock and holding the engine, each waiting without a limit and saying what it waits for (summary rename status, rename_waiting); DELETE on the pending request or a closed connection calls it off until the journal begins (409 aborted); then journal, steps and audit, retried in the background on failure (503 completing); splice_renamed rebuilds the affected flows under the held lock keeping stopped, paused and parked work, history limits and device wiring refreshed before activation; AlertManager.rename and EventBus.rename/settle follow the names; flow and dashboard rename routes answer by code and repeat stored results; renamed, dashboard_changed and pipeline_rebuilt after release; fluksio serve reads flow files without building a FlowStore

This commit is contained in:
2026-11-02 22:14:44 +01:00
parent 2d65118d82
commit ba4aae390d
16 changed files with 2174 additions and 22 deletions
+11 -5
View File
@@ -99,18 +99,24 @@ def _mention_undeclared_cards() -> None:
if settings.FLOW_GPUS or machine_gpus():
return
from fluksio.flow.runs import required_resources
from fluksio.flow.store import FlowStore
from fluksio.flow.schemas import FlowDef
store = FlowStore(settings.FLOWS_DIR)
# Read as files, not through a `FlowStore`: building one can commit the
# store, and this runs before the engine has settled an interrupted
# rename and given every document its id.
asking = []
for name in store.list_flows():
for path in sorted(settings.FLOWS_DIR.glob("*/flow.json")):
# `_devices/flow.json` is a device, not a flow.
if path.parent.name.startswith("_"):
continue
try:
needs = required_resources(store.read_flow(name))
flow = FlowDef.model_validate_json(path.read_text())
needs = required_resources(flow)
except Exception:
# A flow that will not parse is the engine's to complain about.
continue
if (needs or {}).get("gpus"):
asking.append(name)
asking.append(flow.name)
if not asking:
return
named = ", ".join(sorted(asking)[:3]) + (" …" if len(asking) > 3 else "")