Skip to content

Conversation

pmalek
Copy link
Member

@pmalek pmalek commented Oct 13, 2025

What this PR does / why we need it:

To prevent the following errors:

2025-10-12T19:15:29Z	ERROR	Reconciler error	{"controller": "controlplane", "controllerGroup": "gateway-operator.konghq.com", "controllerKind": "ControlPlane", "ControlPlane": {"name":"gw-pdx4p-gvf9q","namespace":"941cec66-1780-45c6-8181-6c5ef51b1fb0"}, "namespace": "941cec66-1780-45c6-8181-6c5ef51b1fb0", "name": "gw-pdx4p-gvf9q", "reconcileID": "c6d28baa-d1c9-470f-a76c-5b7f8e1d512c", "error": "failed updating ControlPlane: controlplanes.gateway-operator.konghq.com \"gw-pdx4p-gvf9q\" not found"}
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).reconcileHandler
	/home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:353
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).processNextWorkItem
	/home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:300
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).Start.func2.1
	/home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:202

this PR makes the error handling a bit more robust by checking if the error from the API server is a not found error and exists the reconciliation without an error when that happens.

Which issue this PR fixes

Fixes #

Special notes for your reviewer:

PR Readiness Checklist:

Complete these before marking the PR as ready to review:

  • the CHANGELOG.md release notes have been updated to reflect significant changes

@pmalek pmalek added this to the Daily maintenance milestone Oct 13, 2025
@pmalek pmalek self-assigned this Oct 13, 2025
@pmalek pmalek force-pushed the handle-finalizer-update-errors branch 2 times, most recently from 95b6fe3 to bb07aec Compare October 13, 2025 09:38
@pmalek pmalek marked this pull request as ready for review October 13, 2025 11:22
@pmalek pmalek requested a review from a team as a code owner October 13, 2025 11:22
@pmalek pmalek force-pushed the handle-finalizer-update-errors branch from bb07aec to 116f5cc Compare October 14, 2025 10:32
@pmalek pmalek force-pushed the handle-finalizer-update-errors branch from 116f5cc to 14183d2 Compare October 14, 2025 20:28
programmer04
programmer04 previously approved these changes Oct 15, 2025
Co-authored-by: Jakub Warczarek <[email protected]>
Co-authored-by: Jintao Zhang <[email protected]>
@pmalek pmalek requested a review from tao12345666333 October 15, 2025 14:40
@tao12345666333 tao12345666333 added this pull request to the merge queue Oct 15, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 15, 2025
@pmalek pmalek added this pull request to the merge queue Oct 15, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 15, 2025
@pmalek pmalek merged commit d0ba34d into main Oct 15, 2025
44 checks passed
@pmalek pmalek deleted the handle-finalizer-update-errors branch October 15, 2025 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants