Skip to content

fix: pass backupRetention to snapshot-restored instances - #11

Merged
parthvj1014 merged 2 commits into
masterfrom
fix/snapshot-backup-retention
Nov 13, 2026
Merged

parthvj1014 merged 2 commits into
masterfrom
fix/snapshot-backup-retention

Conversation

@parthvj1014

Copy link
Copy Markdown
Contributor

What changed

  • src/rds.ts: the DatabaseInstanceFromSnapshot branch now gets backupRetention when props.backupRetention is set. When it isn't set, the value stays undefined, so the template is unchanged for existing snapshot-based consumers.
  • test/snapshot-backup-retention.test.ts: new test covering both cases:
    • backupRetention: 7 → BackupRetentionPeriod: 7 on the restored instance
    • not set → BackupRetentionPeriod absent

Why

  • Only the non-snapshot DatabaseInstance branch received backupRetention. Databases restored from a snapshot silently ignored the prop and stayed at the AWS default of 1 day.
  • This blocks raising retention from 1 to 7 days on sc-production-ai-rds and sc-production-endurance-rds (ClickUp RDS hygiene, point 4).
  • The fallback is deliberately undefined, not Duration.days(0), so other snapshot-based consumers that bump the module don't get automated backups turned off.

Testing

  • npx projen build passes: 2 suites, 4 tests, plus lint.

After merge

  • The release workflow publishes v0.0.8.
  • Follow-up PR in sc-infra-cdk-rds-melange: bump @smallcase/cdk-rds-module to 0.0.8 and set backupRetention: 7 on the ai and endurance production stacks.

🤖 Generated with Claude Code

parthvj1014 and others added 2 commits November 12, 2026 18:02
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@parthvj1014
parthvj1014 merged commit ca8a818 into master Nov 13, 2026
4 checks passed
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