Skip to content

Commit 6680154

Browse files
committed
migrate from Requeue to RequeueAfter in extensionconfig
Signed-off-by: sivchari <[email protected]>
1 parent 93adf87 commit 6680154

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

.golangci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ linters:
272272
- staticcheck
273273
text: 'SA1019: .*(res|result|i|j)\.Requeue is deprecated: Use `RequeueAfter` instead'
274274
# TODO: Remove Requeue step by step
275-
path: internal/controllers/(extensionconfig|machinepool)|util/util.go
275+
path: internal/controllers/machinepool
276276
# TODO: var-naming: avoid meaningless package names by revive
277277
# * test/infrastructure/docker/internal/docker/types/
278278
# * bootstrap/kubeadm/types/

internal/controllers/extensionconfig/extensionconfig_controller_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ func TestExtensionReconciler_Reconcile(t *testing.T) {
102102
res, err := r.Reconcile(ctx, ctrl.Request{NamespacedName: util.ObjectKey(extensionConfig)})
103103
g.Expect(err).ToNot(HaveOccurred())
104104
// If the registry isn't warm the reconcile loop will return Requeue: True
105-
g.Expect(res.Requeue).To(BeTrue())
105+
g.Expect(res.RequeueAfter).To(BeTrue())
106106
})
107107

108108
t.Run("successful reconcile and discovery on ExtensionConfig create", func(*testing.T) {

util/util.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -690,6 +690,8 @@ func IsSupportedVersionSkew(a, b semver.Version) bool {
690690

691691
// LowestNonZeroResult compares two reconciliation results
692692
// and returns the one with lowest requeue time.
693+
//
694+
//nolint:staticcheck // SA1019: Requeue is deprecated.
693695
func LowestNonZeroResult(i, j ctrl.Result) ctrl.Result {
694696
switch {
695697
case i.IsZero():

0 commit comments

Comments
 (0)