Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[Bug][e2e] Several plugin e2e tests fail on a fresh database because they depend on tables created by other tests

オープン
#9,223 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 3 日以内に返信

@chenwei791129 がすでに取り組んでいます。

2026年10月14日 から。

  • #9224 @chenwei791129 による — オープン

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
go, mysql
領域
testing

調査の方向性

Start with e2ehelper.DataFlowTester and the failing TestCalculateCLTimeDataFlow in plugins/dora/e2e/, then check scripts/e2e-test-go-plugins.sh to see the shared-database order. Reproduce on an empty database with go test -count=1 ./plugins/<plugin>/e2e/..., and make each test create the tables its subtasks read or write. Done means every listed package and test passes alone on a fresh database.

索引モデルが issue の本文から書いたものです。

説明

Search before asking
  • I had searched in the issues and found no similar issues.
What happened

Several Go plugin e2e tests fail when they run on a fresh, empty database, for example when you run one plugin's e2e package or one test on its own:

--- FAIL: TestCalculateCLTimeDataFlow
panic: failed to batch fetch first reviews (500)
	Wraps: (3) Error 1146 (42S02): Table 'lake_test.accounts' doesn't exist

e2ehelper.DataFlowTester runs no migrations. A test only has the tables it flushes or imports. Some tests run subtasks that read or write other tables, for example a converter that deletes old board_issues rows, or a query that joins accounts. Those tables exist in CI only because an earlier test created them: scripts/e2e-test-go-plugins.sh runs every plugin's e2e package in go list order on one shared database.

Packages that fail on their own (fresh database per package):

Package Missing table Test
dora/e2e accounts TestCalculateCLTimeDataFlow (the first review query joins accounts since #9000)
customize/e2e board_issues TestImportIssueChangelogDataFlow, TestImportIssueCommitDataFlow
gitlab/e2e issue_labels TestGitlabIssueDataFlow
opsgenie/e2e board_issues TestIncidentDataFlow
pagerduty/e2e board_issues TestIncidentDataFlow
teambition/e2e board_sprints TestTeambitionSprints

Tests that fail with go test -run <Test> (fresh database per test), because an earlier test in the same package created the tables:

  • customize: TestImportIssueWorklogDataFlow
  • gitlab: TestGitlabMrDataFlow, TestGitlabMrDetailDataFlow, TestGitlabMrNoteDataFlow
  • teambition: TestTeambitionTask
  • bitbucket: TestCommentDataFlow
  • github: TestMilestoneDataFlow, TestPrReviewDataFlow
  • jira: TestEpicDataflow, TestIssueRelationshipDataFlow, TestIssueSubtaskWithoutMapping
  • linear: TestLinearIssueHistoryDataFlow
  • tapd: TestTapdBugCustomizeDueDate, TestTapdStoryCustomizeDueDate, TestTapdTaskCustomizeDueDate

Some of these tests also read data that an earlier test left behind, not only the table:

  • The bitbucket issue comment converter joins _tool_bitbucket_issues, which account_test.go fills.
  • The tapd due date tests use the statuses and workitem types that the test before them imports.

Also, the DORA fixture has no bot account, so nothing in the e2e tests covers the bot exclusion added in #9000.

What do you expect to happen

Each e2e package and each e2e test passes on a fresh database. A test sets up every table its subtasks use and does not depend on the order tests run in.

How to reproduce
  1. Create an empty MySQL database.
  2. From backend/:
export E2E_DB_URL='mysql://merico:[email protected]:3306/lake_test?charset=utf8mb4&parseTime=True&loc=UTC'
TZ=UTC go test -count=1 ./plugins/dora/e2e/...

The other packages fail the same way. For the per-test failures, run e.g. go test -count=1 -run '^TestCommentDataFlow$' ./plugins/bitbucket/e2e/ on an empty database.

Anything else

CI passes today only because of the order the tests run in. It would break if the e2e tests ran in parallel or on a database per package.

Version

main (4ad2f66df)

Are you willing to submit PR?
  • Yes I am willing to submit a PR!
Code of Conduct
主要言語
Go
スター
3.2k
フォーク
819
平均マージ
2日 21時間
マージ済み PR(30日)
46

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apache/devlake のほかの issue

apache/devlake の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。