Skip to content

Commit d8b341a

Browse files
celialaclaude
andcommitted
clusterversion: mint 25.4
This change finalizes the cluster version for the 25.4 release by adding the final V25_4 version key with Internal=0 and setting it as the finalVersion constant. This marks the end of version gate additions for the 25.4 release series. Changes: - Add V25_4 version key (25.4.0) as the final version for this release - Set finalVersion = V25_4 to freeze the version table - Update SystemDatabaseSchemaBootstrapVersion to V25_4 (from V25_4_AddSystemStatementHintsTable) - Regenerate bootstrap test data and hash values - Update logic test expectations for systemDatabaseSchemaVersion This is done before cutting rc.1, ensuring no additional version gates can be added. All clusters running 25.4.x patch releases will use this single cluster version. Epic: None Release note: None Release justification: release-process change. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 60b2f03 commit d8b341a

File tree

10 files changed

+142
-24
lines changed

10 files changed

+142
-24
lines changed

docs/generated/settings/settings-for-tenants.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,4 +421,4 @@ trace.zipkin.collector string the address of a Zipkin instance to receive trace
421421
ui.database_locality_metadata.enabled boolean true if enabled shows extended locality data about databases and tables in DB Console which can be expensive to compute application
422422
ui.default_timezone string the default timezone used to format timestamps in the ui application
423423
ui.display_timezone enumeration etc/utc the timezone used to format timestamps in the ui. This setting is deprecatedand will be removed in a future version. Use the 'ui.default_timezone' setting instead. 'ui.default_timezone' takes precedence over this setting. [etc/utc = 0, america/new_york = 1] application
424-
version version 25.3-upgrading-to-25.4-step-014 set the active cluster version in the format '<major>.<minor>' application
424+
version version 25.4 set the active cluster version in the format '<major>.<minor>' application

docs/generated/settings/settings.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,6 @@
380380
<tr><td><div id="setting-ui-database-locality-metadata-enabled" class="anchored"><code>ui.database_locality_metadata.enabled</code></div></td><td>boolean</td><td><code>true</code></td><td>if enabled shows extended locality data about databases and tables in DB Console which can be expensive to compute</td><td>Basic/Standard/Advanced/Self-Hosted</td></tr>
381381
<tr><td><div id="setting-ui-default-timezone" class="anchored"><code>ui.default_timezone</code></div></td><td>string</td><td><code></code></td><td>the default timezone used to format timestamps in the ui</td><td>Basic/Standard/Advanced/Self-Hosted</td></tr>
382382
<tr><td><div id="setting-ui-display-timezone" class="anchored"><code>ui.display_timezone</code></div></td><td>enumeration</td><td><code>etc/utc</code></td><td>the timezone used to format timestamps in the ui. This setting is deprecatedand will be removed in a future version. Use the &#39;ui.default_timezone&#39; setting instead. &#39;ui.default_timezone&#39; takes precedence over this setting. [etc/utc = 0, america/new_york = 1]</td><td>Basic/Standard/Advanced/Self-Hosted</td></tr>
383-
<tr><td><div id="setting-version" class="anchored"><code>version</code></div></td><td>version</td><td><code>25.3-upgrading-to-25.4-step-014</code></td><td>set the active cluster version in the format &#39;&lt;major&gt;.&lt;minor&gt;&#39;</td><td>Basic/Standard/Advanced/Self-Hosted</td></tr>
383+
<tr><td><div id="setting-version" class="anchored"><code>version</code></div></td><td>version</td><td><code>25.4</code></td><td>set the active cluster version in the format &#39;&lt;major&gt;.&lt;minor&gt;&#39;</td><td>Basic/Standard/Advanced/Self-Hosted</td></tr>
384384
</tbody>
385385
</table>

pkg/clusterversion/CLAUDE.md

Lines changed: 118 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,4 +97,121 @@ After making all changes:
9797
- Hash values in bootstrap test data are expected to change when the development branch flag is modified
9898
- The logic test updates are necessary to reflect the new major version in system database schema version metadata
9999
- CLI declarative rules tests use short version format (e.g., `25.3`) not the long format (e.g., `1000025.3`)
100-
- Always run the CLI tests after updating declarative rules files to ensure correct version format
100+
- Always run the CLI tests after updating declarative rules files to ensure correct version format
101+
102+
---
103+
104+
## R.2: Mint Release (Creating Final Version)
105+
106+
This change finalizes the cluster version for the release. It should be done when you are absolutely sure that no additional version gates are needed - right before cutting the first RC (typically rc.1).
107+
108+
**Important timing note:** The minting happens before the final v25.X.0 release. It's typically done when preparing rc.1, which is shipped before the final release.
109+
110+
### Critical Step: Update SystemDatabaseSchemaBootstrapVersion
111+
112+
**IMPORTANT:** This is the most commonly missed step and will cause test failures if forgotten.
113+
114+
**File:** `pkg/sql/catalog/systemschema/system.go` (line ~1445)
115+
116+
**Change:** Update from the last internal version to the final minted version:
117+
118+
```go
119+
// Before (last internal version - e.g., V25_4_AddSystemStatementHintsTable)
120+
var SystemDatabaseSchemaBootstrapVersion = clusterversion.V25_4_AddSystemStatementHintsTable.Version()
121+
122+
// After (final minted version - e.g., V25_4)
123+
var SystemDatabaseSchemaBootstrapVersion = clusterversion.V25_4.Version()
124+
```
125+
126+
### Full Checklist
127+
128+
1. **Update cockroach_versions.go:**
129+
- Add the final version key (e.g., `V25_4`) with `Internal: 0`
130+
- Set `finalVersion` constant to this key (e.g., `const finalVersion Key = V25_4`)
131+
132+
2. **Update SystemDatabaseSchemaBootstrapVersion** (see above - critical!)
133+
134+
3. **Update version.txt:**
135+
```bash
136+
# Update pkg/build/version.txt to RC version (e.g., v25.4.0-rc.1)
137+
# Note: Minting happens before the final release, typically when cutting rc.1
138+
```
139+
140+
4. **Regenerate documentation:**
141+
```bash
142+
./dev gen docs
143+
```
144+
145+
5. **Regenerate bootstrap test data:**
146+
```bash
147+
./dev test pkg/sql/catalog/systemschema_test --rewrite
148+
```
149+
This updates:
150+
- `pkg/sql/catalog/systemschema_test/testdata/bootstrap_system`
151+
- `pkg/sql/catalog/systemschema_test/testdata/bootstrap_tenant`
152+
153+
6. **Update bootstrap hash test data:**
154+
155+
Run the test to see what values need updating:
156+
```bash
157+
./dev test pkg/sql/catalog/bootstrap -f TestInitialValuesToString
158+
```
159+
160+
The test will fail showing the expected hash values. Update in `pkg/sql/catalog/bootstrap/testdata/testdata`:
161+
- Line 1: `system hash=<new_hash_from_test_output>`
162+
- Line ~228: `tenant hash=<new_hash_from_test_output>`
163+
- Update the binary data on the line following each hash (the `{"key":"8b89898a89","value":"..."}` entry)
164+
165+
7. **Update logic test data:**
166+
167+
After updating `SystemDatabaseSchemaBootstrapVersion`, you need to update the expected test output:
168+
169+
- File: `pkg/sql/logictest/testdata/logic_test/crdb_internal_catalog`
170+
- Change: Update the `systemDatabaseSchemaVersion` in the test data to match the new minted version
171+
172+
**Before (with internal version):**
173+
```
174+
1 {"database": {"id": 1, "name": "system", ... "systemDatabaseSchemaVersion": {"internal": 14, "majorVal": 25, "minorVal": 3}, ...}}
175+
```
176+
177+
**After (final minted version):**
178+
```
179+
1 {"database": {"id": 1, "name": "system", ... "systemDatabaseSchemaVersion": {"majorVal": 25, "minorVal": 4}, ...}}
180+
```
181+
182+
Note: The `internal` field should be removed when minting the final version.
183+
184+
8. **Verify all tests pass:**
185+
```bash
186+
./dev test pkg/sql/catalog/bootstrap -f TestInitialValuesToString
187+
./dev test pkg/sql/catalog/systemschema_test
188+
./dev test pkg/sql/logictest -f crdb_internal_catalog
189+
```
190+
191+
### Common Errors and Solutions
192+
193+
**Error: "Unexpected hash value for system"**
194+
- **Cause:** Forgot to update `SystemDatabaseSchemaBootstrapVersion` in step 2
195+
- **Fix:** Complete step 2, then re-run steps 5-7
196+
197+
**Error: "output didn't match expected" with binary data diff**
198+
- **Cause:** The binary-encoded system database descriptor needs updating
199+
- **Fix:** Copy the exact binary value from the test output diff (shown after the `+` sign) and paste it into the testdata file
200+
201+
### Expected Files Modified
202+
203+
A typical R.2 mint should modify:
204+
1. `pkg/clusterversion/cockroach_versions.go` (add final version, set finalVersion)
205+
2. `pkg/sql/catalog/systemschema/system.go` (update SystemDatabaseSchemaBootstrapVersion)
206+
3. `pkg/build/version.txt` (update to final version)
207+
4. `docs/generated/settings/settings-for-tenants.txt`
208+
5. `docs/generated/settings/settings.html`
209+
6. `pkg/sql/catalog/systemschema_test/testdata/bootstrap_system`
210+
7. `pkg/sql/catalog/systemschema_test/testdata/bootstrap_tenant`
211+
8. `pkg/sql/catalog/bootstrap/testdata/testdata` (hashes and binary data)
212+
9. `pkg/sql/logictest/testdata/logic_test/crdb_internal_catalog` (update systemDatabaseSchemaVersion)
213+
214+
### Example PRs
215+
216+
- For reference: [#112347](https://github.com/cockroachdb/cockroach/pull/112347)
217+
- 25.3 mint: [#150211](https://github.com/cockroachdb/cockroach/pull/150211)

pkg/clusterversion/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ code for more details.
9797

9898
**When**: When we are ready to select the first beta candidate.
9999

100+
**Claude Prompt**: "Please create a PR to prepare the release-25.4 branch for beta.1 following the R.1 checklist in pkg/clusterversion/README.md and the detailed runbook in pkg/clusterversion/CLAUDE.md"
101+
100102
**Checklist**:
101103
- [ ] Set `developmentBranch` constant to `false`
102104
- [ ] Update `version.txt` to the beta version, e.g. `24.1.0-beta.1`
@@ -112,6 +114,8 @@ code for more details.
112114
**When**: When we are absolutely sure that we no longer need additional version
113115
gates - right before the final RC at the latest.
114116

117+
**Claude Prompt**: "Please create a PR to mint the 25.4 release following the R.2 checklist in pkg/clusterversion/README.md and the detailed runbook in pkg/clusterversion/CLAUDE.md. We're preparing rc.1."
118+
115119
**Checklist**:
116120
- [ ] Replace temporary constant for current release (e.g. `V24_1`) with a
117121
cluster version key, associated with a "final" (`Internal=0`) version (e.g.

pkg/clusterversion/cockroach_versions.go

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,9 @@ const (
232232
// associated with a query without modifying the query or application itself.
233233
V25_4_AddSystemStatementHintsTable
234234

235+
// V25_4 is CockroachDB v25.4. It's used for all v25.4.x patch releases.
236+
V25_4
237+
235238
// *************************************************
236239
// Step (1) Add new versions above this comment.
237240
// Do not add new versions to a patch release.
@@ -295,6 +298,8 @@ var versionTable = [numKeys]roachpb.Version{
295298

296299
V25_4_AddSystemStatementHintsTable: {Major: 25, Minor: 3, Internal: 14},
297300

301+
V25_4: {Major: 25, Minor: 4, Internal: 0},
302+
298303
// *************************************************
299304
// Step (2): Add new versions above this comment.
300305
// Do not add new versions to a patch release.
@@ -312,14 +317,6 @@ const MinSupported Key = V25_2
312317
// have at least an RC build published).
313318
const PreviousRelease Key = V25_3
314319

315-
// V25_4 is a placeholder that will eventually be replaced by the actual 25.4
316-
// version Key, but in the meantime it points to the latest Key. The placeholder
317-
// is defined so that it can be referenced in code that simply wants to check if
318-
// a cluster is running 25.4 and has completed all associated migrations; most
319-
// version gates can use this instead of defining their own version key if they
320-
// only need to check that the cluster has upgraded to 25.4.
321-
const V25_4 = Latest
322-
323320
// DevelopmentBranch must be true on the main development branch but should be
324321
// set to false on a release branch once the set of versions becomes append-only
325322
// and associated upgrade implementations are frozen.
@@ -337,7 +334,7 @@ const DevelopmentBranch = false
337334
// version key, e.g. to V23_2 on the release-23.2 branch once it is minted.
338335
// Setting it has the effect of ensuring no versions are subsequently added (see
339336
// TestFinalVersion).
340-
const finalVersion Key = -1
337+
const finalVersion Key = V25_4
341338

342339
// TestingExtraVersions may be set to true by packages of tests which will
343340
// intentionally use Keys greater than Latest, which otherwise would crash

pkg/sql/catalog/bootstrap/testdata/testdata

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
system hash=fed4e568760c015b3cc9a6bc58492e3239c0bdd6962fb87e9113cf13e5689e38
1+
system hash=5e65df499c108ed856a729b404c3dc5b92ab9812183543a614c6107bed2f1dcd
22
----
33
[{"key":"8b"}
4-
,{"key":"8b89898a89","value":"0312450a0673797374656d10011a250a0d0a0561646d696e1080101880100a0c0a04726f6f7410801018801012046e6f646518032200280140004a006a08081910031800200e7000"}
4+
,{"key":"8b89898a89","value":"0312450a0673797374656d10011a250a0d0a0561646d696e1080101880100a0c0a04726f6f7410801018801012046e6f646518032200280140004a006a0808191004180020007000"}
55
,{"key":"8b898b8a89","value":"030aaa030a0a64657363726970746f721803200128013a0042290a02696410011a0e0801104018002a003003501460002000300068007000780080010088010098010042310a0a64657363726970746f7210021a0e0808100018002a0030005011600020013000680070007800800100880100980100480352770a077072696d61727910011801220269642a0a64657363726970746f72300140004a10080010001a00200028003000380040005a0070027a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e00100e9010000000000000000f20100f8010060026a210a0b0a0561646d696e102018200a0a0a04726f6f741020182012046e6f64651803800101880103980100b201130a077072696d61727910001a02696420012800b201240a1066616d5f325f64657363726970746f7210021a0a64657363726970746f7220022802b80103c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300d00300d80300e00300f80300880400980400a00400a80400b00400"}
66
,{"key":"8b898c8a89","value":"030a92070a0575736572731804200128013a00422f0a08757365726e616d6510011a0e0807100018002a003000501960002000300068007000780080010088010098010042350a0e68617368656450617373776f726410021a0e0808100018002a003000501160002001300068007000780080010088010098010042340a066973526f6c6510031a0e0800100018002a0030005010600020002a0566616c73653000680070007800800100880100980100422e0a07757365725f696410041a0e080c100018002a003000501a60002000300068007000780080010088010098010042410a19657374696d617465645f6c6173745f6c6f67696e5f74696d6510051a0f0809100018002a00300050a009600020013000680070007800800100880100980100480652b3010a077072696d617279100118012208757365726e616d652a0e68617368656450617373776f72642a066973526f6c652a07757365725f69642a19657374696d617465645f6c6173745f6c6f67696e5f74696d65300140004a10080010001a00200028003000380040005a0070027003700470057a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00102e00100e9010000000000000000f20100f801005a7a0a1175736572735f757365725f69645f696478100218012207757365725f69643004380140004a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00101e00100e9010000000000000000f20100f8010060036a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651803800101880103980100b201240a077072696d61727910001a08757365726e616d651a07757365725f6964200120042804b2012c0a1466616d5f325f68617368656450617373776f726410021a0e68617368656450617373776f726420022802b2011c0a0c66616d5f335f6973526f6c6510031a066973526f6c6520032803b201420a1f66616d5f355f657374696d617465645f6c6173745f6c6f67696e5f74696d6510051a19657374696d617465645f6c6173745f6c6f67696e5f74696d6520052805b80106c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880303a80300b00300d00300d80300e00300f80300880400980400a00400a80400b00400"}
77
,{"key":"8b898d8a89","value":"030a99030a057a6f6e65731805200128013a0042290a02696410011a0e0801104018002a0030035014600020003000680070007800800100880100980100422d0a06636f6e66696710021a0e0808100018002a0030005011600020013000680070007800800100880100980100480352730a077072696d61727910011801220269642a06636f6e666967300140004a10080010001a00200028003000380040005a0070027a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e00100e9010000000000000000f20100f8010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651803800101880103980100b201130a077072696d61727910001a02696420012800b2011c0a0c66616d5f325f636f6e66696710021a06636f6e66696720022802b80103c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300d00300d80300e00300f80300880400980400a00400a80400b00400"}
@@ -225,10 +225,10 @@ system hash=fed4e568760c015b3cc9a6bc58492e3239c0bdd6962fb87e9113cf13e5689e38
225225
,{"key":"d4"}
226226
]
227227

228-
tenant hash=ee07d9bb49e313a136e923f90768a262280a2604f48e920165231b07948b5360
228+
tenant hash=a76a318582e8c62cd5aa39b169680e55449e96074b62253d2893bd53489140eb
229229
----
230230
[{"key":""}
231-
,{"key":"8b89898a89","value":"0312450a0673797374656d10011a250a0d0a0561646d696e1080101880100a0c0a04726f6f7410801018801012046e6f646518032200280140004a006a08081910031800200e7000"}
231+
,{"key":"8b89898a89","value":"0312450a0673797374656d10011a250a0d0a0561646d696e1080101880100a0c0a04726f6f7410801018801012046e6f646518032200280140004a006a0808191004180020007000"}
232232
,{"key":"8b898b8a89","value":"030aaa030a0a64657363726970746f721803200128013a0042290a02696410011a0e0801104018002a003003501460002000300068007000780080010088010098010042310a0a64657363726970746f7210021a0e0808100018002a0030005011600020013000680070007800800100880100980100480352770a077072696d61727910011801220269642a0a64657363726970746f72300140004a10080010001a00200028003000380040005a0070027a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e00100e9010000000000000000f20100f8010060026a210a0b0a0561646d696e102018200a0a0a04726f6f741020182012046e6f64651803800101880103980100b201130a077072696d61727910001a02696420012800b201240a1066616d5f325f64657363726970746f7210021a0a64657363726970746f7220022802b80103c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300d00300d80300e00300f80300880400980400a00400a80400b00400"}
233233
,{"key":"8b898c8a89","value":"030a92070a0575736572731804200128013a00422f0a08757365726e616d6510011a0e0807100018002a003000501960002000300068007000780080010088010098010042350a0e68617368656450617373776f726410021a0e0808100018002a003000501160002001300068007000780080010088010098010042340a066973526f6c6510031a0e0800100018002a0030005010600020002a0566616c73653000680070007800800100880100980100422e0a07757365725f696410041a0e080c100018002a003000501a60002000300068007000780080010088010098010042410a19657374696d617465645f6c6173745f6c6f67696e5f74696d6510051a0f0809100018002a00300050a009600020013000680070007800800100880100980100480652b3010a077072696d617279100118012208757365726e616d652a0e68617368656450617373776f72642a066973526f6c652a07757365725f69642a19657374696d617465645f6c6173745f6c6f67696e5f74696d65300140004a10080010001a00200028003000380040005a0070027003700470057a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00102e00100e9010000000000000000f20100f801005a7a0a1175736572735f757365725f69645f696478100218012207757365725f69643004380140004a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00101e00100e9010000000000000000f20100f8010060036a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651803800101880103980100b201240a077072696d61727910001a08757365726e616d651a07757365725f6964200120042804b2012c0a1466616d5f325f68617368656450617373776f726410021a0e68617368656450617373776f726420022802b2011c0a0c66616d5f335f6973526f6c6510031a066973526f6c6520032803b201420a1f66616d5f355f657374696d617465645f6c6173745f6c6f67696e5f74696d6510051a19657374696d617465645f6c6173745f6c6f67696e5f74696d6520052805b80106c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880303a80300b00300d00300d80300e00300f80300880400980400a00400a80400b00400"}
234234
,{"key":"8b898d8a89","value":"030a99030a057a6f6e65731805200128013a0042290a02696410011a0e0801104018002a0030035014600020003000680070007800800100880100980100422d0a06636f6e66696710021a0e0808100018002a0030005011600020013000680070007800800100880100980100480352730a077072696d61727910011801220269642a06636f6e666967300140004a10080010001a00200028003000380040005a0070027a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e00100e9010000000000000000f20100f8010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651803800101880103980100b201130a077072696d61727910001a02696420012800b2011c0a0c66616d5f325f636f6e66696710021a06636f6e66696720022802b80103c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300d00300d80300e00300f80300880400980400a00400a80400b00400"}

pkg/sql/catalog/systemschema/system.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1442,7 +1442,7 @@ const SystemDatabaseName = catconstants.SystemDatabaseName
14421442
// release version).
14431443
//
14441444
// NB: Don't set this to clusterversion.Latest; use a specific version instead.
1445-
var SystemDatabaseSchemaBootstrapVersion = clusterversion.V25_4_AddSystemStatementHintsTable.Version()
1445+
var SystemDatabaseSchemaBootstrapVersion = clusterversion.V25_4.Version()
14461446

14471447
// MakeSystemDatabaseDesc constructs a copy of the system database
14481448
// descriptor.

0 commit comments

Comments
 (0)