fix(deploy): Checkpoints — preserve STOPPED history, fix filter + placement
- Backend: rename deleteTerminalByAppAndEnvironment → deleteFailedByAppAndEnvironment. STOPPED rows were being wiped on every redeploy, so Checkpoints was always empty. Now only FAILED rows are pruned; STOPPED deployments are retained as restorable checkpoints (they still carry deployed_config_snapshot from their RUNNING window). - UI filter: any deployment with a snapshot is a checkpoint (was RUNNING|DEGRADED only, which excluded the main case — the previous blue/green deployment now in STOPPED). - UI placement: Checkpoints disclosure now renders inside IdentitySection, matching the design spec. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -14,5 +14,6 @@ public interface DeploymentRepository {
|
||||
void updateStatus(UUID id, DeploymentStatus status, String containerId, String errorMessage);
|
||||
void markDeployed(UUID id);
|
||||
void markStopped(UUID id);
|
||||
void deleteTerminalByAppAndEnvironment(UUID appId, UUID environmentId);
|
||||
/** Delete FAILED deployments for this (app, env). STOPPED deployments are preserved as checkpoints. */
|
||||
void deleteFailedByAppAndEnvironment(UUID appId, UUID environmentId);
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ public class DeploymentService {
|
||||
Environment env = envService.getById(environmentId);
|
||||
String containerName = env.slug() + "-" + app.slug();
|
||||
|
||||
deployRepo.deleteTerminalByAppAndEnvironment(appId, environmentId);
|
||||
deployRepo.deleteFailedByAppAndEnvironment(appId, environmentId);
|
||||
UUID deploymentId = deployRepo.create(appId, appVersionId, environmentId, containerName);
|
||||
return deployRepo.findById(deploymentId).orElseThrow();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user