pkg/clusterversion/runbooks/M4_bump_minsupported_version_QUICK.md
Full details: See M4_bump_minsupported_version.md
Two PRs to bump MinSupported (e.g., from V25_2 → V25_3 → V25_4), each following this 5-commit pattern.
Reference PRs:
master branch| File | Action | Line |
|---|---|---|
pkg/clusterversion/cockroach_versions.go | const MinSupported Key = V25_3 | ~362 |
pkg/storage/pebble.go | Update MinimumSupportedFormatVersion | ~2518 |
For pebble.go: Check pebbleFormatVersionMap at line ~2510, use the pebble format for new MinSupported version.
git grep -l "MinSupported" pkg/ | grep -v "_test.go"
git grep "V25_2" pkg/ | grep -v testdata
pkg/crosscluster/logical/logical_replication_writer_processor.gopkg/crosscluster/physical/alter_replication_job.gopkg/kv/kvserver/closedts/policyrefresher/policy_refresher.gopkg/kv/kvserver/closedts/sidetransport/sender.gopkg/kv/kvserver/obsolete_code_test.gopkg/sql/backfill/mvcc_index_merger.gopkg/sql/catalog/funcdesc/helpers.gopkg/sql/conn_executor.gopkg/sql/create_index.gopkg/sql/create_table.gopkg/sql/distsql_running.go⚠️ DO NOT modify: pkg/sql/execversion/version.go (owned by SQL Queries team)
git add pkg/clusterversion/cockroach_versions.go pkg/storage/pebble.go <other-files>
git commit -m "clusterversion, storage: bump MinSupported from v25.2 to v25.3
Part of the quarterly M.4 \"Bump MinSupported\" task.
This commit updates the MinSupported constant from V25_2 to V25_3.
After this change, clusters running v25.2 can no longer connect to master.
Release note: None"
./dev test pkg/storage -f TestMinimumSupportedFormatVersion -v
rm -rf pkg/sql/schemachanger/scplan/internal/rules/release_25_2/
Edit pkg/sql/schemachanger/scplan/plan.go:
release_25_2rulesForReleases array (line ~158)Edit pkg/sql/schemachanger/scplan/BUILD.bazel:
git add -A
git commit -m "schemachanger: remove release_25_2 schema changer rules
Part of the quarterly M.4 \"Bump MinSupported\" task.
After bumping MinSupported from v25.2 to v25.3, the frozen schema
changer rules for release 25.2 are no longer needed.
Release note: None"
rm pkg/sql/catalog/bootstrap/data/25_2_system.keys
rm pkg/sql/catalog/bootstrap/data/25_2_system.sha256
rm pkg/sql/catalog/bootstrap/data/25_2_tenant.keys
rm pkg/sql/catalog/bootstrap/data/25_2_tenant.sha256
Edit pkg/sql/catalog/bootstrap/initial_values.go:
initialValuesFactoryByKey map (line ~66)go:embed variables (lines ~147-157)Edit pkg/sql/catalog/bootstrap/BUILD.bazel:
git add -A
git commit -m "bootstrap: remove 25.2 bootstrap data
Part of the quarterly M.4 \"Bump MinSupported\" task.
This commit removes the bootstrap data for v25.2, which is now below
the minimum supported version.
Release note: None"
ls pkg/sql/logictest/testdata/logic_test/mixed_version_*
Typical files:
mixed_version_charmixed_version_citextmixed_version_ltreemixed_version_partial_statsNote: Some of these files may not exist in newer versions. Only update files that exist.
Update LogicTest headers:
-# LogicTest: cockroach-go-testserver-25.2
+# LogicTest: cockroach-go-testserver-25.3
Or for multi-config files:
-# LogicTest: cockroach-go-testserver-25.2 cockroach-go-testserver-25.3
+# LogicTest: cockroach-go-testserver-25.3
git add pkg/sql/logictest/testdata/logic_test/mixed_version_*
git commit -m "logictest: update mixed_version tests to use 25.3 testserver
Part of the quarterly M.4 \"Bump MinSupported\" task.
Updates LogicTest headers for mixed-version tests to test against v25.3
instead of v25.2.
Release note: None"
| File | Action |
|---|---|
pkg/sql/logictest/logictestbase/logictestbase.go | Remove config definition and set entries |
build/teamcity/cockroach/nightlies/sqllogic_corpus_nightly_impl.sh | ⚠️ Update for config in loop |
| Test directories | Delete local-mixed-25.2/ |
| Logic test files | Remove skipif/onlyif refs |
Remove config definition (lines ~501-515):
// REMOVE:
{
Name: "local-mixed-25.2",
NumNodes: 1,
OverrideDistSQLMode: "off",
BootstrapVersion: clusterversion.TODO_Delete_V25_2,
DisableUpgrade: true,
DeclarativeCorpusCollection: true,
DisableSchemaLockedByDefault: true,
},
Remove from sets (lines ~660, ~684):
"default-configs": makeConfigSet(
"local-mixed-25.2", // REMOVE THIS LINE
)
"schema-locked-disabled": makeConfigSet(
"local-mixed-25.2", // REMOVE THIS LINE
)
Edit build/teamcity/cockroach/nightlies/sqllogic_corpus_nightly_impl.sh (line ~84):
-for config in local-mixed-25.2 local-mixed-25.3; do
+for config in local-mixed-25.3; do
This broke the nightly in PR #158225! Don't forget this file.
rm -rf pkg/ccl/logictestccl/tests/local-mixed-25.2/
rm -rf pkg/sql/logictest/tests/local-mixed-25.2/
rm -rf pkg/sql/sqlitelogictest/tests/local-mixed-25.2/
# Remove from dedicated directive lines
find pkg/sql/logictest/testdata/logic_test/ \
pkg/ccl/logictestccl/testdata/logic_test/ \
-type f -exec grep -l "local-mixed-25\.2" {} \; | while read file; do
sed -i '' \
-e '/^# LogicTest:/s/ !*local-mixed-25\.2//g' \
-e '/^skipif config local-mixed-25\.2$/d' \
-e '/^onlyif config local-mixed-25\.2$/d' \
"$file"
done
# Remove from multi-config lines
find pkg/sql/logictest/testdata/logic_test/ \
pkg/ccl/logictestccl/testdata/logic_test/ \
-type f -exec grep -l "local-mixed-25\.2" {} \; | while read file; do
sed -i '' \
-e '/^onlyif config/s/ local-mixed-25\.2//g' \
-e '/^skipif config/s/ local-mixed-25\.2//g' \
"$file"
done
# Remove empty LogicTest directives (if any)
sed -i '' '/^# LogicTest:$/d' pkg/sql/logictest/testdata/logic_test/* \
pkg/ccl/logictestccl/testdata/logic_test/* 2>/dev/null || true
⚠️ IMPORTANT: After sed, manually check files with onlyif directives - you may need to remove guarded statements. See full runbook for details.
./dev gen bazel
git add -A
git commit -m "logictest: remove local-mixed-25.2 test configuration
Part of the quarterly M.4 \"Bump MinSupported\" task.
After bumping MinSupported from v25.2 to v25.3, the local-mixed-25.2
test configuration is no longer needed.
Changes:
- Removed local-mixed-25.2 config from logictestbase.go
- Updated nightly build script (sqllogic_corpus_nightly_impl.sh)
- Deleted test directories
- Removed skipif/onlyif references from test files
- Regenerated Bazel BUILD files
Release note: None"
./dev test pkg/clusterversion pkg/storage
./dev build short
git log --oneline HEAD~5..HEAD
Expected:
# Get files from reference PR
gh pr view 157767 --json files --jq '.files[].path' | sort > /tmp/ref_files.txt
# Get your files
git diff --name-only master | sort > /tmp/current_files.txt
# Compare
echo "=== Only in current ==="
comm -13 /tmp/ref_files.txt /tmp/current_files.txt
echo "=== Only in reference ==="
comm -23 /tmp/ref_files.txt /tmp/current_files.txt
Justify differences (version-specific files are expected to differ).
Before creating PR, verify these files were updated:
pkg/storage/pebble.go - MinimumSupportedFormatVersionbuild/teamcity/cockroach/nightlies/sqllogic_corpus_nightly_impl.sh - nightly loop./dev gen bazel ran successfully~70-80 files changed across 5 commits with ~5,000-6,000 deletions.
| Error | Quick Fix |
|---|---|
TestMinimumSupportedFormatVersion fails | Check pkg/storage/pebble.go MinimumSupportedFormatVersion matches pebbleFormatVersionMap |
| Nightly build fails "nonexistent local-mixed" | Update sqllogic_corpus_nightly_impl.sh |
panic: unknown config name | Logic test files still reference old config - run sed commands again |
empty LogicTest directive | Remove with sed -i '' '/^# LogicTest:$/d' <file> |
| Duplicate statement errors | Manually review files with onlyif - see full runbook |
Full troubleshooting: See main runbook section "Common Errors and Solutions"