Publish, delete and module installs rebuild only what changed
Publishing or deleting a flow now splices that one flow into the running graph instead of reconnecting every node in the installation, saving a shared node's source rebuilds the flows using it, and installing modules rebuilds only the flows holding a node that would not load. Renaming stays on the full rebuild — it rewrites message references in every other flow's document — and so does startup, which has no graph to splice into. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01StpRc2C6au1WJ1EUU7fsfu
This commit is contained in:
@@ -44,6 +44,12 @@ async def apply_modules(
|
||||
|
||||
A manifest that does not resolve changes nothing: the venv is left as it
|
||||
was and the stored manifest is only written once the install succeeded.
|
||||
|
||||
Only the flows already holding a node that would not load are rebuilt,
|
||||
because those are the ones an install is called to fix. A flow that this
|
||||
install *breaks* — a package taken back out from under it — is still green
|
||||
and fails at call time with the node author's own import error, until
|
||||
something rebuilds it.
|
||||
"""
|
||||
ok, output = await run_in_threadpool(modules.sync, body.requirements)
|
||||
if not ok:
|
||||
@@ -65,5 +71,5 @@ async def apply_modules(
|
||||
# packages that were just installed — a node that could not import one is
|
||||
# the reason this was called, and it stays red until it is built again.
|
||||
pool.respawn_all()
|
||||
await controller.reload()
|
||||
await controller.reload_failed_flows()
|
||||
return ApplyResult(ok=True, output=output)
|
||||
|
||||
Reference in New Issue
Block a user