feat(cluster): expose stopDelay for fast scheduledbackups cleanup#941
Merged
itay-grudev merged 1 commit intoJul 6, 2026
Conversation
The barman-plugin-scheduledbackups test intermittently fails with 'context deadline exceeded' during cleanup. The chart forces immediate: true on scheduled backups (templates/scheduled-backups.yaml), so a backup is still running when cleanup starts; Barman blocks instance shutdown until it completes, pushing teardown past the 5m cleanup budget on GitHub runners. Expose cluster.stopDelay in the chart (values + schema + template), mapping to the CNPG Cluster spec.stopDelay, which also sets the pod's terminationGracePeriodSeconds. The scheduledbackups test sets stopDelay: 30 so the instance is force-stopped promptly at teardown, interrupting the still-running backup. That's acceptable because this test only verifies a backup is started from the ScheduledBackup; backup success is covered by barman-plugin-backup-restore. Result: passes reliably and runs in ~75s (down from ~6m, previously timing out). Verified green in fork CI. This is the 'help it clean up faster' approach rather than raising the cleanup timeout. Supersedes cloudnative-pg#940. Supplements cloudnative-pg#924. Signed-off-by: Abdullah Alaqeel <abdullah.t.aqeel@gmail.com>
7ae47cb
into
cloudnative-pg:feat/barman-plugin-support
23 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
barman-plugin-scheduledbackupstest intermittently fails withcontext deadline exceededduring cleanup. The chart forcesimmediate: trueon scheduled backups (templates/scheduled-backups.yaml), so a backup is still running when cleanup starts; Barman blocks instance shutdown until it completes, pushing teardown past the 5m cleanup budget on GitHub runners.This exposes
cluster.stopDelayin the chart (values + schema + template) — mapping to the CNPG Clusterspec.stopDelay, which also sets the pod'sterminationGracePeriodSeconds. The scheduledbackups test setsstopDelay: 30so the instance is force-stopped promptly at teardown, interrupting the still-running backup. That is acceptable because this test only verifies a backup is started from theScheduledBackup(backup success is covered bybarman-plugin-backup-restore).Result: passes reliably and runs in ~75s (down from ~6m, previously timing out). Verified green in fork CI. This is the "help it clean up faster" approach rather than raising the cleanup timeout.
Supersedes #940. Supplements #924.