Require --keep-data and --keep-routing-rules for move-tables complete and cancel#1260
Merged
Conversation
mscoutermarsh
approved these changes
May 31, 2026
… and cancel Make the --keep-data and --keep-routing-rules flags required for both move-tables complete and cancel commands. This ensures users explicitly specify whether to keep or delete data and routing rules, preventing accidental data loss. Users must now provide both flags with explicit values: - --keep-data (defaults to true if no value given) - --keep-data=true (explicit true) - --keep-data=false (explicit false) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> Signed-off-by: Max Englander <max@planetscale.com>
e907a90 to
38b7f33
Compare
nickvanw
approved these changes
May 31, 2026
…movetables-args Signed-off-by: Max Englander <max@planetscale.com>
…rules flag The test was failing in CI because it only provided --keep-data but not --keep-routing-rules, which is now a required flag. Updated the test to: - Pass --keep-routing-rules=false in the command args - Verify KeepRoutingRules is set correctly in the request Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> Signed-off-by: Max Englander <max@planetscale.com>
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> Signed-off-by: Max Englander <max@planetscale.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
Vitess
MoveTablesworkflowcompleteandcancelhave--keep-dataand--keep-routing-rulesargs, both of which default tofalse. This means that the default behavior of Vitess is to delete source data and the routing rules created by the workflow uponcomplete, and to delete target data and routing rules uponcancel.Whether or not you think these defaults are good or bad, it is hopefully beyond debate that if a user is unaware of the defaults, they are potentially in for a very nasty surprise. PlanetScale's position internally is that
--keep-data=trueis a safer default, and therefore we've inverted the default behavior of PlanetScale Vitess. As of now, we have not documented this anywhere, and as a result some early users ofpscale branch vtctldhave been thrown for a loop.After going back and forth internally about what the best defaults are, we decided that the best option for now is to simply not have defaults, and require users to explicitly specify the behavior they want.
Changes
Make the
--keep-dataand--keep-routing-rulesflags required for bothmove-tablescompleteandcancelcommands. This ensures users explicitly specify whether to keep or delete data and routing rules.Users must now provide both flags with explicit values, one of the following:
--keep-data(defaults to true if no value given)--keep-data=true(explicit true)--keep-data=false(explicit false)