Skip to content

CI: Add basic integration test#12577

Merged
ti-chi-bot[bot] merged 7 commits into
pingcap:masterfrom
dveeden:ci_tests
Apr 29, 2026
Merged

CI: Add basic integration test#12577
ti-chi-bot[bot] merged 7 commits into
pingcap:masterfrom
dveeden:ci_tests

Conversation

@dveeden
Copy link
Copy Markdown
Contributor

@dveeden dveeden commented Mar 27, 2026

What problem does this PR solve?

Issue Number: close #12614

What is changed and how it works?

Check List

Tests

  • Integration test

Questions

Will it cause performance regression or break compatibility?
Do you need to update user documentation, design documentation or monitoring documentation?

Release note

None

@ti-chi-bot ti-chi-bot Bot added do-not-merge/needs-linked-issue release-note-none Denotes a PR that doesn't merit a release note. area/dm Issues or PRs related to DM. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 27, 2026
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new basic integration test for Data Migration (DM), including SQL setup scripts, source/task configurations, and expected results. The feedback suggests using single quotes for SQL string literals to follow standards and replacing the deprecated block-allow-list configuration with the modern filters syntax in the task YAML.

Comment thread dm/tests/integration_basic/setup.sql Outdated
Comment on lines +9 to +11
INSERT INTO t1 VALUES (1, "test 1");
INSERT INTO t1 VALUES (2, "test 2"), (3, "test 3");
UPDATE t1 SET name="test 2 updated" WHERE id=2;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For consistency and adherence to SQL standards, it's better to use single quotes for string literals instead of double quotes.

INSERT INTO t1 VALUES (1, 'test 1');
INSERT INTO t1 VALUES (2, 'test 2'), (3, 'test 3');
UPDATE t1 SET name='test 2 updated' WHERE id=2;

Comment thread dm/tests/integration_basic/task.yaml Outdated
Comment on lines +12 to +16
block-allow-list: "test"

block-allow-list:
test:
do-dbs: ["test*"]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The block-allow-list configuration is deprecated. For new tests, please use the current filters syntax for better maintainability and to align with current best practices.

    filter-rules: ["test"]

filters:
  test:
    schema-pattern: "test*"

@dveeden dveeden force-pushed the ci_tests branch 10 times, most recently from 916dd1a to 507fdaa Compare March 27, 2026 12:49
@ti-chi-bot ti-chi-bot Bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 27, 2026
@ti-chi-bot ti-chi-bot Bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Mar 27, 2026
@dveeden dveeden marked this pull request as draft March 27, 2026 12:52
@ti-chi-bot ti-chi-bot Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 27, 2026
@dveeden dveeden marked this pull request as ready for review March 27, 2026 13:20
@ti-chi-bot ti-chi-bot Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 27, 2026
@dveeden dveeden force-pushed the ci_tests branch 6 times, most recently from 9ef81ba to 6fe00a2 Compare March 27, 2026 14:02
@dveeden
Copy link
Copy Markdown
Contributor Author

dveeden commented Apr 19, 2026

/retest

3 similar comments
@dveeden
Copy link
Copy Markdown
Contributor Author

dveeden commented Apr 20, 2026

/retest

@dveeden
Copy link
Copy Markdown
Contributor Author

dveeden commented Apr 20, 2026

/retest

@dveeden
Copy link
Copy Markdown
Contributor Author

dveeden commented Apr 20, 2026

/retest

Comment thread .github/workflows/dm_integration_basic.yaml
Comment thread .github/workflows/dm_integration_basic.yaml
Comment thread dm/tests/integration_basic/t/basic.test Outdated
./bin/dmctl query-status mysql-to-tidb
- name: install mysql-tester
run: |
go install github.com/pingcap/mysql-tester/src@latest
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we pin mysql-tester instead of installing @latest at runtime? Otherwise an unrelated upstream mysql-tester change can break this workflow without any TiFlow change. We can do manual updates if needed.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I'll do that. However as there are no releases nor tags for mysql-tester this is a bit more painful than it should.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, thanks. I think my main concern was just avoiding @latest; pinning to a commit SHA is totally fine as well. It looks like the MariaDB job is pinned now, while the MySQL job is still floating. Non-blocking from my side.

@dveeden
Copy link
Copy Markdown
Contributor Author

dveeden commented Apr 21, 2026

/retest

2 similar comments
@dveeden
Copy link
Copy Markdown
Contributor Author

dveeden commented Apr 21, 2026

/retest

@dveeden
Copy link
Copy Markdown
Contributor Author

dveeden commented Apr 28, 2026

/retest

@wuhuizuo
Copy link
Copy Markdown
Contributor

/cc gmhdbjd D3Hunter

@ti-chi-bot ti-chi-bot Bot requested review from D3Hunter and GMHDBJD April 28, 2026 07:27
Comment on lines +7 to +8
- 'dm/**'
- 'cmd/dm*/*'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe it should be triggered when go.mod file is changed.

./bin/dmctl query-status mariadb-to-tidb
- name: install mysql-tester
run: |
go install github.com/pingcap/mysql-tester/src@f2d90ea9522d30c9a8e8d70cc31c7f016ca2801f
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we manager the version in go.mod file?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we could do this by using the tool functionality, see also: https://go.dev/doc/go1.24#tools

Do you think this is better?

diff --git a/go.mod b/go.mod
index aceb438e4..bba975342 100644
--- a/go.mod
+++ b/go.mod
@@ -180,6 +180,7 @@ require (
        github.com/cncf/xds/go v0.0.0-20251022180443-0feb69152e9f // indirect
        github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce // indirect
        github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
+       github.com/defined2014/mysql v0.0.0-20231121061906-fcfacaa39f49 // indirect
        github.com/envoyproxy/go-control-plane/envoy v1.35.0 // indirect
        github.com/envoyproxy/protoc-gen-validate v1.2.1 // indirect
        github.com/felixge/httpsnoop v1.0.4 // indirect
@@ -216,13 +217,14 @@ require (
        github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90 // indirect
        github.com/perimeterx/marshmallow v1.1.5 // indirect
        github.com/pingcap/metering_sdk v0.0.0-20251110022152-dac449ac5389 // indirect
+       github.com/pingcap/mysql-tester v0.0.0-20260121034350-f2d90ea9522d // indirect
        github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect
        github.com/qri-io/jsonpointer v0.1.1 // indirect
        github.com/qri-io/jsonschema v0.2.1 // indirect
        github.com/robfig/cron/v3 v3.0.1 // indirect
        github.com/segmentio/asm v1.2.0 // indirect
        github.com/segmentio/fasthash v1.0.3 // indirect
-       github.com/sergi/go-diff v1.3.1 // indirect
+       github.com/sergi/go-diff v1.4.0 // indirect
        github.com/spf13/afero v1.15.0 // indirect
        github.com/spiffe/go-spiffe/v2 v2.6.0 // indirect
        github.com/tidwall/btree v1.7.0 // indirect
@@ -462,3 +464,5 @@ replace golang.org/x/text => golang.org/x/text v0.28.0
 
 // tls10server=1
 godebug tlsrsakex=1
+
+tool github.com/pingcap/mysql-tester/src

And then:

cd dm/tests/integration_basic
go tool github.com/pingcap/mysql-tester/src

Copy link
Copy Markdown
Contributor

@OliverS929 OliverS929 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than these two small issues, the rest looks good to me.

pull_request:
paths:
- 'dm/**'
- 'cmd/dm*/*'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we widen the pull_request.paths filter a bit? Changes in shared DM-related code or files like pkg/**, go.mod, go.sum, or this workflow itself can still affect make dm, but this workflow would not run for them.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought dm only used dm/pkg/ and not pkg/, but that's not the case. Maybe at some point the two pkg directories should be merged...

I've update the paths.

./bin/dmctl query-status mysql-to-tidb
- name: install mysql-tester
run: |
go install github.com/pingcap/mysql-tester/src@latest
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, thanks. I think my main concern was just avoiding @latest; pinning to a commit SHA is totally fine as well. It looks like the MariaDB job is pinned now, while the MySQL job is still floating. Non-blocking from my side.

@ti-chi-bot ti-chi-bot Bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Apr 28, 2026
@dveeden
Copy link
Copy Markdown
Contributor Author

dveeden commented Apr 28, 2026

/retest

1 similar comment
@dveeden
Copy link
Copy Markdown
Contributor Author

dveeden commented Apr 28, 2026

/retest

@ti-chi-bot
Copy link
Copy Markdown
Contributor

ti-chi-bot Bot commented Apr 28, 2026

@dveeden: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-dm-integration-test-next-gen 53d6577 link false /test pull-dm-integration-test-next-gen

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@ti-chi-bot
Copy link
Copy Markdown
Contributor

ti-chi-bot Bot commented Apr 29, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: GMHDBJD, OliverS929

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot Bot added lgtm approved and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Apr 29, 2026
@ti-chi-bot
Copy link
Copy Markdown
Contributor

ti-chi-bot Bot commented Apr 29, 2026

[LGTM Timeline notifier]

Timeline:

  • 2026-04-28 07:52:22.73977498 +0000 UTC m=+2670747.945135037: ☑️ agreed by OliverS929.
  • 2026-04-29 04:04:34.320209095 +0000 UTC m=+2743479.525569142: ☑️ agreed by GMHDBJD.

@ti-chi-bot ti-chi-bot Bot merged commit 825344b into pingcap:master Apr 29, 2026
34 of 35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved area/dm Issues or PRs related to DM. lgtm release-note-none Denotes a PR that doesn't merit a release note. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DM: Extend testing for the latest LTS releases of MySQL and MariaDB

4 participants