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

[DPE-6062] Allow --restore-to-time=latest without a backup-id #683

Merged
merged 2 commits into from
Nov 26, 2024

Conversation

marceloneppel
Copy link
Member

@marceloneppel marceloneppel commented Nov 25, 2024

Issue

When trying to restore to the latest time from a repository, the charm complains that a backup ID is required.

Solution

Allow users to restore without a backup ID (with only the --restore-to-time=latest parameter).

Also, add a new check that prevents the PITR and warns the user that there is no base backup in the latest timeline if there isn't one. Previously, if the user tried to restore from that timeline, the restore would be reported as successful, but in fact, it didn't happen.

This is a port of canonical/postgresql-k8s-operator#787.

@marceloneppel marceloneppel marked this pull request as draft November 25, 2024 20:58
Copy link

codecov bot commented Nov 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.87%. Comparing base (58fc973) to head (59dd9d9).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #683      +/-   ##
==========================================
+ Coverage   71.79%   71.87%   +0.07%     
==========================================
  Files          13       13              
  Lines        3216     3225       +9     
  Branches      478      480       +2     
==========================================
+ Hits         2309     2318       +9     
  Misses        791      791              
  Partials      116      116              

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

Signed-off-by: Marcelo Henrique Neppel <[email protected]>
@marceloneppel marceloneppel merged commit 564932c into main Nov 26, 2024
97 checks passed
@marceloneppel marceloneppel deleted the dpe-6062-fix-restore-to-time-latest branch November 26, 2024 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants