One plan, one approval
All selected clusters and components are frozen into one manifest and authorized together.
One immutable upgrade plan, one approval request, and ordered Apply Groups across one or many clusters. TiFlash, PD and BR use one managed multi-component ConfigurationChange per group. TiCDC is out of scope for the first version.
The first version deliberately favors predictable orchestration over a generic workflow engine.
All selected clusters and components are frozen into one manifest and authorized together.
The server owns one fixed component order. A partial selection keeps only the relative order.
Each step uses one ConfigurationChange with a null approval_id. A step may contain one component or an SOP-defined atomic component group.
No Premium-specific resource lock table. Existing unfinished-change validation remains authoritative.
Child ConfigurationChanges are created just in time after approval, so a pending plan does not occupy every target locator.
The order and atomic groups follow the first table in the 2510 → 2603 Premium upgrade SOP.
The plan approval is the only authorization boundary. Child changes are implementation records, not new requests.
Frozen manifest presented to approvers
| Cluster ID | Actual target | Components | Version |
|---|---|---|---|
| clu-001, clu-002 | SHARED_POOL / pool-17 | TiProxy · separate Change | v8.1.2 |
| clu-001, clu-002 | SHARED_POOL / pool-17 | DM · separate Change | v8.1.2 |
| clu-001, clu-002 | SHARED_POOL / pool-17 | Resource Manager · separate Change | v8.1.2 |
| clu-001, clu-002 | SHARED_POOL / pool-17 | Schema Manager · separate Change | v8.1.2 |
| clu-001 | LOGICAL_CLUSTER / clu-001 | TiDB · separate Change | v8.1.2 |
| clu-001 | LOGICAL_CLUSTER / clu-001 | TiProxy · separate Change | v8.1.2 |
| clu-001 | LOGICAL_CLUSTER / clu-001 | Dumpling · separate Change | v8.1.2 |
premium_upgrade_plans.approval_id is the sole approval controlling execution.wait_for_apply and skips SendApproval.premium_upgrade_step_id links the child Change through Step to Target and Plan. Its approval_id stays null.Three orchestration tables plus additive linkage fields on the existing ConfigurationChange table.
Approval, immutable request snapshot, plan state and aggregate progress.
One normalized actual CloudConfig locator, with source cluster IDs for user-facing aggregation.
One atomic Apply Group on one actual locator.
Add nullable unique premium_upgrade_step_id and a failed finished phase. Failure details remain only on the Upgrade Step, which already links to Target and Plan.
Legacy single-component Steps are backfilled as one-member Apply Groups before the old component columns and index are removed. Existing plans keep their original sequence and are never merged during migration.
premium_upgrade_step_dependencies and premium_upgrade_resource_locks. Relative order is derived from server code, and conflicts reuse ConfigurationChange validation.A user selects logical cluster IDs, but some components physically belong to a shared resource pool.
clu-001 + clu-002Both clusters use shared pool pool-17.SHARED_POOL / pool-17 onceLOGICAL_CLUSTER / clu-001LOGICAL_CLUSTER / clu-002Shared-pool steps are deduplicated by actual locator.The orchestrator reconciles durable state; a process restart must not lose progress or create a second Change.
| State | Meaning | Next action |
|---|---|---|
| pending | Waiting for plan approval or an earlier sequence. | Do nothing until eligible. |
| preparing | CAS claim acquired; state and conflicts are being checked. | Create or recover the managed Change. |
| waiting_conflict | An unfinished Change exists, or BR found an active Restore/PITR (including status lookup failure). | Retry with bounded backoff. |
| applying | The managed Change is running through its existing applier. | Poll existing CheckResult behavior. |
| succeeded | The component reached the requested version. | Contribute to sequence completion. |
| failed | The step hit a hard error or fixed apply deadline; its managed Change is closed as failed. | Release the locator, skip later affected steps, and continue unrelated targets. |
| skipped / cancelled | Execution stopped by upstream failure or user cancellation. | No automatic rollback. |
These endpoints are design proposals, not claims about currently available backend APIs.
| Method | Endpoint | Purpose |
|---|---|---|
| GET | /api/v1/devops/clusters?tenant_id=...&deploy_type=DEPLOY_TYPE_NEXTGEN | Reuse the existing paginated endpoint for exact tenant-ID discovery; exact cluster-ID lookup is also supported. |
| GET | /api/v1/devops/premiumUpgradePlans/componentPolicies | Return the backend-owned cluster type, component, priority, apply strategy and order revision used by the component picker. |
| POST | /api/v1/devops/premiumUpgradePlans/preview | Resolve tenant-scoped cluster IDs, actual locators, selected/all components, versions and fixed order. Selected components use cluster_type + component to disambiguate shared and logical targets. |
| POST | /api/v1/devops/premiumUpgradePlans | Revalidate preview, persist the immutable plan and asynchronously create one approval request. |
| GET | /api/v1/devops/premiumUpgradePlans/{plan_id} | Return approval, target, step and child Change progress. |
| POST | /api/v1/devops/premiumUpgradePlans/{plan_id}/cancel | Stop scheduling new Steps and request cancellation of safe in-flight work. |
| POST | /api/v1/devops/premiumUpgradePlans/{plan_id}/steps/{step_id}/retry | Retry only a failed Step that has not created a managed Change; it never creates another approval. |
The current Approval Service has no business idempotency key. A dispatcher CAS prevents concurrent sends; an uncertain response moves the Plan to reconcile-required instead of silently creating another approval.
The existing “check unfinished Change, then insert” flow is not atomic. V1 reuses it as agreed; a future generic CloudConfig locator reservation should solve the race for every caller, rather than adding a Premium-only lock table.
The fixed order must be versioned, covered by unit tests and confirmed by component owners. Plans persist the resolved sequence so a deployment cannot reorder an approved plan.
Preview and approval must expose the actual shared-pool target and every affected source cluster before submission.
One approval does not imply one distributed transaction. The final plan state must distinguish completed, partially succeeded, failed and cancelled outcomes.