You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by gi...@apache.org on 2024/03/08 08:36:57 UTC

(incubator-devlake) branch release-v0.21-auto-cherry-pick-7146 created (now ca95f4945)

This is an automated email from the ASF dual-hosted git repository.

github-bot pushed a change to branch release-v0.21-auto-cherry-pick-7146
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


      at ca95f4945 fix: blueprint gets disabled when disabling dora for project (#7146)

This branch includes the following new commits:

     new ca95f4945 fix: blueprint gets disabled when disabling dora for project (#7146)

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(incubator-devlake) 01/01: fix: blueprint gets disabled when disabling dora for project (#7146)

Posted by gi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

github-bot pushed a commit to branch release-v0.21-auto-cherry-pick-7146
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git

commit ca95f4945220ad37069e106eb1d2d905f4038abb
Author: Klesh Wong <zh...@merico.dev>
AuthorDate: Fri Mar 8 16:36:10 2024 +0800

    fix: blueprint gets disabled when disabling dora for project (#7146)
---
 backend/scripts/build-plugins.sh   |  4 ++--
 backend/server/services/init.go    |  3 ---
 backend/server/services/project.go | 18 +++++++++---------
 3 files changed, 11 insertions(+), 14 deletions(-)

diff --git a/backend/scripts/build-plugins.sh b/backend/scripts/build-plugins.sh
index da3be3d45..b2bf71751 100755
--- a/backend/scripts/build-plugins.sh
+++ b/backend/scripts/build-plugins.sh
@@ -46,7 +46,7 @@ PLUGIN_SRC_DIR=$ROOT_DIR/plugins
 PLUGIN_OUTPUT_DIR=${PLUGIN_DIR:-$ROOT_DIR/bin/plugins}
 
 if [ -n "$DEVLAKE_DEBUG" ]; then
-    EXTRA="-gcflags='all=-N -l'"
+    GCFLAGS=all=-N\ -l
 fi
 
 if [ -z "$DEVLAKE_PLUGINS" ]; then
@@ -67,7 +67,7 @@ PIDS=""
 for PLUG in $PLUGINS; do
     NAME=$(basename $PLUG)
     echo "Building plugin $NAME to bin/plugins/$NAME/$NAME.so with args: $*"
-    go build -buildmode=plugin $EXTRA -o $PLUGIN_OUTPUT_DIR/$NAME/$NAME.so $PLUG/*.go &
+    go build -buildmode=plugin --gcflags="$GCFLAGS" -o $PLUGIN_OUTPUT_DIR/$NAME/$NAME.so $PLUG/*.go &
     PIDS="$PIDS $!"
     # avoid too many processes causing signal killed
     COUNT=$(echo "$PIDS" | wc -w)
diff --git a/backend/server/services/init.go b/backend/server/services/init.go
index 86558ce55..b40d99ff2 100644
--- a/backend/server/services/init.go
+++ b/backend/server/services/init.go
@@ -119,9 +119,6 @@ func ExecuteMigration() errors.Error {
 	// cronjob for blueprint triggering
 	location := cron.WithLocation(time.UTC)
 	cronManager = cron.New(location)
-	if err != nil {
-		panic(err)
-	}
 
 	// initialize pipeline server, mainly to start the pipeline consuming process
 	pipelineServiceInit()
diff --git a/backend/server/services/project.go b/backend/server/services/project.go
index 9ebc1e7ae..51d773e82 100644
--- a/backend/server/services/project.go
+++ b/backend/server/services/project.go
@@ -224,14 +224,14 @@ func PatchProject(name string, body map[string]interface{}) (*models.ApiOutputPr
 	}
 
 	// Blueprint
-	err = tx.UpdateColumn(
-		&models.Blueprint{},
-		"enable", projectInput.Enable,
-		dal.Where("project_name = ?", name),
-	)
-	if err != nil {
-		return nil, err
-	}
+	// err = tx.UpdateColumn(
+	// 	&models.Blueprint{},
+	// 	"enable", projectInput.Enable,
+	// 	dal.Where("project_name = ?", name),
+	// )
+	// if err != nil {
+	// 	return nil, err
+	// }
 
 	// refresh project metrics if needed
 	if len(projectInput.Metrics) > 0 {
@@ -377,7 +377,7 @@ func makeProjectOutput(project *models.Project, withLastPipeline bool) (*models.
 	}
 	if withLastPipeline {
 		if projectOutput.Blueprint == nil {
-			logger.Warn(fmt.Errorf("Blueprint is nil"), "want to get latest pipeline, but blueprint is nil")
+			logger.Warn(fmt.Errorf("blueprint is nil"), "want to get latest pipeline, but blueprint is nil")
 		} else {
 			pipelines, pipelinesCount, err := GetPipelines(&PipelineQuery{
 				BlueprintId: projectOutput.Blueprint.ID,