Skip to content

tiflow: add MariaDB source and next-gen TiDB CI for DM integration test#4485

Draft
joechenrh wants to merge 3 commits intoPingCAP-QE:mainfrom
joechenrh:dm-mariadb2tidb-it
Draft

tiflow: add MariaDB source and next-gen TiDB CI for DM integration test#4485
joechenrh wants to merge 3 commits intoPingCAP-QE:mainfrom
joechenrh:dm-mariadb2tidb-it

Conversation

@joechenrh
Copy link
Copy Markdown
Contributor

@joechenrh joechenrh commented Apr 8, 2026

Summary

  • Add a dedicated MariaDB container to the latest TiFlow DM integration pod
  • Wait for the MariaDB service before running DM integration groups
  • Export MariaDB env vars for the new dm/tests/mariadb2tidb case
  • Add DM integration test and compatibility test CI jobs targeting next-gen TiDB
  • Next-gen jobs download TiDB/PD/TiKV binaries from OCI registry (hub-zot.pingcap.net/mirrors/tidbx) with master-next-gen / dedicated-next-gen tags
  • Next-gen jobs are set as optional: true initially, triggered via /test dm-next-gen

Files changed (classic DM CI)

File Change
pipelines/.../pod-pull_dm_integration_test.yaml Add mariadb1 container
pipelines/.../pull_dm_integration_test.groovy Wait for MariaDB, export env vars

Files added (next-gen DM CI)

File Purpose
prow-jobs/.../latest-presubmits-next-gen.yaml Prow trigger definitions
jobs/.../pull_dm_integration_test_next_gen.groovy Job DSL for integration test
jobs/.../pull_dm_compatibility_test_next_gen.groovy Job DSL for compatibility test
pipelines/.../pull_dm_integration_test_next_gen.groovy Integration test pipeline (OCI download + MariaDB)
pipelines/.../pull_dm_compatibility_test_next_gen.groovy Compatibility test pipeline (OCI download)
pipelines/.../pod-pull_dm_integration_test_next_gen.yaml Pod template (utils + MariaDB containers)
pipelines/.../pod-pull_dm_compatibility_test_next_gen.yaml Pod template (utils container)

Note

  • Keep this PR as draft until the corresponding TiFlow DM change is merged
  • This change is intended to support the new MariaDB compatibility integration case in TiFlow DM

Test plan

  • Trigger /test pull-dm-integration-test on a tiflow PR to validate MariaDB changes
  • Trigger /test pull-dm-integration-test-next-gen on a tiflow PR to validate next-gen pipeline
  • Trigger /test pull-dm-compatibility-test-next-gen on a tiflow PR to validate next-gen pipeline
  • Verify next-gen TiDB binaries are downloaded correctly
  • Verify DM test groups pass with next-gen TiDB downstream

@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot bot commented Apr 8, 2026

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

Copy link
Copy Markdown
Contributor

@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 adds a new MariaDB container to the DM integration test pipeline, including the necessary configuration for the container in the YAML file and the corresponding environment variables and readiness checks in the Groovy pipeline script. I recommend explicitly defining resource requests for the new container to ensure consistent resource allocation and optimal thread utilization in the CI environment.

Comment on lines +85 to +88
resources:
limits:
memory: 4Gi
cpu: "2"
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.

medium

The mariadb1 container specifies resource limits but lacks requests. In Kubernetes, requests default to limits if omitted. Explicit requests should be defined so that resource-dependent parameters, like thread counts, can be aligned with the requested CPU cores to maximize resource utilization.

References
  1. In CI job configurations, favor simplicity by hardcoding resource-dependent parameters like thread counts. A value aligned with the resource request is often sufficient and preferable to a complex, dynamic configuration tied to the resource limit.
  2. To maximize resource utilization in CI jobs, the number of test threads should match the number of requested CPU cores.

joechenrh and others added 2 commits April 9, 2026 18:13
Add integration test and compatibility test CI jobs that run DM tests
against next-gen TiDB binaries downloaded from OCI registry instead of
the classic fileserver. Jobs are optional and can be triggered via
`/test dm-next-gen` or `/test pull-dm-integration-test-next-gen`.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add mariadb1 container and env vars to the next-gen DM integration test
pipeline, consistent with the classic DM CI changes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot bot commented Apr 9, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign wuhuizuo for approval. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

The full list of commands accepted by this bot can be found 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 size/XXL and removed size/S labels Apr 9, 2026
@joechenrh joechenrh changed the title tiflow: add MariaDB source for DM integration test tiflow: add MariaDB source and next-gen TiDB CI for DM integration test Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant