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 2024/04/26 08:07:06 UTC
(incubator-devlake) branch kw-jira-issue-and-changlog-incr-mode updated (d05aba90b -> a38ba6342)
This is an automated email from the ASF dual-hosted git repository.
klesh pushed a change to branch kw-jira-issue-and-changlog-incr-mode
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
omit d05aba90b fix: e2e test
new a38ba6342 fix: e2e test
This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version. This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:
* -- * -- B -- O -- O -- O (d05aba90b)
\
N -- N -- N refs/heads/kw-jira-issue-and-changlog-incr-mode (a38ba6342)
You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.
Any revisions marked "omit" are not gone; other references still
refer to them. Any revisions marked "discard" are gone forever.
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.
Summary of changes:
backend/helpers/e2ehelper/data_flow_tester.go | 1 +
backend/impls/context/default_subtask_context.go | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
(incubator-devlake) 01/01: fix: e2e test
Posted by kl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
klesh pushed a commit to branch kw-jira-issue-and-changlog-incr-mode
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
commit a38ba63421983859713f78f35bd9a0a45a6432be
Author: Klesh Wong <zh...@merico.dev>
AuthorDate: Fri Apr 26 15:59:41 2024 +0800
fix: e2e test
---
backend/helpers/e2ehelper/data_flow_tester.go | 5 ++++-
backend/impls/context/default_subtask_context.go | 6 ++++--
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/backend/helpers/e2ehelper/data_flow_tester.go b/backend/helpers/e2ehelper/data_flow_tester.go
index 3df847f52..fd6c80a0a 100644
--- a/backend/helpers/e2ehelper/data_flow_tester.go
+++ b/backend/helpers/e2ehelper/data_flow_tester.go
@@ -37,6 +37,7 @@ import (
"github.com/apache/incubator-devlake/core/dal"
"github.com/apache/incubator-devlake/core/errors"
"github.com/apache/incubator-devlake/core/log"
+ "github.com/apache/incubator-devlake/core/models"
"github.com/apache/incubator-devlake/core/plugin"
"github.com/apache/incubator-devlake/core/runner"
"github.com/apache/incubator-devlake/core/utils"
@@ -116,6 +117,7 @@ func NewDataFlowTester(t *testing.T, pluginName string, pluginMeta plugin.Plugin
// grant all on lake_test.* to 'merico'@'%';
panic(err)
}
+ errors.Must(db.AutoMigrate(&models.SubtaskState{}))
df := &DataFlowTester{
Cfg: cfg,
Db: db,
@@ -215,6 +217,7 @@ func (t *DataFlowTester) FlushTabler(dst schema.Tabler) {
// Subtask executes specified subtasks
func (t *DataFlowTester) Subtask(subtaskMeta plugin.SubTaskMeta, taskData interface{}) {
+ t.FlushTabler(&models.SubtaskState{})
subtaskCtx := t.SubtaskContext(taskData)
err := subtaskMeta.EntryPoint(subtaskCtx)
if err != nil {
@@ -224,7 +227,7 @@ func (t *DataFlowTester) Subtask(subtaskMeta plugin.SubTaskMeta, taskData interf
// SubtaskContext creates a subtask context
func (t *DataFlowTester) SubtaskContext(taskData interface{}) plugin.SubTaskContext {
- return contextimpl.NewStandaloneSubTaskContext(context.Background(), runner.CreateBasicRes(t.Cfg, t.Log, t.Db), t.Name, taskData)
+ return contextimpl.NewStandaloneSubTaskContext(context.Background(), runner.CreateBasicRes(t.Cfg, t.Log, t.Db), t.Name, taskData, t.Name)
}
func filterColumn(column dal.ColumnMeta, opts TableOptions) bool {
diff --git a/backend/impls/context/default_subtask_context.go b/backend/impls/context/default_subtask_context.go
index 2ce5ad68f..972001352 100644
--- a/backend/impls/context/default_subtask_context.go
+++ b/backend/impls/context/default_subtask_context.go
@@ -19,9 +19,10 @@ package context
import (
gocontext "context"
+ "time"
+
"github.com/apache/incubator-devlake/core/context"
"github.com/apache/incubator-devlake/core/plugin"
- "time"
)
// DefaultSubTaskContext is default implementation
@@ -67,10 +68,11 @@ func NewStandaloneSubTaskContext(
basicRes context.BasicRes,
name string,
data interface{},
+ pluginName string,
) plugin.SubTaskContext {
return &DefaultSubTaskContext{
newDefaultExecContext(ctx, basicRes, name, data, nil),
- nil,
+ &DefaultTaskContext{defaultExecContext: newDefaultExecContext(ctx, basicRes, pluginName, data, nil)},
time.Time{},
}
}