Skip to content

Treat deleted CNPG Backup objects as a normal reconciliation outcome #4807

Open

Description

@devantler

🤖 Generated by the Agentic Engineer

Expected Behavior

When a queued reconciliation refers to a Backup object that has already been deleted, CloudNativePG should finish normally without an error or a requeue. Genuine API failures and failures of an existing backup must still be reported.

Actual Behavior

The initial object lookup in BackupReconciler.Reconcile converts a missing Backup into reconcile.TerminalError(err). This avoids a retry but still produces an error-level reconciliation report for a normal deletion race. The same branch exists in v1.30.1 and upstream main.

This makes normal resource removal look like a backup failure and reduces the usefulness of operational error monitoring. A missing request object alone does not establish that a backup failed or that stored backup data was lost.

Steps to Replicate

  1. Create a reconciler with a fake Kubernetes client containing no Backup objects.
  2. Reconcile a request for a synthetic, absent Backup.
  3. Observe the returned terminal error instead of an empty result and no error.

Proposed Scope

Investigate a small upstream correction to the initial Backup lookup only, following the target repository's contribution and attribution policies. A platform manifest cannot change this return value; lowering log levels or suppressing the error pattern would also hide genuine failures.

Keep this as Backlog work until the upstream contribution is admitted and delivery capacity is available. A source patch alone is not platform delivery: a released version must be adopted and verified afterward.

Upstream Admission and Validation

Fresh source and release reads on 2026-10-13 confirm that upstream main and the latest published release, v1.30.1, still return a terminal error for the initial missing Backup lookup. Adopting v1.30.1 alone does not deliver this correction.

Before implementation, follow the project contribution guidelines and source contribution guide: search for an existing report, discuss the narrow change in an upstream issue, and obtain maintainer agreement and assignment. Their normal validation includes unit tests and basic end-to-end coverage. Agree on a validation venue that meets those requirements without executing an untrusted external branch locally; an isolated source diff or a successful compile is not equivalent evidence.

The AI policy permits vetted assistance with contributor accountability and requires disclosure in a substantially assisted PR and an Assisted-by commit trailer. Any proposal must accurately describe this one behavioral correction, preserve genuine API and existing-backup failures, and satisfy those attribution requirements. No external issue, fork, branch or PR has been published for this task yet.

Acceptance Criteria

  • Reproduce the absent-object result with a failing regression test, then prove an empty result, no error and no requeue.
  • Preserve forbidden, transport and cancellation errors from the initial lookup, and genuine errors while processing an existing Backup.
  • Validate the narrowly scoped change with the upstream test and review requirements; publish no private runtime evidence.
  • Adopt an actual released fix through platform CI, current-head review and normal merge mechanics.
  • Verify successful scheduled backups and separated live monitoring samples after deployment, without recreating deleted request objects or suppressing real errors.

Priority: Medium. Effort: Medium, including upstream validation, release adoption and operational verification. No backup outage or data loss is established by this defect.

Activity

  1. added theissue type on Oct 12, 2026
  2. updated Effort Medium and Priority Medium on Oct 12, 2026
  3. moved this to 📥 Backlog in 🌊 Project Boardon Oct 12, 2026
  4. self-assigned this
    on Oct 29, 2026
  5. devantler commented on Oct 29, 2026

    @devantler
    ContributorAuthor

    🤖 Generated by the Agentic Engineer

    The latest release and current upstream source still contain this behavior. The existing upstream issue is cloudnative-pg/cloudnative-pg#10851, assigned to a project maintainer. PR #11484 already proposes the narrow correction and a regression test; it remains open at 79c4da9b5a70f21cfbe28746f31ce1bb6c4c98d0, with its linked-issue check failing and DCO action required. It has not merged or shipped.

    Blocker: upstream admission and delivery of the existing correction. The project requires maintainer agreement and assignment before implementation, so opening another report or competing patch would duplicate work. Resume when that proposal advances, or the project explicitly admits a replacement; adopt and verify an actual released fix before closing this issue. Genuine read and backup failures must remain visible.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Fields

Priority

Medium

Effort

Medium

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions