You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by GitBox <gi...@apache.org> on 2022/11/02 07:21:04 UTC

[GitHub] [incubator-devlake] usharerose commented on a diff in pull request #3638: fix: skip --select argument if input is empty

usharerose commented on code in PR #3638:
URL: https://github.com/apache/incubator-devlake/pull/3638#discussion_r1011299692


##########
plugins/dbt/tasks/convertor.go:
##########
@@ -119,8 +119,10 @@ func DbtConverter(taskCtx core.SubTaskContext) errors.Error {
 		dbtExecParams = append(dbtExecParams, "--vars")
 		dbtExecParams = append(dbtExecParams, string(jsonProjectVars))
 	}
-	dbtExecParams = append(dbtExecParams, "--select")
-	dbtExecParams = append(dbtExecParams, models...)
+	if models != nil {

Review Comment:
   Hi, @mindlesscloud . Agree with your point that need to handle the status when the slice is empty. But it is also possible that `models` is null when not declaring `selectedModels` in `dbt` Options. So I guess the condition should be `models != nil && len(models) > 0`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org