Skip to content

feat(cluster): expose stopDelay for fast scheduledbackups cleanup#941

Merged
itay-grudev merged 1 commit into
cloudnative-pg:feat/barman-plugin-supportfrom
aqeelat:fix/scheduledbackups-stop-delay
Jul 6, 2026
Merged

feat(cluster): expose stopDelay for fast scheduledbackups cleanup#941
itay-grudev merged 1 commit into
cloudnative-pg:feat/barman-plugin-supportfrom
aqeelat:fix/scheduledbackups-stop-delay

Conversation

@aqeelat

@aqeelat aqeelat commented Jul 6, 2026

Copy link
Copy Markdown

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.

This exposes 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 is 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 #940. Supplements #924.

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>
@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jul 6, 2026
@itay-grudev itay-grudev merged commit 7ae47cb into cloudnative-pg:feat/barman-plugin-support Jul 6, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants