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 2022/06/29 03:22:58 UTC
[incubator-devlake] branch main updated: fix: steps total nums is wrong (#2369)
This is an automated email from the ASF dual-hosted git repository.
klesh 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 1b71be00 fix: steps total nums is wrong (#2369)
1b71be00 is described below
commit 1b71be0044a13176ce69f658c74d2c2a0f1c120a
Author: abeizn <10...@users.noreply.github.com>
AuthorDate: Wed Jun 29 11:22:54 2022 +0800
fix: steps total nums is wrong (#2369)
* fix: steps total nums is wrong
* fix: steps total nums is wrong
---
plugins/gitlab/tasks/mr_label_convertor.go | 2 +-
plugins/helper/api_collector.go | 7 ++++++-
runner/run_task.go | 3 ++-
3 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/plugins/gitlab/tasks/mr_label_convertor.go b/plugins/gitlab/tasks/mr_label_convertor.go
index 46614cbd..a9498679 100644
--- a/plugins/gitlab/tasks/mr_label_convertor.go
+++ b/plugins/gitlab/tasks/mr_label_convertor.go
@@ -29,7 +29,7 @@ import (
)
var ConvertMrLabelsMeta = core.SubTaskMeta{
- Name: "convertIssueLabels",
+ Name: "convertMrLabels",
EntryPoint: ConvertMrLabels,
EnabledByDefault: true,
Description: "Convert tool layer table gitlab_mr_labels into domain layer table pull_request_labels",
diff --git a/plugins/helper/api_collector.go b/plugins/helper/api_collector.go
index 1fe0a64b..ec2dd522 100644
--- a/plugins/helper/api_collector.go
+++ b/plugins/helper/api_collector.go
@@ -166,7 +166,12 @@ func (collector *ApiCollector) Execute() error {
}
logger.Debug("wait for all async api to finished")
err = collector.args.ApiClient.WaitAsync()
- logger.Info("end api collection error: %w", err)
+ if err != nil {
+ logger.Info("end api collection error: %w", err)
+ } else {
+ logger.Info("end api collection without error")
+ }
+
return err
}
diff --git a/runner/run_task.go b/runner/run_task.go
index a2739bd8..2717703f 100644
--- a/runner/run_task.go
+++ b/runner/run_task.go
@@ -164,7 +164,6 @@ func RunPluginSubTasks(
progress chan core.RunningProgress,
) error {
logger.Info("start plugin")
-
// find out all possible subtasks this plugin can offer
subtaskMetas := pluginTask.SubTaskMetas()
subtasksFlag := make(map[string]bool)
@@ -202,12 +201,14 @@ func RunPluginSubTasks(
}
}
}
+
// make sure `Required` subtasks are always enabled
for _, subtaskMeta := range subtaskMetas {
if subtaskMeta.Required {
subtasksFlag[subtaskMeta.Name] = true
}
}
+
// calculate total step(number of task to run)
steps := 0
for _, enabled := range subtasksFlag {