Skip to content

feat: backup app volumes before deployment - #140

Merged
biersoeckli merged 5 commits into
mainfrom
feat/auto-backup-before-deployment
Sep 24, 2026
Merged

biersoeckli merged 5 commits into
mainfrom
feat/auto-backup-before-deployment

Conversation

@aperolschpritz

Copy link
Copy Markdown
Collaborator

Summary

Adds automatic volume backups that run before a deployment is applied.

Behavior

  • New per-schedule flags on VolumeBackup:
    • backupBeforeDeployment (default false) — opt in.
    • failSilently (default false) — continue the deployment when the backup fails; otherwise the deployment is aborted.
  • Both are configured in the existing volume backup dialog.
  • Before a deployment is applied, opted-in schedules run for:
    • the deployed app itself, and
    • all apps directly connected through app network policies (1 hop, both directions, same project).
  • Backups run sequentially, one after another.
  • Progress and errors are written to the deployment logs of the deployed app.
  • The trigger hooks into deployment.service.createDeployment, covering UI deploys, rollbacks, webhooks and build-watch deployments.

Implementation

  • Migration 20260924140414_add_pre_deployment_backup adds the two columns.
  • getDirectlyConnectedAppIds lives in network-policy.service.ts.
  • runBackupsBeforeDeployment lives in volume-backup.service.ts; backup.service.runBackupForSchedule encapsulates DB-dump vs volume-archive selection.

Testing

  • yarn lint clean.
  • tsc -p tsconfig.server.json exit 0.
  • Integration test for connected-app selection, sequential execution and fail/silent semantics; affected unit tests green.

Add automatic pre-deployment backups for volumes.

Backup schedules can opt in with a new backupBeforeDeployment flag and a
failSilently option in the existing volume backup settings. Before a
deployment is applied, opted-in schedules of the deployed app and of its
directly connected apps (1 hop through app network policies, same project)
run one after another. Progress and errors are written to the deployment
logs. A failed backup aborts the deployment unless it is marked
failSilently.

The trigger hooks into deployment.service.createDeployment, so UI deploys,
rollbacks, webhooks and build-watch deployments are all covered.
aperolschpritz and others added 3 commits September 24, 2026 14:45
…ttings

Replace the checkboxes for backupBeforeDeployment and failSilently with
switch toggles and move their descriptions into question mark tooltips.
@biersoeckli
biersoeckli marked this pull request as ready for review September 24, 2026 15:21
@biersoeckli
biersoeckli merged commit 8671a9d into main Sep 24, 2026
2 checks passed
@biersoeckli
biersoeckli deleted the feat/auto-backup-before-deployment branch September 24, 2026 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants