Skip to content

fix(backup): ignore NotFound after deletion - #11484

Open
opplion wants to merge 1 commit into
cloudnative-pg:mainfrom
opplion:fix-backup-notfound-log
Open

opplion wants to merge 1 commit into
cloudnative-pg:mainfrom
opplion:fix-backup-notfound-log

Conversation

@opplion

@opplion opplion commented Sep 15, 2026 •

Copy link
Copy Markdown

Resolves: #11483

@opplion
opplion requested a review from a team as a code owner September 15, 2026 14:33
@github-actions

Copy link
Copy Markdown
Contributor

Warning

Linked issue missing.

Reference one in the PR body using a keyword (Closes / Fixes / Resolves / Refs / See) followed by #<issue_id> or owner/repo#<issue_id>.

Alternatively, apply the no-issue label to skip this check.

@cnpg-bot cnpg-bot added backport-requested ◀️ This pull request should be backported to all supported releases release-1.28 release-1.29 release-1.30 labels Sep 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

❗ By default, the pull request is configured to backport to all release branches.

  • To stop backporting this pr, remove the label: backport-requested ◀️ or add the label 'do not backport'
  • To stop backporting this pr to a certain release branch, remove the specific branch label: release-x.y

@ehtishammubarik

Copy link
Copy Markdown

The fix itself matches the convention the other reconcilers already use for a deleted object: DatabaseRoleReconciler (internal/controller/databaserole_controller.go:71-74), PoolerReconciler (pooler_controller.go:76-79), and ScheduledBackupReconciler (scheduledbackup_controller.go:85-87) all return ctrl.Result{}, nil on IsNotFound, logging "Resource has been deleted" rather than wrapping it in reconcile.TerminalError. BackupReconciler was the outlier before this PR.

The two red checks aren't about the fix, they're both mechanical and easy to clear:

"Ensure Pull Request has a linked issue" is failing because of the URL, not because the issue isn't referenced. The checker (.github/workflows/pr_verify_linked_issue.yml:49-58) only matches a keyword immediately followed by #<number> (optionally owner/repo#<number>) — a full https://.../issues/11483 URL after the keyword doesn't match its regex. I ran the exact pattern from that file against the current body:

input:  "Resolves: https://github.com/cloudnative-pg/cloudnative-pg/issues/11483"
matches: []

input:  "Resolves #11483"
matches: ["Resolves #11483"]

Swapping the body to Resolves #11483 (colon optional either way) is enough to pass.

DCO is failing because the commit has no Signed-off-by: trailer — git show 79c4da9 is just the subject line, nothing else. git commit --amend -s (or an interactive rebase with -s if there end up being more commits) then a force-push should clear it.

Nothing else jumped out from a read of the diff and the added test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-requested ◀️ This pull request should be backported to all supported releases release-1.28 release-1.29 release-1.30

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Backup controller logs a "Reconciler error … terminal error: Backup … not found" every time retention prunes a Backup

4 participants