From c54df798ee3910fcd72c2a4d6df34fa55a834e7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lazar=20Cvetkovi=C4=87?= Date: Mon, 25 Nov 2024 20:09:13 +0100 Subject: [PATCH] Bugfix on Knative parallel deploy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Lazar Cvetković --- pkg/driver/deployment/knative.go | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/pkg/driver/deployment/knative.go b/pkg/driver/deployment/knative.go index 0a5e621e..6c501b0a 100644 --- a/pkg/driver/deployment/knative.go +++ b/pkg/driver/deployment/knative.go @@ -53,17 +53,19 @@ func (*knativeDeployer) Deploy(cfg *config.Configuration) { deployed.Add(len(cfg.Functions)) for i := 0; i < len(cfg.Functions); i++ { - queue <- struct{}{} - - knativeDeploySingleFunction( - cfg.Functions[i], - knativeConfig.YamlPath, - knativeConfig.IsPartiallyPanic, - knativeConfig.EndpointPort, - knativeConfig.AutoscalingMetric, - &deployed, - queue, - ) + go func() { + queue <- struct{}{} + + knativeDeploySingleFunction( + cfg.Functions[i], + knativeConfig.YamlPath, + knativeConfig.IsPartiallyPanic, + knativeConfig.EndpointPort, + knativeConfig.AutoscalingMetric, + &deployed, + queue, + ) + }() } deployed.Wait()