Repository navigation
chore: replace deprecated ctrl.Result.Requeue with RequeueAfter - #11344
Merged
Merged
Conversation
Contributor
|
❗ By default, the pull request is configured to backport to all release branches.
|
mnencia
force-pushed
the
dev/requeue-deprecation
branch
from
August 20, 2026 06:50
95adbef to
5cb9f58
Compare
gbartolini
approved these changes
Aug 20, 2026
Member
Author
|
/test |
Contributor
|
@mnencia, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/32342138391 |
controller-runtime deprecated the Requeue field of ctrl.Result in favor of RequeueAfter, which golangci-lint's staticcheck (SA1019) now flags on every remaining use. Replace every remaining Requeue: true with an equivalent RequeueAfter duration, matching the interval already used by neighboring call sites in the same function. Also restructure the unknown-plugin early return in ClusterReconciler.Reconcile, whose combined multi-line composite-literal-and-call return was toggling between two gofumpt-preferred indentations across successive lint runs. Signed-off-by: Marco Nenciarini <[email protected]>
mnencia
force-pushed
the
dev/requeue-deprecation
branch
from
August 21, 2026 18:18
5cb9f58 to
207e765
Compare
Silence staticcheck SA1019 on intentional deprecated-field usage in tests with per-line nolint directives, and apply gofumpt formatting to two test-support files with redundant parentheses. Signed-off-by: Marco Nenciarini <[email protected]>
leonardoce
approved these changes
Aug 24, 2026
cnpg-bot
pushed a commit
that referenced
this pull request
Aug 24, 2026
controller-runtime deprecated the Requeue field of ctrl.Result in favor of RequeueAfter, which golangci-lint's staticcheck (SA1019) now flags on every remaining use. Replace every remaining Requeue: true with an equivalent RequeueAfter duration, matching the interval already used by neighboring call sites in the same function. Also restructure the unknown-plugin early return in ClusterReconciler.Reconcile, whose combined multi-line composite-literal-and-call return was toggling between two gofumpt-preferred indentations across successive lint runs. Signed-off-by: Marco Nenciarini <[email protected]> (cherry picked from commit 0643487)
mnencia
added a commit
that referenced
this pull request
Aug 24, 2026
controller-runtime deprecated the Requeue field of ctrl.Result in favor of RequeueAfter, which golangci-lint's staticcheck (SA1019) now flags on every remaining use. Replace every remaining Requeue: true with an equivalent RequeueAfter duration, matching the interval already used by neighboring call sites in the same function. Also restructure the unknown-plugin early return in ClusterReconciler.Reconcile, whose combined multi-line composite-literal-and-call return was toggling between two gofumpt-preferred indentations across successive lint runs. Signed-off-by: Marco Nenciarini <[email protected]> (cherry picked from commit 0643487)
mnencia
added a commit
that referenced
this pull request
Aug 24, 2026
controller-runtime deprecated the Requeue field of ctrl.Result in favor of RequeueAfter, which golangci-lint's staticcheck (SA1019) now flags on every remaining use. Replace every remaining Requeue: true with an equivalent RequeueAfter duration, matching the interval already used by neighboring call sites in the same function. Also restructure the unknown-plugin early return in ClusterReconciler.Reconcile, whose combined multi-line composite-literal-and-call return was toggling between two gofumpt-preferred indentations across successive lint runs. Signed-off-by: Marco Nenciarini <[email protected]> (cherry picked from commit 0643487)
gbartolini
pushed a commit
that referenced
this pull request
Oct 17, 2026
Since #11344 replaced the deprecated `Requeue` field, a reconciler hook returning `BEHAVIOR_REQUEUE` without `requeue_after` maps to an empty `ctrl.Result`, so the Cluster is not requeued at all. `requeue_after` is optional in CNPG-I, and the barman-cloud plugin returns no delay when the referenced ObjectStore doesn't exist yet: a Cluster created before its ObjectStore then stays in `BootstrapPending` until something else triggers a reconciliation. Requeue after one second when no delay is requested. Closes #11618 Assisted-by: Claude Signed-off-by: Valerio Del Sarto <[email protected]> Signed-off-by: Marco Nenciarini <[email protected]> Co-authored-by: Marco Nenciarini <[email protected]>
cnpg-bot
pushed a commit
that referenced
this pull request
Oct 17, 2026
Since #11344 replaced the deprecated `Requeue` field, a reconciler hook returning `BEHAVIOR_REQUEUE` without `requeue_after` maps to an empty `ctrl.Result`, so the Cluster is not requeued at all. `requeue_after` is optional in CNPG-I, and the barman-cloud plugin returns no delay when the referenced ObjectStore doesn't exist yet: a Cluster created before its ObjectStore then stays in `BootstrapPending` until something else triggers a reconciliation. Requeue after one second when no delay is requested. Closes #11618 Assisted-by: Claude Signed-off-by: Valerio Del Sarto <[email protected]> Signed-off-by: Marco Nenciarini <[email protected]> Co-authored-by: Marco Nenciarini <[email protected]> (cherry picked from commit 99e9645)
cnpg-bot
pushed a commit
that referenced
this pull request
Oct 17, 2026
Since #11344 replaced the deprecated `Requeue` field, a reconciler hook returning `BEHAVIOR_REQUEUE` without `requeue_after` maps to an empty `ctrl.Result`, so the Cluster is not requeued at all. `requeue_after` is optional in CNPG-I, and the barman-cloud plugin returns no delay when the referenced ObjectStore doesn't exist yet: a Cluster created before its ObjectStore then stays in `BootstrapPending` until something else triggers a reconciliation. Requeue after one second when no delay is requested. Closes #11618 Assisted-by: Claude Signed-off-by: Valerio Del Sarto <[email protected]> Signed-off-by: Marco Nenciarini <[email protected]> Co-authored-by: Marco Nenciarini <[email protected]> (cherry picked from commit 99e9645)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
controller-runtime deprecated the Requeue field of ctrl.Result in favor of RequeueAfter, which golangci-lint's staticcheck (SA1019) now flags on every remaining use.
Replace every remaining Requeue: true with an equivalent RequeueAfter duration, matching the interval already used by neighboring call sites in the same function. Also restructure the unknown-plugin early return in ClusterReconciler.Reconcile, whose combined multi-line composite-literal-and-call return was toggling between two gofumpt-preferred indentations across successive lint runs.