Add --reject-stale to branch routing-rules get - #1443
Closed
cursor[bot] wants to merge 2 commits into
Closed
cursor[bot] wants to merge 2 commits into
cursor[bot] wants to merge 2 commits into
Conversation
pscale branch routing-rules get reads a schema snapshot that can lag live cluster state after SwitchTraffic, and update replaces the entire routing map. Document that, warn that --keep-routing-rules=true can block a later MoveTables complete, and point operators at pscale branch vtctld get-routing-rules for live rules. Co-authored-by: max <max@planetscale.com>
Co-authored-by: max <max@planetscale.com>
cursor
Bot
force-pushed
the
routing-rules-reject-stale
branch
from
September 24, 2026 22:53
dbed9e0 to
ac1dd97
Compare
Contributor
|
Superseded by #1444, which surfaces the write-side block instead of adding a --reject-stale read flag. |
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.
Problem:
pscale branch routing-rules getreads the branch schema snapshot, which can lag live cluster state after SwitchTraffic. Applying that snapshot withrouting-rules updateis a full replacement and can revert live routes.Solution:
Add
--reject-staleon get, which sendsreject_stale=trueto the API. Map therouting_rules_snapshot_staleAPI code to anaction_requiredJSON error.routing-rules updatefails with that same code when the snapshot is stale; next steps are to wait for a new snapshot or read live rules withpscale branch vtctld get-routing-rules.Requires the matching API change.
Security impact:
None.
Testing:
go test ./internal/cmd/branch/... ./internal/cmdutil/...