Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: align pitr backup retention with cluster retentionPeriod #8297

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

fengluodb
Copy link
Contributor

align pitr backup retention with cluster retentionPeriod in backup schedule

@fengluodb fengluodb requested review from leon-inf, Y-Rookie and a team as code owners October 18, 2024 02:23
@github-actions github-actions bot added the size/XS Denotes a PR that changes 0-9 lines. label Oct 18, 2024
@fengluodb fengluodb requested a review from ldming October 18, 2024 02:29
Copy link

codecov bot commented Oct 18, 2024

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Project coverage is 61.12%. Comparing base (dcf84ed) to head (f86683e).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...trollers/apps/transformer_cluster_backup_policy.go 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8297      +/-   ##
==========================================
- Coverage   61.35%   61.12%   -0.24%     
==========================================
  Files         350      350              
  Lines       41162    41164       +2     
==========================================
- Hits        25257    25162      -95     
- Misses      13611    13711     +100     
+ Partials     2294     2291       -3     
Flag Coverage Δ
unittests 61.12% <0.00%> (-0.24%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@apecloud-bot apecloud-bot added the approved PR Approved Test label Oct 18, 2024
@apecloud-bot apecloud-bot removed the approved PR Approved Test label Oct 18, 2024
@@ -635,6 +635,9 @@ func (r *backupPolicyBuilder) mergeClusterBackup(
if as.Spec.BackupType == dpv1alpha1.BackupTypeContinuous && backup.PITREnabled != nil && !hasSyncPITRMethod {
// auto-sync the first continuous backup for the 'pirtEnable' option.
backupSchedule.Spec.Schedules[i].Enabled = backup.PITREnabled
if backup.RetentionPeriod.String() != "" {
backupSchedule.Spec.Schedules[i].RetentionPeriod = backup.RetentionPeriod
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pitr retention period needs greater than full backup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/XS Denotes a PR that changes 0-9 lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Update cluster retentionPeriod without change PITR backup retention"
5 participants