[move tables] single table integration test support#1714
Conversation
6ebaafe to
fe7e22f
Compare
fe7e22f to
8413d45
Compare
There was a problem hiding this comment.
Pull request overview
This PR adds a dedicated local integration-test harness for --move-tables mode, including CI coverage via a new GitHub Actions workflow and a Docker-based dual-cluster (source/target) MySQL test environment.
Changes:
- Introduces a new
localtests/move-tables-test.shharness plus initial end-to-end move-tables test cases (single,single-concurrent-writes). - Adds
script/docker-gh-ost-move-tables-testsand updates move-tables helper scripts to support the dual-cluster setup and configurable database name. - Adds a new CI workflow to run move-tables tests across a MySQL/Percona version matrix, and excludes
move-tablesfrom the existinglocaltests/test.shrunner.
Show a summary per file
| File | Description |
|---|---|
script/move-tables/setup |
Aligns the setup DB name and seeds from the new move-tables test SQL. |
script/move-tables/insert-source-primary-loop |
Adds support for configurable DB selection for write-load generation. |
script/docker-gh-ost-move-tables-tests |
New Docker entrypoint to bring up/down a dual-cluster environment and run move-tables tests. |
localtests/test.sh |
Excludes move-tables from the legacy localtests runner. |
localtests/move-tables/single/tables.txt |
Declares tables involved in the “single” move-tables test. |
localtests/move-tables/single/create.sql |
Creates/seeds the “single” test table. |
localtests/move-tables/single-concurrent-writes/tables.txt |
Declares tables involved in the concurrent-writes test. |
localtests/move-tables/single-concurrent-writes/on_test.sh |
Starts background writes during the move-tables run. |
localtests/move-tables/single-concurrent-writes/create.sql |
Creates/seeds the concurrent-writes test table. |
localtests/move-tables-test.sh |
New move-tables test harness that runs against source/target clusters and validates results. |
.github/workflows/move-tables-tests.yml |
New CI workflow running move-tables tests in a containerized environment and uploading logs on failure. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 10/11 changed files
- Comments generated: 7
zacharysierakowski
left a comment
There was a problem hiding this comment.
still reviewing localtests/move-tables-test.sh closer, but just sending this off for now
There was a problem hiding this comment.
is this only running single right now? Quick pass I can't tell where single-concurrent-writes is called
There was a problem hiding this comment.
oh i see in the CI output that it's running it, so maybe i'm just missing how that's populated. Assuming it's reading the move-tables directory
There was a problem hiding this comment.
Yeah, test_all looks for all of the directories at the configured path
tests_path=$(dirname $0)/move-tables
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Part of https://github.com/github/database-infrastructure/issues/8260
A Pull Request should be associated with an Issue.
Related issue (internal): https://github.com/github/database-infrastructure/issues/8260
Related issue (public): #1681
Description
This PR introduces new tests into
localteststo test functionality in--move-tablesmode, building upon the existing harness but utilizing a separate 2 cluster setup necessary for e2e validation.Summary:
.github/workflows/move-tables-tests.yml- new workflow which invokes move tables tests in CIscript/docker-gh-ost-move-tables-tests- entrypoint for managing dual cluster setup and executing move-tables testslocaltests/move-tables-test.sh- harness for running one or more move-tables testssingle- migrate a single, pre-populated table with no DML eventssingle-concurrent-writes- migrate a single, pre-populated table with DMLs events running concurrent to write cutover.script/cibuildreturns with no formatting errors, build errors or unit test errors.Example
Try out these changes locally:
Footnotes
I'm planning more sophisticated tests to validate cutover state (e.g. crash safety), throttling, etc. in a separate PR. ↩