fix(apiserver-resources): ignore not-found errors during deletion#386
fix(apiserver-resources): ignore not-found errors during deletion#386
Conversation
When deleting a RoleBinding, if the resource doesn't exist on the cloud API server, treat it as success instead of retrying indefinitely. This prevents the controller from getting stuck in an error loop during helm uninstall when the remote resource was already cleaned up.
|
@mattisonchao:Thanks for your contribution. For this PR, do we need to update docs? |
|
@copilot extend the similar logics to other apiserverconnection resources, such as serviceaccounts, serviceaccountbindings, etc. |
Agent-Logs-Url: https://github.com/streamnative/pulsar-resources-operator/sessions/b16d9baf-494b-4238-a360-615646daac66 Co-authored-by: freeznet <1381618+freeznet@users.noreply.github.com>
Addressed in 5508bac. The branch already had the same not-found-on-delete behavior for ServiceAccounts and ServiceAccountBindings, so I added regression coverage for those controller deletion paths to lock it in and verify finalizer cleanup stays successful when the remote resource is already gone. |
|
@copilot currently we only handles 404 error when deletes rolebinding resources, but we need to handle the same 404 error when delete other apiserverconnection bind resources, such as serviceaccounts, serviceaccountbindings, etc. |
Agent-Logs-Url: https://github.com/streamnative/pulsar-resources-operator/sessions/ee155778-92d2-4761-a44d-8ea1051096ed Co-authored-by: freeznet <1381618+freeznet@users.noreply.github.com>
Addressed in c8bd207. I applied the same delete-time 404 handling across the API-server-backed reconcilers and expanded regression coverage for ServiceAccount, ServiceAccountBinding, APIKey, Secret, Workspace, and FlinkDeployment deletion paths. |
Summary
helm uninstallwhen the remote resource was already cleaned upTest plan
helm uninstall pulsar-rolebindings --waitcompletes cleanly with this fixmake test⌨️ Start Copilot coding agent tasks without leaving your editor — available in VS Code, Visual Studio, JetBrains IDEs and Eclipse.