Skip to content

test: pin upgrade start version in TestUpgradeVersion284EnableTxnFile - #70692

Merged
ti-chi-bot[bot] merged 3 commits into
pingcap:masterfrom
pingyu:fix-upgrade-284-nextgen
Aug 27, 2026
Merged

test: pin upgrade start version in TestUpgradeVersion284EnableTxnFile#70692
ti-chi-bot[bot] merged 3 commits into
pingcap:masterfrom
pingyu:fix-upgrade-284-nextgen

Conversation

@pingyu

@pingyu pingyu commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Issue Number: close #70691

Problem Summary:

TestUpgradeVersion284EnableTxnFile derived its upgrade start version from session.CurrentBootstrapVersion - 1. Any PR that bumps the bootstrap version (e.g. #70599, version284 -> version285) makes the upgrade under test start at 284, so upgradeToVer284 never runs and all 5 subtests fail in pull_unit_test_next_gen (see issue #70691 for the full CI log and per-subtest failures).

Also, upgradeToVer284 no-ops on the classic kernel, so the test's interesting assertions only apply to the next-gen kernel.

What changed and how does it work?

  • Pin the upgrade start version to 283 (= version284 - 1) so the ver284 migration step under test always executes, regardless of later bootstrap version bumps. Later upgrade steps (285+) still run afterwards and do not touch the txn-file variables.
  • Restrict the test to the next-gen kernel (kerneltype.IsClassic() -> t.Skip), matching the kernel-conditional behavior of upgradeToVer284 itself.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

Summary by CodeRabbit

  • Tests
    • Expanded upgrade test coverage to run on both classic and next-generation kernels.
    • Standardized the test’s upgrade-from version to 283.

pingyu added 2 commits August 27, 2026 09:24
Signed-off-by: Ping Yu <yuping@pingcap.com>
The test derived its upgrade start version from
session.CurrentBootstrapVersion - 1, so any PR that bumps the
bootstrap version (e.g. pingcap#70599, version284 -> version285) makes the
upgrade start at 284 and upgradeToVer284 never runs, failing all 5
subtests in pull_unit_test_next_gen (issue pingcap#70691).

Pin the start version to 283 (= version284 - 1) so the ver284 step
under test always executes regardless of later bootstrap version bumps.

Issue link: pingcap#70691

Signed-off-by: Ping Yu <yuping@pingcap.com>
@ti-chi-bot ti-chi-bot Bot added release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Aug 27, 2026
@coderabbitai

coderabbitai Bot commented Aug 27, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 8c63a02c-721f-4965-ba31-482e203d8fb2

📥 Commits

Reviewing files that changed from the base of the PR and between 198e4f2 and ce2f577.

📒 Files selected for processing (1)
  • pkg/session/test/bootstraptest/bootstrap_upgrade_test.go
💤 Files with no reviewable changes (1)
  • pkg/session/test/bootstraptest/bootstrap_upgrade_test.go

Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

The bootstrap upgrade test now runs on classic and next-gen kernels. It starts from version 283 so it always exercises the version 284 upgrade path, even when the current bootstrap version advances.

Changes

Bootstrap upgrade test

Layer / File(s) Summary
Pin version 284 upgrade coverage
pkg/session/test/bootstraptest/bootstrap_upgrade_test.go
The test removes the classic-kernel skip and sets upgradeFromVersion to 283 instead of deriving it from the current bootstrap version.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to ce2f5

This is a localized test-only change that pins the upgrade start version and limits the test to the applicable kernel; no actionable merge-blocking risk remains after normal checks and review.

Poem

A rabbit checks version two-eight-three
The upgrade path runs consistently
Classic and next-gen join the trail
Version 284 will not fail
Stable test steps hop happily

🚥 Pre-merge checks | ✅ 2 | ❌ 3

❌ Failed checks (3 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The hardcoded upgrade start version of 283 addresses issue #70691 and ensures upgradeToVer284 executes. However, the diff removes the classic-kernel skip, while issue #70691 requires this test to run … Restore the kerneltype.IsClassic() skip guard, or update issue #70691 and the test assertions to explicitly support classic-kernel execution.
Out of Scope Changes check ⚠️ Warning Pinning the upgrade start version is in scope for issue #70691. Removing the classic-kernel skip is an additional change that contradicts the stated objective and the issue requirement that the test r… Remove the classic-kernel behavior change by restoring the kerneltype.IsClassic() skip guard, unless separate requirements justify and document classic-kernel coverage.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the primary change: pinning the upgrade start version in TestUpgradeVersion284EnableTxnFile.
Description check ✅ Passed The description includes the required issue reference, problem summary, implementation details, test checklist, side effects, documentation, and release note sections. However, it states that the test…
Full details: Description check

Explanation

The description includes the required issue reference, problem summary, implementation details, test checklist, side effects, documentation, and release note sections. However, it states that the test remains restricted to the next-generation kernel, which conflicts with the summarized diff that removes the classic-kernel skip.

Full details: Linked Issues check

Explanation

The hardcoded upgrade start version of 283 addresses issue #70691 and ensures upgradeToVer284 executes. However, the diff removes the classic-kernel skip, while issue #70691 requires this test to run only on the next-generation kernel because upgradeToVer284 is a no-op on the classic kernel.

Full details: Out of Scope Changes check

Explanation

Pinning the upgrade start version is in scope for issue #70691. Removing the classic-kernel skip is an additional change that contradicts the stated objective and the issue requirement that the test run only on the next-generation kernel.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Aug 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.2732%. Comparing base (fbb43f6) to head (ce2f577).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #70692        +/-   ##
================================================
- Coverage   76.3185%   73.2732%   -3.0453%     
================================================
  Files          2041       2085        +44     
  Lines        557554     585428     +27874     
================================================
+ Hits         425517     428962      +3445     
- Misses       131137     155828     +24691     
+ Partials        900        638       -262     
Flag Coverage Δ
integration 40.7720% <ø> (+1.1033%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 58.6514% <ø> (ø)
parser ∅ <ø> (∅)
br 46.6167% <ø> (-16.0923%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@windtalker windtalker left a comment

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.

lgtm

@ti-chi-bot ti-chi-bot Bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Aug 27, 2026

@bb7133 bb7133 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@ti-chi-bot ti-chi-bot Bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Aug 27, 2026
@ti-chi-bot

ti-chi-bot Bot commented Aug 27, 2026

Copy link
Copy Markdown

[LGTM Timeline notifier]

Timeline:

  • 2026-08-27 02:33:52.67699163 +0000 UTC m=+728267.848085751: ☑️ agreed by windtalker.
  • 2026-08-27 02:44:36.534880434 +0000 UTC m=+728911.705974548: ☑️ agreed by bb7133.

@pingyu

pingyu commented Aug 27, 2026

Copy link
Copy Markdown
Contributor Author

/retest

Signed-off-by: Ping Yu <yuping@pingcap.com>

@bb7133 bb7133 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@ti-chi-bot

ti-chi-bot Bot commented Aug 27, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bb7133, windtalker

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 merged commit 9db7eb8 into pingcap:master Aug 27, 2026
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved lgtm release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci: TestUpgradeVersion284EnableTxnFile fails when currentBootstrapVersion is bumped to 285 (next-gen kernel only)

3 participants