Skip to content

Remove NextGen version handling code from mysql package#4

Merged
kyleconroy merged 1 commit intomainfrom
claude/investigate-go-semver-iq7Ds
Apr 26, 2026
Merged

Remove NextGen version handling code from mysql package#4
kyleconroy merged 1 commit intomainfrom
claude/investigate-go-semver-iq7Ds

Conversation

@kyleconroy
Copy link
Copy Markdown
Contributor

Summary

This PR removes NextGen-specific version handling functionality from the mysql package, including version conversion utilities and related constants. The code being removed was used to convert TiDB release versions into NextGen-specific formats.

Key Changes

  • Removed NormalizeTiDBReleaseVersionForNextGen() function that converted legacy placeholders to NextGen placeholders
  • Removed BuildTiDBXReleaseVersion() function that converted semantic versions to NextGen format (CLOUD.<year-month>.<fix>)
  • Removed BuildTiDBXServerVersion() function that built MySQL-compatible server version strings with NextGen format
  • Removed NextGen-related constants:
    • tidbXReleaseVersionPrefix ("CLOUD.")
    • tidbXPlaceholderReleaseVersion (v26.3.0 placeholder)
    • TiDBXVerMinYear and TiDBXVerMaxYear (year validation bounds)
  • Inlined legacyTiDBReleaseVersionPlaceholder constant value directly into TiDBReleaseVersion initialization
  • Removed corresponding unit tests for the deleted functions
  • Removed github.com/coreos/go-semver dependency from go.mod

Implementation Details

The TiDBReleaseVersion variable now uses the literal placeholder value "v8.4.0-this-is-a-placeholder" instead of referencing a named constant, simplifying the initialization while maintaining the same behavior for the legacy version format.

https://claude.ai/code/session_011eUiTSJanyruVRnV5b7fJw

NormalizeTiDBReleaseVersionForNextGen, BuildTiDBXReleaseVersion, and
BuildTiDBXServerVersion were carried over from the upstream TiDB parser
but are TiDB-server release-packaging concerns rather than parsing
concerns. Inside this repository they were only referenced by their own
tests, so drop the helpers, the tests, and their supporting constants.

The legacyTiDBReleaseVersionPlaceholder constant doubled as the initial
value of the externally visible TiDBReleaseVersion variable, so inline
the placeholder string there.

This drops the github.com/coreos/go-semver dependency, which was used
solely by BuildTiDBXReleaseVersion.

https://claude.ai/code/session_011eUiTSJanyruVRnV5b7fJw
@kyleconroy kyleconroy force-pushed the claude/investigate-go-semver-iq7Ds branch from 3f46349 to 1dc757d Compare April 26, 2026 21:03
@kyleconroy kyleconroy merged commit 76eec20 into main Apr 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants