[oadp-1.4] fix: check errors.IsNotFound before failing DaemonSet delete in NodeAgent reconcile - #2376
Conversation
…gent reconcile The DaemonSet deletion path in ReconcileNodeAgentDaemonset did not check errors.IsNotFound before treating a delete failure as a real error, unlike the adjacent Get() call, which already handles this correctly. Surfaced by e2e test flakiness where DeleteDaemonSetFailed events left the AfterEach cleanup for DPA configuration tests in a bad state. Part of openshift#2372 Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Codecov Report❌ Patch coverage is Please upload reports for the commit fd0ff4a to get more accurate results.
Additional details and impacted files@@ Coverage Diff @@
## oadp-1.4 #2376 +/- ##
============================================
- Coverage 38.47% 38.46% -0.01%
============================================
Files 30 30
Lines 5113 5114 +1
============================================
Hits 1967 1967
- Misses 2949 2950 +1
Partials 197 197 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Joeavaikath, kaovilai, shubham-pampattiwar The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@kaovilai: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Summary
The DaemonSet deletion path in
ReconcileNodeAgentDaemonsetdidn't checkerrors.IsNotFound(err)before treating a delete failure as a real error — unlike the adjacentGet()call in the same function, which already handles this correctly.How this was found
Surfaced by this repo's own e2e log-analysis tooling on
ci/prow/4.23-e2e-test-awsfor PR #2206 (oadp-1.6): theAfterEachcleanup of "Configuration testing for DPA Custom Resource" hit aDeleteDaemonSetFailedevent while the velero pod was stuckPodInitializing. Confirmed to be a pre-existing bug present acrossoadp-dev/oadp-1.6/oadp-1.5/oadp-1.4(tracked via #2372 for all four branches; #2373/#2374/#2375 addressoadp-dev/oadp-1.6/oadp-1.5, this PR addressesoadp-1.4).Test plan
gofmt -lcleango build ./controllers/...go vet ./controllers/...Part of #2372
Note
Responses generated with Claude