fix(deployment): instance delete fully removes the record
Deleting an instance only undeployed it from the site and set the state to NotDeployed, leaving an orphan record that could never be removed — the state-transition matrix rejected delete from NotDeployed. Delete now removes the instance record entirely (deployment history, snapshot, attribute/alarm overrides, and connection bindings go with it), and is permitted from any state.
This commit is contained in:
@@ -34,5 +34,12 @@ public interface IDeploymentManagerRepository
|
||||
Task<Instance?> GetInstanceByUniqueNameAsync(string uniqueName, CancellationToken cancellationToken = default);
|
||||
Task UpdateInstanceAsync(Instance instance, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Removes an instance and everything that depends on it: deployment
|
||||
/// records, deployed config snapshot, attribute/alarm overrides, and
|
||||
/// connection bindings.
|
||||
/// </summary>
|
||||
Task DeleteInstanceAsync(int instanceId, CancellationToken cancellationToken = default);
|
||||
|
||||
Task<int> SaveChangesAsync(CancellationToken cancellationToken = default);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user