-
Notifications
You must be signed in to change notification settings - Fork 103
Modify Backup URL in Reconciler #2347
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
base: main
Are you sure you want to change the base?
Conversation
bf52919
to
c47d696
Compare
@@ -322,6 +322,11 @@ func (backup *FoundationDBBackup) CheckReconciliation() (bool, error) { | |||
reconciled = false | |||
} | |||
|
|||
if isRunning && backup.BackupURL() != backup.Status.BackupDetails.URL { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be better to create a dedicated method (e.g. NeedsConfigurationChange
) for this and combine the SnapshotPeriodSeconds
and URL check. That way the method can be extended in the future without adding more if statements in CheckReconciliation.
c47d696
to
b543387
Compare
@johscheuer updated this! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One comment, otherwise the changes look good. I guess testing this in the e2e tests will be hard as we only have a single blobstore.
snapshotPeriod := backup.SnapshotPeriodSeconds() | ||
backupURL := backup.BackupURL() | ||
|
||
shouldModify := backup.Status.BackupDetails.SnapshotPeriodSeconds != snapshotPeriod || | ||
backup.Status.BackupDetails.URL != backupURL | ||
if shouldModify { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
snapshotPeriod := backup.SnapshotPeriodSeconds() | |
backupURL := backup.BackupURL() | |
shouldModify := backup.Status.BackupDetails.SnapshotPeriodSeconds != snapshotPeriod || | |
backup.Status.BackupDetails.URL != backupURL | |
if shouldModify { | |
if backup.NeedsBackupReconfiguration() { |
Right now we are doing the same checks in NeedsBackupReconfiguration()
, so is there a reason not to make use of it?
Description
Please include a summary of the change and which issue is addressed. If this change resolves an issue, please include the issue number in the description.
Type of change
Please select one of the options below.
Discussion
Are there any design details that you would like to discuss further?
Testing
Please describe the tests that you ran to verify your changes. Unit tests?
Manual testing?
Do we need to perform additional testing once this is merged, or perform in a larger testing environment?
Documentation
Did you update relevant documentation within this repository?
If this change is adding new functionality, do we need to describe it in our user manual?
If this change is adding or removing subreconcilers, have we updated the core technical design doc to reflect that?
If this change is adding new safety checks or new potential failure modes, have we documented and how to debug potential issues?
Follow-up
Are there any follow-up issues that we should pursue in the future?
Does this introduce new defaults that we should re-evaluate in the future?