Skip to content

Add migration command#310

Merged
xuanyu66 merged 21 commits into
mainfrom
v1beta1-dm
Dec 11, 2025
Merged

Add migration command#310
xuanyu66 merged 21 commits into
mainfrom
v1beta1-dm

Conversation

@xuanyu66

@xuanyu66 xuanyu66 commented Nov 26, 2025

Copy link
Copy Markdown
Collaborator

This pull request introduces a new "migration" command group to the Serverless CLI, enabling users to manage migration tasks for TiDB Cloud Serverless clusters. The changes include generating a new client for the migration Open API, and adding comprehensive command implementations for creating, describing, and deleting migration tasks。

@pingcap-cla-assistant

pingcap-cla-assistant Bot commented Nov 26, 2025

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@ti-chi-bot ti-chi-bot Bot added the size/XXL label Nov 26, 2025
@xuanyu66 xuanyu66 changed the title v1beta1 dm Add migration command Nov 28, 2025

Copilot AI 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.

Pull request overview

This pull request adds migration command functionality to the TiDB Cloud CLI, enabling users to manage database migrations for TiDB Cloud Serverless clusters. The PR includes generated OpenAPI client code, API integration, and user-facing CLI commands.

Key Changes

  • Generated OpenAPI client for the migration API (v7.12.0)
  • Integration of migration client into the existing API infrastructure
  • New CLI commands for managing migrations (create, list, describe, delete, pause, resume, template)
  • Migration task selection UI in the interactive logic layer

Reviewed changes

Copilot reviewed 59 out of 59 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tools/openapi-generator/openapitools.json Adds custom Maven repository URL for OpenAPI generator JAR download
pkg/tidbcloud/v1beta1/serverless/migration/* Complete OpenAPI-generated Go client for migration API endpoints and models
internal/service/cloud/api_client.go Integrates migration API client with existing API infrastructure
internal/service/cloud/logic.go Adds migration task selection logic for interactive CLI
internal/flag/flag.go Defines new flag constants for migration commands
internal/cli/serverless/migration/migration.go Root command structure for migration subcommands
internal/cli/serverless/migration/template.go Template generation command for migration configurations

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pkg/tidbcloud/v1beta1/serverless/migration/git_push.sh
Comment thread pkg/tidbcloud/v1beta1/serverless/migration/git_push.sh

Copilot AI 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.

Pull request overview

Copilot reviewed 60 out of 61 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread internal/cli/serverless/migration/template.go
Comment thread internal/cli/serverless/migration/template.go
Comment thread internal/cli/serverless/migration/create.go
Comment thread internal/cli/serverless/migration/create.go
Comment thread internal/cli/serverless/migration/create.go Outdated
Comment thread internal/cli/serverless/migration/create.go
Comment thread internal/cli/serverless/migration/create.go Outdated
Comment thread internal/cli/serverless/migration/create.go Outdated
Comment thread internal/cli/serverless/migration/create.go Outdated
Comment thread internal/cli/serverless/migration/create.go Outdated
Comment thread internal/cli/serverless/migration/list.go Outdated
Comment thread internal/cli/serverless/migration/list.go Outdated
Comment thread internal/service/cloud/api_client.go Outdated
Comment thread internal/service/cloud/api_client.go Outdated
Comment thread internal/service/cloud/api_client.go Outdated

Copilot AI 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.

Pull request overview

Copilot reviewed 60 out of 61 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread internal/cli/serverless/migration/list.go Outdated
@xuanyu66 xuanyu66 enabled auto-merge (squash) December 11, 2025 09:48
@xuanyu66 xuanyu66 merged commit 8c3a9f0 into main Dec 11, 2025
7 checks passed
@xuanyu66 xuanyu66 deleted the v1beta1-dm branch December 11, 2025 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants