Cleanup TODOs targeting v25 or earlier#20048
Conversation
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
There was a problem hiding this comment.
Pull request overview
This PR removes several long-expired TODOs and deprecation/compatibility shims that targeted Vitess v25 or earlier, simplifying the go/ codebase now that v25 is being built and older behaviors are no longer supported.
Changes:
- Removed deprecated/ignored flags and config fields (
--watch-replication-stream,--snapshot-topology-interval) and updated related configs/tests/docs. - Deleted VTOrc snapshot-topology functionality (logic path, DAO function/test, and associated SQLite schema entries).
- Removed outdated compatibility branches/debug helpers (grpctmclient shutdown heuristic, vreplication SimulatedNull non-slice checks, vtctl workflow pre-v21 Unimplemented handling, sidecardb debug helper) and made VTOrc
--cellrequired.
Reviewed changes
Copilot reviewed 38 out of 38 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| go/vt/vttablet/tabletserver/tabletenv/config.go | Removes deprecated --watch-replication-stream flag wiring and WatchReplication config field. |
| go/vt/vttablet/tabletmanager/rpc_vreplication.go | Removes legacy non-slice SimulatedNull handling and applies minor formatting-only callsite changes. |
| go/vt/vttablet/grpctmclient/client.go | Drops v23-era shutdown-heuristic compatibility branch in validateTablet(). |
| go/vt/vttablet/grpctmclient/client_test.go | Removes the test case that covered the deleted pre-v24 shutdown heuristic. |
| go/vt/vtorc/server/discovery.go | Makes empty --cell a hard error (FAILED_PRECONDITION). |
| go/vt/vtorc/logic/vtorc.go | Removes the deprecated snapshot-topology tick branch from continuous discovery. |
| go/vt/vtorc/inst/instance_dao.go | Deletes SnapshotTopologies() implementation. |
| go/vt/vtorc/inst/instance_dao_test.go | Removes the unit test for the deleted snapshot-topology feature. |
| go/vt/vtorc/db/generate_base.go | Removes the database_instance_topology_history table from the generated base schema. |
| go/vt/vtorc/config/config.go | Removes --snapshot-topology-interval config/flag plumbing and updates --cell help text. |
| go/vt/vtctl/workflow/server.go | Removes pre-v21 Unimplemented special-casing branch for vreplication permission validation. |
| go/vt/vtctl/workflow/server_test.go | Removes the corresponding “unimplemented error” test case and now-unused imports. |
| go/vt/sidecardb/sidecardb.go | Removes old printCallerDetails() debug helper and its call. |
| go/test/endtoend/vtorc/api/config_test.go | Removes e2e coverage for the deleted dynamic snapshot-topology-interval config. |
| go/test/endtoend/vtgate/foreignkey/stress/fk_stress_test.go | Removes deprecated --watch-replication-stream usage from e2e args. |
| go/test/endtoend/vault/vault_test.go | Removes deprecated --watch-replication-stream usage from e2e args. |
| go/test/endtoend/topoconncache/main_test.go | Removes deprecated --watch-replication-stream usage from e2e args. |
| go/test/endtoend/tabletmanager/throttler_topo/throttler_test.go | Removes deprecated --watch-replication-stream usage from e2e args. |
| go/test/endtoend/tabletmanager/tablegc/tablegc_test.go | Removes deprecated --watch-replication-stream usage from e2e args. |
| go/test/endtoend/tabletmanager/primary/tablet_test.go | Removes deprecated --watch-replication-stream usage from e2e args. |
| go/test/endtoend/tabletmanager/main_test.go | Removes deprecated --watch-replication-stream usage from e2e args. |
| go/test/endtoend/schemadiff/vrepl/schemadiff_vrepl_suite_test.go | Removes deprecated --watch-replication-stream usage from e2e args. |
| go/test/endtoend/recovery/unshardedrecovery/recovery.go | Removes deprecated --watch-replication-stream usage from e2e args. |
| go/test/endtoend/onlineddl/vrepl/onlineddl_vrepl_test.go | Removes deprecated --watch-replication-stream usage from e2e args. |
| go/test/endtoend/onlineddl/vrepl_suite/onlineddl_vrepl_suite_test.go | Removes deprecated --watch-replication-stream usage from e2e args. |
| go/test/endtoend/onlineddl/vrepl_stress/onlineddl_vrepl_mini_stress_test.go | Removes deprecated --watch-replication-stream usage from e2e args. |
| go/test/endtoend/onlineddl/vrepl_stress_suite/onlineddl_vrepl_stress_suite_test.go | Removes deprecated --watch-replication-stream usage from e2e args. |
| go/test/endtoend/onlineddl/scheduler/onlineddl_scheduler_test.go | Removes deprecated --watch-replication-stream usage from e2e args. |
| go/test/endtoend/onlineddl/revert/onlineddl_revert_test.go | Removes deprecated --watch-replication-stream usage from e2e args. |
| go/test/endtoend/onlineddl/flow/onlineddl_flow_test.go | Removes deprecated --watch-replication-stream usage from e2e args. |
| go/test/endtoend/cluster/vtorc_process.go | Removes snapshot-topology-interval from VTOrc e2e configuration struct. |
| go/test/endtoend/cellalias/cell_alias_test.go | Removes deprecated --watch-replication-stream usage from e2e args. |
| go/test/endtoend/backup/vtctlbackup/backup_utils.go | Removes deprecated --watch-replication-stream usage from e2e args. |
| go/test/endtoend/backup/vtbackup/main_test.go | Removes deprecated --watch-replication-stream usage from e2e args. |
| go/test/endtoend/backup/clone/main_test.go | Removes deprecated --watch-replication-stream usage from e2e args. |
| go/flags/endtoend/vtorc.txt | Removes the deleted --snapshot-topology-interval from the end-to-end flags list. |
| examples/common/vtorc/config.yaml | Removes snapshot-topology-interval from example VTOrc config. |
| config/tablet/default.yaml | Removes watchReplication from default tablet config. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #20048 +/- ##
==========================================
+ Coverage 69.67% 72.12% +2.45%
==========================================
Files 1614 1349 -265
Lines 216793 204776 -12017
==========================================
- Hits 151044 147696 -3348
+ Misses 65749 57080 -8669
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
mattlord
left a comment
There was a problem hiding this comment.
Now that the SimulatedNull guard is removed (which is done here in this PR), this path in go/vt/vttablet/tabletmanager/rpc_vreplication.go:608-610 treats any non-nil req.State as valid and maps it through VReplicationWorkflowState_name[int32(*req.State)]. Unknown enum values map to the empty string, so a malformed or stale client request can persist state = '' into _vt.vreplication. The bulk update path already checks the map ok result and returns INVALID_ARGUMENT; this path should do the same before building the stream update query. We can copy that existing handling:
state, ok := binlogdatapb.VReplicationWorkflowState_name[int32(req.GetState())]
if !ok {
return "", vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "invalid state value: %v", req.GetState())
}
Approving now, but please do that before merging. Thanks!
Address review feedback: check the ok result from VReplicationWorkflowState_name and return INVALID_ARGUMENT for unknown enum values, matching the existing pattern in buildUpdateVReplicationWorkflowsQuery. Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
VTOrc now hard-fails if --cell is empty (previously a warning). Add 'cell' to vitessOrchestrator.extraFlags in the operator examples and plumb --cell through the antithesis vtorc-up.sh script. Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
Description
Cleans up 10 x
TODO/deprecation items ingo/that target a Vitess version of v25 or earlier. We're now building v25, so old compat shims, debug helpers and deprecated flags are eligible for removalWhat was removed
grpctmclientv23 compat shim invalidateTablet()(simulated a missingTabletShutdownTimefield via aHostname/MysqlHostname/PortMap-nil heuristic) + the paired test case--watch-replication-streamflag and theWatchReplicationfield intabletenv/config.go. References cleaned up across 18 x e2e test files andconfig/tablet/default.yaml--snapshot-topology-intervalflag and the entire snapshot-topology feature in VTOrc — flag/getter, tick branch,SnapshotTopologies()and its test, thedatabase_instance_topology_historySQLite table, e2e config field + sub-test, plus references inexamples/common/vtorc/config.yamlandflags/endtoend/vtorc.txtVTOrc
--cellis now required —validateCell()previously logged a warning and continued; it now returns aFAILED_PRECONDITIONerror if--cellis empty5 x
SimulatedNullnon-slice checks inrpc_vreplication.go(OnDdl,State×2,Message,StopPosition). The comments target "v22+" so they're overduePre-v21
codes.Unimplementedbranch invalidateShardsHaveVReplicationPermissions()(go/vt/vtctl/workflow/server.go) + updated unit test, dropped now-unusedcodes/statusimportsprintCallerDetails()debug helper ingo/vt/sidecardb/sidecardb.go(was taggedremove in v17😅)The
go/vt/sidecardb/doc.gonote about removingIF NOT EXISTSfrom the 21 x sidecar schemaCREATE TABLEstatements is deferred — that's a real schema change with upgrade implications and deserves its own issue/PRRelated Issue(s)
Resolves: #20047
Checklist
Deployment Notes
3 x user-visible behaviour changes that need release-note callouts:
--watch-replication-streamremoved — startup will fail if still passed (the flag has been deprecated and ignored for a while)--snapshot-topology-intervalremoved and the snapshot-topology feature entirely deleted, including thedatabase_instance_topology_historySQLite table--cellis now required — previously a warning, now a hardFAILED_PRECONDITIONerror if missingAI Disclosure
This PR was written primarily by Claude Code — I provided direction on scope and reviewed. Claude also prepared this PR summary