Skip to content

Add CLI parameters for move-tables feature - #1702

Merged
danieljoos merged 4 commits into
feature-move-tablesfrom
move-tables/cli
Jun 10, 2026
Merged

Add CLI parameters for move-tables feature#1702
danieljoos merged 4 commits into
feature-move-tablesfrom
move-tables/cli

Conversation

@danieljoos

Copy link
Copy Markdown
Contributor

A Pull Request should be associated with an Issue.

We wish to have discussions in Issues. A single issue may be targeted by multiple PRs.
If you're offering a new feature or fixing anything, we'd like to know beforehand in Issues,
and potentially we'll be able to point development in a particular direction.

Related issue (public): #1681
Related issue (internal): https://github.com/github/database-infrastructure/issues/8167

Further notes in https://github.com/github/gh-ost/blob/master/.github/CONTRIBUTING.md
Thank you! We are open to PRs, but please understand if for technical reasons we are unable to accept each and any PR

Description

This PR is part of the move-tables feature.
It introduces CLI flags for enabling the move-tables mode and to specify the destination database.

In case this PR introduced Go code changes:

  • contributed code is using same conventions as original code
  • script/cibuild returns with no formatting errors, build errors or unit test errors.

Copilot AI review requested due to automatic review settings June 9, 2026 18:02
@danieljoos danieljoos added the feature-move-tables PRs that are associated with the new move-tables feature label Jun 9, 2026

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

Pull request overview

This PR introduces initial scaffolding for the “move-tables” feature by adding new CLI flags and a new migrator entrypoint intended to run a move-tables workflow.

Changes:

  • Add --move-tables and target connection flags (--target-host, --target-port, --target-user, --target-password, --target-database) to the CLI.
  • Add MigrationContext.MoveTables plus IsMoveTablesMode() to switch execution into the move-tables path.
  • Add a new Migrator.MoveTables() method and route execution to it when move-tables mode is enabled.
Show a summary per file
File Description
go/logic/migrator.go Adds a new MoveTables() workflow entrypoint (currently incomplete and missing required initialization/cutover).
go/cmd/gh-ost/main.go Adds CLI flags + validation and routes execution to MoveTables() when enabled.
go/base/context.go Adds move-tables configuration fields to MigrationContext and a helper to detect the mode.

Copilot's findings

Tip

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

  • Files reviewed: 3/3 changed files
  • Comments generated: 8

Comment thread go/cmd/gh-ost/main.go
Comment thread go/cmd/gh-ost/main.go
Comment thread go/cmd/gh-ost/main.go
Comment thread go/cmd/gh-ost/main.go
Comment thread go/logic/migrator.go
Comment thread go/logic/migrator.go
Comment thread go/logic/migrator.go
Comment thread go/logic/migrator.go
@danieljoos
danieljoos changed the base branch from move-tables-dev to feature-move-tables June 10, 2026 12:54
@danieljoos
danieljoos merged commit 84f1c61 into feature-move-tables Jun 10, 2026
9 of 10 checks passed
@danieljoos
danieljoos deleted the move-tables/cli branch June 11, 2026 13:13
ericyan pushed a commit that referenced this pull request Jul 31, 2026
Add move-table command parsing and validate the table-list input before initializing migration context.

Refs: #1702
ericyan pushed a commit that referenced this pull request Jul 31, 2026
Add move-table command parsing and validate the table list input.
Initialize migration context from the CLI configuration.

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

Labels

feature-move-tables PRs that are associated with the new move-tables feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants