Fix misleading Community Build upgrade error message#3426
Fix misleading Community Build upgrade error message#3426mishaTsukini wants to merge 1 commit intoSonarSource:masterfrom
Conversation
MIN_UPGRADE_VERSION is set to 2026_01_000 (first migration of 26.1), but MIN_UPGRADE_VERSION_COMMUNITY_BUILD_READABLE incorrectly states "25.12". This causes users upgrading from 25.12 to see "Please upgrade to the 25.12 version first" — even though they are already on 25.12. The actual requirement is 26.1 (migration 2026_01_000), so the human-readable constant should reflect that.
SummaryThis PR corrects a constant mismatch in Community Build upgrade validation. The The fix changes What reviewers should knowValidation points:
Where to look:
|
| // In reality user is required to upgrade just to 10.8 but we want to 'market' 2025.1 | ||
| public static final String MIN_UPGRADE_VERSION_HUMAN_READABLE = "2026.1"; |
There was a problem hiding this comment.
The comment on line 36 (// In reality user is required to upgrade just to 10.8 but we want to 'market' 2025.1) is stale — it refers to version numbers unrelated to the current constants (26.1 / 2026.1). This PR touches these lines, so it's a good opportunity to update or remove it.
| // In reality user is required to upgrade just to 10.8 but we want to 'market' 2025.1 | |
| public static final String MIN_UPGRADE_VERSION_HUMAN_READABLE = "2026.1"; | |
| public static final String MIN_UPGRADE_VERSION_HUMAN_READABLE = "2026.1"; | |
| public static final String MIN_UPGRADE_VERSION_COMMUNITY_BUILD_READABLE = "26.1"; |
- Mark as noise
Summary
MIN_UPGRADE_VERSIONis set to2026_01_000(the first migration of version 26.1)MIN_UPGRADE_VERSION_COMMUNITY_BUILD_READABLEwas set to"25.12""26.1"to match the actual numeric requirementContext
When upgrading SonarQube Community Build from 25.12 (last migration
2025_06_026=202506026) to any version >= 26.3 (which requiresMIN_UPGRADE_VERSION = 2026_01_000=202601000), the error message tells the user to upgrade to 25.12 first. This is confusing and incorrect — the user needs to upgrade to 26.1 first so that migration2026_01_000gets applied.The Server Edition message (
MIN_UPGRADE_VERSION_HUMAN_READABLE = "2026.1") is already correct. Only the Community Build message was wrong.How to reproduce
schema_migrations=202506026)Test plan
DatabaseServerCompatibilityTest.fail_if_requires_firstly_to_upgrade_to_26_1to verify the corrected message