You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by kl...@apache.org on 2023/12/29 06:17:11 UTC
(incubator-devlake) branch kw-disabled-bp-should-reject-trigger created (now 6a4f1ea35)
This is an automated email from the ASF dual-hosted git repository.
klesh pushed a change to branch kw-disabled-bp-should-reject-trigger
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
at 6a4f1ea35 fix: trigger bp api should reject disabled bp
This branch includes the following new commits:
new 6a4f1ea35 fix: trigger bp api should reject disabled bp
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: trigger bp api should reject disabled bp
Posted by kl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
klesh pushed a commit to branch kw-disabled-bp-should-reject-trigger
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
commit 6a4f1ea35afc34974e9e5e5563eefd3754ca5da7
Author: Klesh Wong <zh...@merico.dev>
AuthorDate: Fri Dec 29 14:16:52 2023 +0800
fix: trigger bp api should reject disabled bp
---
backend/server/services/blueprint.go | 3 +++
1 file changed, 3 insertions(+)
diff --git a/backend/server/services/blueprint.go b/backend/server/services/blueprint.go
index 4dd94b9f6..fa2850895 100644
--- a/backend/server/services/blueprint.go
+++ b/backend/server/services/blueprint.go
@@ -406,6 +406,9 @@ func TriggerBlueprint(id uint64, syncPolicy *models.SyncPolicy, shouldSanitize b
logger.Error(err, "GetBlueprint, id: %d", id)
return nil, err
}
+ if !blueprint.Enable {
+ return nil, errors.BadInput.New("blueprint is not enabled")
+ }
blueprint.SkipCollectors = syncPolicy.SkipCollectors
blueprint.FullSync = syncPolicy.FullSync
pipeline, err := createPipelineByBlueprint(blueprint, syncPolicy)