From 72a498254171629c1183f735c930cc4023ce7d5b Mon Sep 17 00:00:00 2001
From: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
Date: Thu, 7 Apr 2022 21:41:57 +0530
Subject: [PATCH] remove leftover timeout in reconcilers

Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
---
 controllers/helmchart_controller.go      | 3 ---
 controllers/helmrepository_controller.go | 3 ---
 2 files changed, 6 deletions(-)

diff --git a/controllers/helmchart_controller.go b/controllers/helmchart_controller.go
index 1f701d615..ab64d2dca 100644
--- a/controllers/helmchart_controller.go
+++ b/controllers/helmchart_controller.go
@@ -326,9 +326,6 @@ func (r *HelmChartReconciler) notify(oldObj, newObj *sourcev1.HelmChart, build *
 // they match the Storage server hostname of current runtime.
 func (r *HelmChartReconciler) reconcileStorage(ctx context.Context, obj *sourcev1.HelmChart, build *chart.Build) (sreconcile.Result, error) {
 	// Garbage collect previous advertised artifact(s) from storage
-	// Abort if it takes more than 5 seconds.
-	ctx, cancel := context.WithTimeout(ctx, time.Second*5)
-	defer cancel()
 	_ = r.garbageCollect(ctx, obj)
 
 	// Determine if the advertised artifact is still in storage
diff --git a/controllers/helmrepository_controller.go b/controllers/helmrepository_controller.go
index 63efd9d0c..368a0d929 100644
--- a/controllers/helmrepository_controller.go
+++ b/controllers/helmrepository_controller.go
@@ -285,9 +285,6 @@ func (r *HelmRepositoryReconciler) notify(oldObj, newObj *sourcev1.HelmRepositor
 // they match the Storage server hostname of current runtime.
 func (r *HelmRepositoryReconciler) reconcileStorage(ctx context.Context, obj *sourcev1.HelmRepository, _ *sourcev1.Artifact, _ *repository.ChartRepository) (sreconcile.Result, error) {
 	// Garbage collect previous advertised artifact(s) from storage
-	// Abort if it takes more than 5 seconds.
-	ctx, cancel := context.WithTimeout(ctx, time.Second*5)
-	defer cancel()
 	_ = r.garbageCollect(ctx, obj)
 
 	// Determine if the advertised artifact is still in storage