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 04:44:50 UTC

[GitHub] [incubator-devlake] usharerose commented on a diff in pull request #3645: feat: redirect dbt error log to pipeline error

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


##########
plugins/dbt/tasks/convertor.go:
##########
@@ -132,9 +134,13 @@ func DbtConverter(taskCtx core.SubTaskContext) errors.Error {
 		return err
 	}
 	scanner := bufio.NewScanner(stdout)
+	var errStr string
 	for scanner.Scan() {
 		line := scanner.Text()
 		log.Info(line)
+		if strings.Contains(line, "ERROR") || errStr != "" {

Review Comment:
   @long2ice seems `Contains` isn't case-sensitive, and the error log of dbt would start with the following format,
   
   ```
   [error] [MainThread] xxx
   ```
   
   what about `strings.Contains(strings.ToLower(line), "error")`?



-- 
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