This is an automated email from the ASF dual-hosted git repository.
warren pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/main by this push:
new a8dc89bef fix: dbt deps command fail (#4971)
a8dc89bef is described below
commit a8dc89befe276e1e69a3cf0c0e834e879d717b50
Author: abeizn <[email protected]>
AuthorDate: Wed Apr 19 19:57:07 2023 +0800
fix: dbt deps command fail (#4971)
---
backend/plugins/dbt/tasks/convertor.go | 15 ++++-----------
1 file changed, 4 insertions(+), 11 deletions(-)
diff --git a/backend/plugins/dbt/tasks/convertor.go
b/backend/plugins/dbt/tasks/convertor.go
index 08e95fa6b..3d4ac56d3 100644
--- a/backend/plugins/dbt/tasks/convertor.go
+++ b/backend/plugins/dbt/tasks/convertor.go
@@ -114,20 +114,13 @@ func DbtConverter(taskCtx plugin.SubTaskContext) (err
errors.Error) {
defaultPackagesPath := filepath.Join(projectPath, "packages.yml")
_, err = errors.Convert01(os.Stat(defaultPackagesPath))
if err == nil {
- cmdDeps := exec.Command("dbt", "deps")
- logger.Info("dbt deps run script: ", cmdDeps)
- // prevent zombie process
- defer func() {
- if err = errors.Convert(cmdDeps.Wait()); err != nil {
- logger.Error(nil, "dbt deps run cmd.cmdDeps()
error")
- }
- }()
- if err = errors.Convert(cmdDeps.Start()); err != nil {
+ cmd := exec.Command("dbt", "deps")
+ err = errors.Convert(cmd.Start())
+ if err != nil {
return err
}
-
}
- //set default threads = 1, prevent dbt threads can not release, so
occur zombie process
+
dbtExecParams := []string{"dbt", "run", "--project-dir", projectPath}
if projectVars != nil {
jsonProjectVars, err := json.Marshal(projectVars)