:bug: OPRUN-4266: Restore last-applied-config annotation in cache by tmshort · Pull Request #2338 · operator-framework/operator-controller

camilamacedo86

@tmshort

This restores the last-applied-config annotation in the cache, as its
absense can cause issues with clients when we update our finalizers.

This increases memory utilization until we can solve the finalizer issue.

Signed-off-by: Todd Short <tshort@redhat.com>

ankitathomas

@tmshort tmshort changed the title 🐛 Restore last-applied-config annotation in cache 🐛 OPRUN-4266: Restore last-applied-config annotation in cache

Nov 17, 2025

camilamacedo86

@openshift-ci openshift-ci bot added the approved

Indicates a PR has been approved by an approver from all required OWNERS files.

label

Nov 17, 2025

@tmshort tmshort deleted the restore-last-applied-config branch

November 18, 2025 18:23

tmshort added a commit to tmshort/operator-controller that referenced this pull request

Nov 18, 2025

tmshort added a commit to tmshort/operator-controller that referenced this pull request

Nov 19, 2025

tmshort added a commit to tmshort/operator-controller that referenced this pull request

Nov 19, 2025

tmshort added a commit to tmshort/operator-controller that referenced this pull request

Nov 24, 2025

tmshort added a commit to tmshort/operator-controller that referenced this pull request

Nov 25, 2025

tmshort added a commit to tmshort/operator-controller that referenced this pull request

Nov 26, 2025

tmshort added a commit to tmshort/operator-controller that referenced this pull request

Dec 1, 2025

openshift-merge-bot bot pushed a commit that referenced this pull request

Dec 2, 2025
* Use Patch instead of Update for finalizer operations

Refactor all controllers to use Patch() instead of Update()
when adding or removing finalizers to improve performance, and to avoid
removing non-cached fields erroneously.

This is necesary because we no longer cache the last-applied-configuration
annotation, so when we add/remove the finalizers, we are removing that field
from the metadata. This causes issues with clients when they don't see that
annotation (e.g. apply the same ClusterExtension twice).

Update ClusterCatalog and ClusterExtension controllers to use Patch-based
funalizer management (ClusterExtensionRevision already uses Patch())

Signed-off-by: Todd Short <tshort@redhat.com>

* Revert "Restore last-applied-config annotation in cache (#2338)"

This reverts commit 39cbdbe.

---------

Signed-off-by: Todd Short <tshort@redhat.com>