pkg/clusterversion/runbooks/R2_mint_release.md
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).
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.
IMPORTANT: This is the most commonly missed step and will cause test failures if forgotten.
File: pkg/sql/catalog/systemschema/system.go (line ~1445)
Change: Update from the last internal version to the final minted version:
// Before (last internal version - e.g., V25_4_AddSystemStatementHintsTable)
var SystemDatabaseSchemaBootstrapVersion = clusterversion.V25_4_AddSystemStatementHintsTable.Version()
// After (final minted version - e.g., V25_4)
var SystemDatabaseSchemaBootstrapVersion = clusterversion.V25_4.Version()
Update cockroach_versions.go:
V25_4) with Internal: 0finalVersion constant to this key (e.g., const finalVersion Key = V25_4)Update SystemDatabaseSchemaBootstrapVersion (see above - critical!)
Update version.txt:
# Update pkg/build/version.txt to RC version (e.g., v25.4.0-rc.1)
# Note: Minting happens before the final release, typically when cutting rc.1
Regenerate documentation:
./dev gen docs
Regenerate bootstrap test data:
./dev test pkg/sql/catalog/systemschema_test --rewrite
This updates:
pkg/sql/catalog/systemschema_test/testdata/bootstrap_systempkg/sql/catalog/systemschema_test/testdata/bootstrap_tenantUpdate bootstrap hash test data:
Run the test to see what values need updating:
./dev test pkg/sql/catalog/bootstrap -f TestInitialValuesToString
The test will fail showing the expected hash values. Update in pkg/sql/catalog/bootstrap/testdata/testdata:
system hash=<new_hash_from_test_output>tenant hash=<new_hash_from_test_output>{"key":"8b89898a89","value":"..."} entry)Update logic test data:
After updating SystemDatabaseSchemaBootstrapVersion, you need to update the expected test output:
pkg/sql/logictest/testdata/logic_test/crdb_internal_catalogsystemDatabaseSchemaVersion in the test data to match the new minted versionBefore (with internal version):
1 {"database": {"id": 1, "name": "system", ... "systemDatabaseSchemaVersion": {"internal": 14, "majorVal": 25, "minorVal": 3}, ...}}
After (final minted version):
1 {"database": {"id": 1, "name": "system", ... "systemDatabaseSchemaVersion": {"majorVal": 25, "minorVal": 4}, ...}}
Note: The internal field should be removed when minting the final version.
Verify all tests pass:
./dev test pkg/sql/catalog/bootstrap -f TestInitialValuesToString
./dev test pkg/sql/catalog/systemschema_test
./dev test pkg/sql/logictest -f crdb_internal_catalog
Error: "Unexpected hash value for system"
SystemDatabaseSchemaBootstrapVersion in step 2Error: "output didn't match expected" with binary data diff
+ sign) and paste it into the testdata fileA typical R.2 mint should modify:
pkg/clusterversion/cockroach_versions.go (add final version, set finalVersion)pkg/sql/catalog/systemschema/system.go (update SystemDatabaseSchemaBootstrapVersion)pkg/build/version.txt (update to final version)docs/generated/settings/settings-for-tenants.txtdocs/generated/settings/settings.htmlpkg/sql/catalog/systemschema_test/testdata/bootstrap_systempkg/sql/catalog/systemschema_test/testdata/bootstrap_tenantpkg/sql/catalog/bootstrap/testdata/testdata (hashes and binary data)pkg/sql/logictest/testdata/logic_test/crdb_internal_catalog (update systemDatabaseSchemaVersion)