Skip to content

checker(dm): update MariaDB precheck instruction#12669

Open
GMHDBJD wants to merge 1 commit into
pingcap:masterfrom
GMHDBJD:fix-11734-mariadb-instruction-20260603220455
Open

checker(dm): update MariaDB precheck instruction#12669
GMHDBJD wants to merge 1 commit into
pingcap:masterfrom
GMHDBJD:fix-11734-mariadb-instruction-20260603220455

Conversation

@GMHDBJD

@GMHDBJD GMHDBJD commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Issue Number: close #11734

What is changed and how it works?

DM reports a warning for MariaDB upstreams because MariaDB migration is still experimental, but the precheck instruction still suggested upgrading MariaDB to 10.1.2 or later. That suggestion is obsolete and unhelpful for newer MariaDB versions such as 11.4.2.

This PR updates the MariaDB version precheck instruction to recommend verifying compatibility before migration, and adds a regression test for the MariaDB instruction so it no longer mentions 10.1.2.

Check List

Tests

  • Unit test
    • go test ./dm/pkg/checker ./dm/checker -count=1
  • Manual test (add detailed scripts or steps below)
    • make fmt
    • git diff --check

Questions

Will it cause performance regression or break compatibility?

No. This only changes the user-facing precheck instruction for MariaDB upstreams and adds a regression test.

Do you need to update user documentation, design documentation or monitoring documentation?

No.

Release note

Updated DM precheck to provide a helpful compatibility instruction when the upstream database is MariaDB.

@ti-chi-bot ti-chi-bot Bot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Jun 3, 2026
@ti-chi-bot

ti-chi-bot Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

[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 d3hunter 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 area/dm Issues or PRs related to DM. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jun 3, 2026

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

Copy link
Copy Markdown

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 updates the warning instruction for MariaDB migrations to advise verifying compatibility instead of recommending a specific version upgrade, and adds a corresponding unit test. The review feedback suggests simplifying the warning instruction to remove redundant phrasing about MariaDB migration being experimental, and updating the test assertion accordingly.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

if conn.IsMariaDB(value) {
err := NewWarn("Migrating from MariaDB is still experimental.")
err.Instruction = "It is recommended that you upgrade MariaDB to 10.1.2 or a later version."
err.Instruction = "It is recommended that you verify compatibility before performing data migration because migrating from MariaDB is still experimental. Otherwise data inconsistency or task exceptions might occur."

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 instruction string repeats "because migrating from MariaDB is still experimental", which is redundant since the warning message itself is already "Migrating from MariaDB is still experimental.". Removing this clause makes the instruction more concise and direct.

Suggested change
err.Instruction = "It is recommended that you verify compatibility before performing data migration because migrating from MariaDB is still experimental. Otherwise data inconsistency or task exceptions might occur."
err.Instruction = "It is recommended that you verify compatibility before performing data migration. Otherwise data inconsistency or task exceptions might occur."

Comment on lines +97 to +98
require.Equal(t, result.Instruction,
"It is recommended that you verify compatibility before performing data migration because migrating from MariaDB is still experimental. Otherwise data inconsistency or task exceptions might occur.")

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

Update the test assertion to match the simplified instruction string.

Suggested change
require.Equal(t, result.Instruction,
"It is recommended that you verify compatibility before performing data migration because migrating from MariaDB is still experimental. Otherwise data inconsistency or task exceptions might occur.")
require.Equal(t, result.Instruction,
"It is recommended that you verify compatibility before performing data migration. Otherwise data inconsistency or task exceptions might occur.")

@ti-chi-bot

ti-chi-bot Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

@GMHDBJD: 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 47a755c link true /test pull-dm-integration-test

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/dm Issues or PRs related to DM. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unhelpful instruction for MariaDB

1 participant