chore(controller): replace deprecated Result.Requeue with RequeueAfter#2997
chore(controller): replace deprecated Result.Requeue with RequeueAfter#2997tariq-hasan wants to merge 1 commit into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Pull request overview
This PR updates the operator’s controllers to avoid the deprecated reconcile.Result.Requeue field (now flagged by staticcheck SA1019 after the Kubernetes 1.35 / controller-runtime bump) and removes the corresponding golangci-lint exclusion.
Changes:
- Replaced deprecated
Result.Requeueusages withRequeueAfterwhere a timed requeue is intended, and otherwise relied on returning errors to trigger controller-runtime requeues. - Updated SparkApplication controller tests to assert
RequeueAfter == 0instead ofRequeue == false. - Removed the golangci-lint exclusion rule suppressing SA1019 for
Result.Requeue.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| internal/controller/validatingwebhookconfiguration/controller.go | Removes deprecated requeue usage during webhook CA bundle updates. |
| internal/controller/mutatingwebhookconfiguration/controller.go | Removes deprecated requeue usage during webhook CA bundle updates. |
| internal/controller/sparkconnect/reconciler.go | Uses RequeueAfter for conflict retry instead of deprecated Requeue. |
| internal/controller/sparkapplication/controller.go | Removes deprecated Requeue usage and uses RequeueAfter for explicit requeue timing in TTL logic. |
| internal/controller/sparkapplication/controller_test.go | Updates assertions to RequeueAfter semantics. |
| internal/controller/scheduledsparkapplication/controller.go | Removes deprecated Requeue usage in error paths while keeping schedule-based RequeueAfter. |
| .golangci.yaml | Drops the SA1019 exclusion for Result.Requeue. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: tariq-hasan <mmtariquehsn@gmail.com>
2a47f68 to
48c8249
Compare
|
/retest |
Purpose of this PR
reconcile.Result.Requeueis deprecated in controller-runtime in favor ofRequeueAfter. After the Kubernetes 1.35 / controller-runtime bump, staticcheck (SA1019) flags every use of it, and.golangci.yamlcurrently suppresses the warning instead of fixing the code. This PR removes the deprecated field everywhere and drops the lint exclusion.Fixes #2991
Change Category
Checklist