From 094c14049abe32e8a77a377d7feda5cb03eebbe7 Mon Sep 17 00:00:00 2001 From: Vistaar Juneja Date: Mon, 18 Sep 2023 13:36:07 +0000 Subject: [PATCH] decrease parallel workers to 2 for CI (#522) --- internal/pipeline/manager/convert.go | 1 + internal/pipeline/triggerer/trigger.go | 6 +----- types/config.go | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/internal/pipeline/manager/convert.go b/internal/pipeline/manager/convert.go index 59b0683fa..cdf8e8e66 100644 --- a/internal/pipeline/manager/convert.go +++ b/internal/pipeline/manager/convert.go @@ -200,6 +200,7 @@ func convertToDroneBuild(execution *types.Execution) *drone.Build { func convertToDroneRepo(repo *types.Repository) *drone.Repo { return &drone.Repo{ ID: repo.ID, + Trusted: true, // as builds are running on user machines, the repo is marked trusted. UID: repo.UID, UserID: repo.CreatedBy, Name: repo.UID, diff --git a/internal/pipeline/triggerer/trigger.go b/internal/pipeline/triggerer/trigger.go index 1250b7684..51522ecb9 100644 --- a/internal/pipeline/triggerer/trigger.go +++ b/internal/pipeline/triggerer/trigger.go @@ -149,8 +149,6 @@ func (t *triggerer) Trigger( return t.createExecutionWithError(ctx, pipeline, base, err.Error()) } - verified := true - var matched []*yaml.Pipeline var dag = dag.New() for _, document := range manifest.Resources { @@ -237,9 +235,7 @@ func (t *triggerer) Trigger( if stage.Name == "" { stage.Name = "default" } - if verified == false { - stage.Status = enum.CIStatusBlocked - } else if len(stage.DependsOn) == 0 { + if len(stage.DependsOn) == 0 { stage.Status = enum.CIStatusPending } stages = append(stages, stage) diff --git a/types/config.go b/types/config.go index f1a9af021..d0c76dd76 100644 --- a/types/config.go +++ b/types/config.go @@ -88,7 +88,7 @@ type Config struct { // CI defines configuration related to build executions. CI struct { - ParallelWorkers int `envconfig:"GITNESS_CI_PARALLEL_WORKERS" default:"5"` + ParallelWorkers int `envconfig:"GITNESS_CI_PARALLEL_WORKERS" default:"2"` } // Database defines the database configuration parameters.