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
@@ -28,6 +28,7 @@ from fluksio.api.deps import (
from fluksio.api.routes.runs import elapsed_ms
from fluksio.core.config import settings
from fluksio.flow.controller import NodeStatus
from fluksio.flow.rename import RenameStatus
from fluksio.flow.tombstones import names_of, shown_nodes, stored_node
from fluksio.models import EngineEvent, FlowRun, Message, MetricBucket
@@ -65,6 +66,9 @@ class HealthSummary(BaseModel):
#: route the client knows and the engine does not answers a flat 404. This
#: is what turns that into a sentence. Absent means older than this field.
version: str = ""
#: A key rename under way: what it waits for while it can still be
#: called off, and why a step failed while it is retried.
rename: RenameStatus | None = None
class SeriesPoint(BaseModel):
@@ -285,6 +289,7 @@ async def read_summary(request: Request, controller: FlowControllerDep) -> Any:
f"{', '.join(sorted(e.id for e in failed_once))}"
)
renamer = getattr(request.app.state, "renamer", None)
return HealthSummary(
status="degraded" if problems else "ok",
problems=problems,
@@ -322,6 +327,7 @@ async def read_summary(request: Request, controller: FlowControllerDep) -> Any:
else {"ewma": 0.0, "max_60s": 0.0}
),
version=__version__,
rename=renamer.pending if renamer is not None else None,
)