-
Notifications
You must be signed in to change notification settings - Fork 67
Open
Description
Description
The DevWorkspace backup feature works correctly for workspaces with claim-devworkspace PVCs.
However, when a DevWorkspace has an empty template and no PVCs, the backup cron job fails with an error instead of completing successfully or skipping the backup gracefully.
{"level":"error","ts":"2025-12-31T15:52:00Z","logger":"controllers.BackupCronJob","msg":"Failed to get PVC for DevWorkspace","id":"workspacedffe6504447347e7","error":"PersistentVolumeClaim \"claim-devworkspace\" not found","stacktrace":"github.com/devfile/devworkspace-operator/controllers/backupcronjob.(*BackupCronJobReconciler).createBackupJob\n\t/devworkspace-operator/controllers/backupcronjob/backupcronjob_controller.go:367\n..."}
How To Reproduce
- Enable Backup functionality by applying this DevWorkspaceOperatorConfig (see feat(23570): Add controller for workspace backup #1530 (comment) )
- Create empty workspace sample from
samples/empty.yaml - Check DevWorkspaceOperator controller pod logs to see the error
Expected behavior
BackupCronJob should handle empty DevWorkspaces gracefully. Either:
- Skip backup and log an info message, or
- Create a valid empty backup artifact
- Avoid treating missing PVCs as an error when none are expected
Metadata
Metadata
Assignees
Labels
No labels