Support TiDB smooth upgrade in v2#6933
Conversation
Add TiDB smooth-upgrade orchestration to the v2 TiDBGroup controller. Switch-controlled TiDB version upgrades now call /upgrade/start before mutating TiDB instances, persist controller-owned pause annotations, recover stale annotation state with idempotent finish, and call /upgrade/finish after the group is fully updated and ready. Extend the v2 TiDB API client with start/finish methods and document the design in an RFC.\n\nTested: go test ./pkg/tidbapi/v1 ./pkg/controllers/tidb ./pkg/controllers/tidb/tasks ./pkg/controllers/tidbgroup ./pkg/controllers/tidbgroup/tasks -count=1\nTested: go test ./pkg/controllers/... -count=1\nTested: git diff --check
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #6933 +/- ##
==========================================
+ Coverage 39.30% 39.64% +0.34%
==========================================
Files 430 431 +1
Lines 24310 24550 +240
==========================================
+ Hits 9554 9733 +179
- Misses 14756 14817 +61
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
What is changed
This PR adds TiDB smooth-upgrade orchestration to tidb-operator v2:
Notes
The behavior follows the v1 smooth-upgrade support from #6904, adapted to the v2 TiDBGroup/TiDB instance reconciliation model.
Tests
PASS go test ./pkg/tidbapi/v1 ./pkg/controllers/tidb ./pkg/controllers/tidb/tasks ./pkg/controllers/tidbgroup ./pkg/controllers/tidbgroup/tasks -count=1
PASS go test ./pkg/controllers/... -count=1
PASS git diff --check