@@ -429,8 +429,7 @@ func ReconcileDevBucketSourceAndKS(ctx context.Context, log logger.Logger, kubeC
429
429
}
430
430
431
431
// wait for the reconciliation of dev-bucket to be done
432
- //nolint:staticcheck // deprecated, tracking issue: https://github.com/weaveworks/weave-gitops/issues/3812
433
- if err := wait .Poll (interval , timeout , func () (bool , error ) {
432
+ if err := wait .PollUntilContextTimeout (context .Background (), interval , timeout , true , func (_ context.Context ) (bool , error ) {
434
433
devBucket := & sourcev1b2.Bucket {}
435
434
if err := kubeClient .Get (ctx , types.NamespacedName {
436
435
Name : constants .RunDevBucketName ,
@@ -445,8 +444,7 @@ func ReconcileDevBucketSourceAndKS(ctx context.Context, log logger.Logger, kubeC
445
444
}
446
445
447
446
// wait for devBucket to be ready
448
- //nolint:staticcheck // deprecated, tracking issue: https://github.com/weaveworks/weave-gitops/issues/3812
449
- if err := wait .Poll (interval , timeout , func () (bool , error ) {
447
+ if err := wait .PollUntilContextTimeout (context .Background (), interval , timeout , true , func (_ context.Context ) (bool , error ) {
450
448
devBucket := & sourcev1b2.Bucket {}
451
449
if err := kubeClient .Get (ctx , types.NamespacedName {
452
450
Name : constants .RunDevBucketName ,
@@ -473,8 +471,7 @@ func ReconcileDevBucketSourceAndKS(ctx context.Context, log logger.Logger, kubeC
473
471
return err
474
472
}
475
473
476
- //nolint:staticcheck // deprecated, tracking issue: https://github.com/weaveworks/weave-gitops/issues/3812
477
- if err := wait .Poll (interval , timeout , func () (bool , error ) {
474
+ if err := wait .PollUntilContextTimeout (context .Background (), interval , timeout , true , func (_ context.Context ) (bool , error ) {
478
475
devKs := & kustomizev1.Kustomization {}
479
476
if err := kubeClient .Get (ctx , types.NamespacedName {
480
477
Name : constants .RunDevKsName ,
@@ -489,8 +486,7 @@ func ReconcileDevBucketSourceAndKS(ctx context.Context, log logger.Logger, kubeC
489
486
}
490
487
491
488
devKs := & kustomizev1.Kustomization {}
492
- //nolint:staticcheck // deprecated, tracking issue: https://github.com/weaveworks/weave-gitops/issues/3812
493
- devKsErr := wait .Poll (interval , timeout , func () (bool , error ) {
489
+ devKsErr := wait .PollUntilContextTimeout (context .Background (), interval , timeout , true , func (_ context.Context ) (bool , error ) {
494
490
if err := kubeClient .Get (ctx , types.NamespacedName {
495
491
Name : constants .RunDevKsName ,
496
492
Namespace : namespace ,
0 commit comments