Skip to content

chore(controller): replace deprecated Result.Requeue with RequeueAfter#2997

Open
tariq-hasan wants to merge 1 commit into
kubeflow:masterfrom
tariq-hasan:chore/replace-requeue-with-requeueafter
Open

chore(controller): replace deprecated Result.Requeue with RequeueAfter#2997
tariq-hasan wants to merge 1 commit into
kubeflow:masterfrom
tariq-hasan:chore/replace-requeue-with-requeueafter

Conversation

@tariq-hasan

Copy link
Copy Markdown
Member

Purpose of this PR

reconcile.Result.Requeue is deprecated in controller-runtime in favor of RequeueAfter. After the Kubernetes 1.35 / controller-runtime bump, staticcheck (SA1019) flags every use of it, and .golangci.yaml currently suppresses the warning instead of fixing the code. This PR removes the deprecated field everywhere and drops the lint exclusion.

Fixes #2991

Change Category

  • Bugfix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that could affect existing functionality)
  • Documentation update

Checklist

  • I have conducted a self-review of my own code.
  • I have updated documentation accordingly.
  • I have added tests that prove my changes are effective or that my feature works.
  • Existing unit tests pass locally with my changes.

Copilot AI review requested due to automatic review settings June 21, 2026 22:44
@google-oss-prow google-oss-prow Bot requested review from ImpSy and RobuRishabh June 21, 2026 22:44
@google-oss-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign jacobsalway for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.Requeue usages with RequeueAfter where a timed requeue is intended, and otherwise relied on returning errors to trigger controller-runtime requeues.
  • Updated SparkApplication controller tests to assert RequeueAfter == 0 instead of Requeue == 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.

Comment thread internal/controller/sparkapplication/controller.go Outdated
Signed-off-by: tariq-hasan <mmtariquehsn@gmail.com>
@tariq-hasan tariq-hasan force-pushed the chore/replace-requeue-with-requeueafter branch from 2a47f68 to 48c8249 Compare June 21, 2026 23:55
@tariq-hasan

Copy link
Copy Markdown
Member Author

/retest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use RequeueAfter after instead of Requeue

2 participants