Add Deploy/Redeploy button and fix actor replacement on redeployment

Instances page gains Deploy button that triggers flattening pipeline and sends
config to site. Button shows "Redeploy" when instance is stale. Fixed actor name
collision on redeployment by scheduling deferred recreation after Context.Stop.
This commit is contained in:
Joseph Doherty
2026-03-17 10:28:44 -04:00
parent 4879c4e01e
commit 60243ad619
2 changed files with 33 additions and 1 deletions

View File

@@ -180,9 +180,14 @@ public class DeploymentManagerActor : ReceiveActor, IWithTimers
{
Context.Stop(existing);
_instanceActors.Remove(instanceName);
// Wait for the child to be removed from the children collection
// by yielding and retrying — Context.Stop is processed before the next message
Context.System.Scheduler.ScheduleTellOnce(
TimeSpan.FromMilliseconds(500), Self, command, Sender);
return;
}
// Create the Instance Actor immediately
// Create the Instance Actor immediately (no existing actor to replace)
CreateInstanceActor(instanceName, command.FlattenedConfigurationJson);
// Persist to SQLite and clear static overrides asynchronously