You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: Perform end-of-maintenance (EOM) cleanup for a TiDB LTS version (X.Y) — remove version labels, drop branch protection rules, and update blocker configs across prow configs.
4
+
---
5
+
6
+
# TiDB Version End-of-Maintenance (EOM) Cleanup
7
+
8
+
Use this skill when a TiDB LTS version reaches end-of-maintenance (EOM). Replace `X.Y` with the actual version number (e.g., `7.1`). Note: this is EOM, not EOL — the version is no longer under maintenance support but the code is not deleted.
### 1a. Remove `X.Y` from `ti-community-issue-triage``maintain_versions`
24
+
25
+
```yaml
26
+
# Before:
27
+
maintain_versions: ["X.Y", "7.5", "8.1", "8.5"]
28
+
# After:
29
+
maintain_versions: ["7.5", "8.1", "8.5"]
30
+
```
31
+
32
+
### 1b. Remove version labels from `ti-community-label` `additional_labels`
33
+
34
+
Search for and remove these labels from ALL `additional_labels` lists under `ti-community-label`:
35
+
36
+
- `needs-cherry-pick-release-X.Y`
37
+
- `affects-X.Y`
38
+
- `may-affects-X.Y`
39
+
40
+
These are quoted or unquoted depending on the list. Remove each occurrence line, leaving any `# - affects-{{.ver}}` comments in place. Expect ~18 occurrences across ~8 repo groups.
41
+
42
+
Also remove `type/cherry-pick-for-release-X.Y` from the global `cherryPickerExcludeLabels` and `cherryPickerExcludeLabelsWithoutLgtm` lists.
43
+
44
+
### 1c. Add `X.Y` to `ti-community-label-blocker`
45
+
46
+
Add a blocking rule at the top of `block_labels` for the `pingcap`/`tikv`/`pingcap-inc`/`PingCAP-QE` orgs group:
47
+
48
+
```yaml
49
+
- regex: ^(may-)?affects-X\.Y$
50
+
actions:
51
+
- labeled
52
+
- unlabeled
53
+
trusted_users:
54
+
- ti-chi-bot
55
+
- ti-chi-bot[bot]
56
+
message: "You cannot manually add or delete the affects/may-affects version labels, only I and the trusted members have permission to do so."
57
+
```
58
+
59
+
## Step 2: `labels.yaml`
60
+
61
+
Remove these label definitions from the default labels section:
Remove all `release-X.Y` and older branches from the **branch-protection** section only (do NOT touch the `tide:` section).
77
+
78
+
### Branches to remove
79
+
80
+
All `release-M.N` where `M.N <= X.Y` in TiDB version numbering. Keep:
81
+
- `release-1.x`, `release-2.x` for tidb-operator/tispark (different product versioning)
82
+
- Anything above `X.Y`
83
+
84
+
### CRITICAL: YAML Anchor Handling
85
+
86
+
Many branch entries use YAML anchors. When a branch being removed defines an anchor (`&name`), you MUST relocate that anchor to the next-highest branch that remains.
87
+
88
+
**Step 3a. Simple refs (no anchor)** — just remove the line:
89
+
```yaml
90
+
# Remove:
91
+
release-X.Y: *some-anchor
92
+
```
93
+
94
+
**Step 3b. Anchor definitions with inline blocks** — remove the block AND move the anchor:
95
+
```yaml
96
+
# Before (remove release-X.Y with inline block):
97
+
release-X.Y: &anchor-name
98
+
protect: true
99
+
required_status_checks:
100
+
contexts:
101
+
- "tide"
102
+
strict: false
103
+
restrictions: *branch-protection_restrictions
104
+
release-X.Z: *anchor-name # next branch
105
+
# After (move anchor to next branch, keep inline block):
106
+
release-X.Z: &anchor-name
107
+
protect: true
108
+
required_status_checks:
109
+
contexts:
110
+
- "tide"
111
+
strict: false
112
+
restrictions: *branch-protection_restrictions
113
+
```
114
+
115
+
**Step 3c. After all edits, verify no null anchors exist.** Every `&anchor-name` must have `protect: true` (or similar non-null content) immediately below it. A bare `release-X.Y: &anchor-name` with no following block means all `*anchor-name` references get `null` protection.
116
+
117
+
### Repos to check
118
+
119
+
Common repos with release branches: tikv/client-c, tikv/copr-test, tikv/pd, tikv/tikv, pingcap/monitoring, pingcap/tidb, pingcap/tiflow, pingcap/tidb-binlog, pingcap/tiflash, pingcap-inc/enterprise-extensions, pingcap-inc/enterprise-plugin, pingcap-inc/tiflash-scripts.
120
+
121
+
### Exceptions
122
+
123
+
- `pingcap/docs` and `pingcap/docs-cn`: docs team maintains these independently. Do NOT modify.
124
+
- `tidb-operator`and `tispark` branches use different version schemes — do NOT touch.
125
+
126
+
## Gotchas
127
+
128
+
- The edit tool's fuzzy matching can reformat multi-line YAML strings from single-line `description: text` to multi-line `description:\n text`. This is semantically equivalent but makes diffs noisy. Be prepared for this.
129
+
- Always run `update-labels.sh` after editing `labels.yaml` to keep `labels.md` in sync.
130
+
- After branch-protection edits, verify: no null anchors, all `release-7.2`/`7.3`/`7.4` are present if they existed before, and no release ≤ X.Y branches remain (except docs).
0 commit comments