Skip to content

onlineddl: e2e test for REVERT VITESS_MIGRATION completing on both shards#20176

Open
shlomi-noach wants to merge 1 commit into
vitessio:mainfrom
planetscale:onlineddl-test-revert-multisharded
Open

onlineddl: e2e test for REVERT VITESS_MIGRATION completing on both shards#20176
shlomi-noach wants to merge 1 commit into
vitessio:mainfrom
planetscale:onlineddl-test-revert-multisharded

Conversation

@shlomi-noach
Copy link
Copy Markdown
Contributor

@shlomi-noach shlomi-noach commented May 24, 2026

This PR adds a test to a behavior we know is correct, and is true in general for all ApplySchema operation, but just making it very explicit now.

Adds a follow-up sub-test to TestVreplSchemaChanges (the only e2e suite that runs on a 2-shard cluster) covering the happy path for revert: a migration completes on both shards, a REVERT VITESS_MIGRATION is issued via vtctldclient, and the revert completes successfully on both shards.

The existing sibling test ("Revert a migration completed on one shard and cancelled on another") covers the failure case where revert is impossible on one shard. This PR adds the complementary success case.

Verification

  • WaitForMigrationStatus uses the full shards slice — the wait only returns when both shards reach terminal status
  • ReadMigrations asserts exactly 2 rows, both complete, with the shard name surfaced in any failure message

Adds a sub-test to TestVreplSchemaChanges that verifies a REVERT
VITESS_MIGRATION submitted via vtctldclient completes successfully on
both shards of the 2-shard cluster, exercising the keyspace-level
fanout path end-to-end.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 24, 2026 08:06
@github-actions github-actions Bot added this to the v25.0.0 milestone May 24, 2026
@vitess-bot vitess-bot Bot added NeedsWebsiteDocsUpdate What it says NeedsDescriptionUpdate The description is not clear or comprehensive enough, and needs work NeedsIssue A linked issue is missing for this Pull Request NeedsBackportReason If backport labels have been applied to a PR, a justification is required labels May 24, 2026
@vitess-bot
Copy link
Copy Markdown
Contributor

vitess-bot Bot commented May 24, 2026

Review Checklist

Hello reviewers! 👋 Please follow this checklist when reviewing this Pull Request.

General

  • Ensure that the Pull Request has a descriptive title.
  • Ensure there is a link to an issue (except for internal cleanup and flaky test fixes), new features should have an RFC that documents use cases and test cases.

Tests

  • Bug fixes should have at least one unit or end-to-end test, enhancement and new features should have a sufficient number of tests.

Documentation

  • Apply the release notes (needs details) label if users need to know about this change.
  • New features should be documented.
  • There should be some code comments as to why things are implemented the way they are.
  • There should be a comment at the top of each new or modified test to explain what the test does.

New flags

  • Is this flag really necessary?
  • Flag names must be clear and intuitive, use dashes (-), and have a clear help text.

If a workflow is added or modified:

  • Each item in Jobs should be named in order to mark it as required.
  • If the workflow needs to be marked as required, the maintainer team must be notified.

Backward compatibility

  • Protobuf changes should be wire-compatible.
  • Changes to _vt tables and RPCs need to be backward compatible.
  • RPC changes should be compatible with vitess-operator
  • If a flag is removed, then it should also be removed from vitess-operator and arewefastyet, if used there.
  • vtctl command output order should be stable and awk-able.

@github-actions github-actions Bot added the Component: Online DDL Online DDL (vitess/native/gh-ost/pt-osc) label May 24, 2026
@shlomi-noach shlomi-noach removed NeedsDescriptionUpdate The description is not clear or comprehensive enough, and needs work NeedsWebsiteDocsUpdate What it says NeedsIssue A linked issue is missing for this Pull Request NeedsBackportReason If backport labels have been applied to a PR, a justification is required labels May 24, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds an end-to-end “happy path” coverage to the existing 2-shard OnlineDDL VReplication e2e suite to ensure REVERT VITESS_MIGRATION completes successfully on both shards when the original migration completed on both shards.

Changes:

  • Add a new subtest that runs an OnlineDDL migration to completion on both shards.
  • Issue REVERT VITESS_MIGRATION via vtctldclient ApplySchema and wait for completion across both shards.
  • Assert SHOW VITESS_MIGRATIONS returns exactly two rows (one per shard) and both are complete for the revert UUID.

@shlomi-noach shlomi-noach marked this pull request as ready for review May 24, 2026 08:36
@shlomi-noach shlomi-noach requested review from a team and mattlord May 24, 2026 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component: Online DDL Online DDL (vitess/native/gh-ost/pt-osc) Type: Testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants