fix(apps): always attempt K8s cleanup on delete, cluster service fixes
- Delete endpoint no longer requires clusterId && latestImageTag - Clusters: getDefault fallback logic, reassign apps on delete - Unit tests for cluster default/delete logic
This commit is contained in:
@@ -351,10 +351,9 @@ export class SnapshotsService {
|
||||
}
|
||||
}
|
||||
|
||||
// 3. Restore database — file-based
|
||||
// 3. Restore database — file-based (pass file path for PVC-based transfer)
|
||||
if (snapshot.dbDumpPath && fs.existsSync(snapshot.dbDumpPath)) {
|
||||
const dumpBuffer = fs.readFileSync(snapshot.dbDumpPath);
|
||||
const result = await this.kubernetesService.restoreDatabaseDump(app, dumpBuffer);
|
||||
const result = await this.kubernetesService.restoreDatabaseDump(app, snapshot.dbDumpPath);
|
||||
if (result.success) {
|
||||
details.push('✅ Database restored');
|
||||
this.logger.log(`Rollback ${snapshotId}: restored database`);
|
||||
|
||||
Reference in New Issue
Block a user