fix: ensure prod database backup runs and can be disabled#33
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThe ChangesDatabase backup skip guard and path normalization
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~4 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 PHPStan (2.2.2)PHPStan was skipped because the config uses disallowed Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
database:backuptask silently failing (or never running) on Symfony/TYPO3 deploymentsdb_sync_toolavailable wherever the backup task runs, and honor disabling itRoot cause
The
database:backuptask is wired into prod deploys by the Symfony/TYPO3 presets, but the variables it relies on were defined only in the feature-deployment config group, which those presets never load. Combined with a missing disable-guard and a vendor-relative config path, the task could not locate its config and could not be turned off.Changes
deployer/sync/config/set.php— definedb_sync_tooldefault in the sync config group, the file that belongs to thedatabase:backuptask, so it is defined on every deploy that can run the taskdeployer/sync/task/database_backup.php— add thedb_sync_tool === falsedisable guard (mirroringfeature:sync) so backups can be turned off; correct the fallback debug messagedeployer/symfony/config/set.php— resolvesync_database_backup_configproject-relative (./.deployment/...) instead of__DIR__, which pointed intovendor/and never existeddeployer/typo3/task/deploy_database.php— same project-relative path fixTest plan
./.deployment/db-sync-tool/backup-prod.yamland confirm the backup is generateddb_sync_tooltofalseand confirm the backup step is skipped without errorSummary by CodeRabbit
Release Notes
Chores