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
nixos/pgbackup: Fix and refactor the postgres backup module #42133
Conversation
@GrahamcOfBorg test postgresql |
Success on aarch64-linux Attempted: tests.postgresql No partial log is available. |
Success on x86_64-linux Attempted: tests.postgresql No partial log is available. |
@@ -28,9 +51,9 @@ in | |||
}; | |||
|
|||
period = mkOption { | |||
default = "15 01 * * *"; | |||
default = "*-*-* 01:15:00"; |
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.
Maybe we should rename this option? The type of both is string old values could break silently. Renaming the option would make this more obvious since the format is different.
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.
startAt
could be alternative.
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.
Yes, that seems more natural in the new version
@@ -50,10 +50,10 @@ in { | |||
''; | |||
}; | |||
|
|||
period = mkOption { | |||
startAt = mkOption { |
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.
Adding:
(mkRemovedOptionModule [ "services" "postgresqlBackup" "period" ] "A systemd timer is now used instead of cron. The starting time can be configured via services.postgresqlBackup.startAt")
modules/rename.nix
would make sense.
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.
OK. Do we need to also mention the change in the release notes?
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.
Probably not, the error message generated from mkRemovedOptionModule should be self-explanatory.
Motivation for this change
Fix the
postgresqlBackup
module. At least in NixOS 18.03 the backup is broken, delivering empty backup files quietly (#41388).Things done
pgdumpOptions
to modulesandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)