diff --git a/src/core/server/ui_settings/create_or_upgrade_saved_config/is_config_version_upgradeable.test.ts b/src/core/server/ui_settings/create_or_upgrade_saved_config/is_config_version_upgradeable.test.ts index d694c0ad0bf6..0f2b9eced0dd 100644 --- a/src/core/server/ui_settings/create_or_upgrade_saved_config/is_config_version_upgradeable.test.ts +++ b/src/core/server/ui_settings/create_or_upgrade_saved_config/is_config_version_upgradeable.test.ts @@ -78,15 +78,17 @@ describe('savedObjects/health_check/isConfigVersionUpgradeable', function () { isUpgradeableTest('7.10.3-rc1', '1.0.0', false); isUpgradeableTest('6.7.10', '1.0.0-rc1', false); isUpgradeableTest('7.10.3', '1.0.0-rc1', false); - isUpgradeableTest('6.8.0', '1.0.1', false); - isUpgradeableTest('7.0.0', '1.0.1', false); - isUpgradeableTest('7.10.2', '1.0.1', false); - isUpgradeableTest('6.8.0-rc1', '1.0.1', false); - isUpgradeableTest('7.0.0-rc1', '1.0.1', false); - isUpgradeableTest('7.10.2-rc1', '1.0.1', false); - isUpgradeableTest('6.8.0', '1.0.1-rc1', false); - isUpgradeableTest('7.0.0', '1.0.1-rc1', false); - isUpgradeableTest('7.10.2', '1.0.1-rc1', false); + isUpgradeableTest('6.8.0', '1.0.1', true); + isUpgradeableTest('7.0.0', '1.0.1', true); + isUpgradeableTest('7.10.2', '1.0.1', true); + isUpgradeableTest('6.8.0-rc1', '1.0.1', true); + isUpgradeableTest('7.0.0-rc1', '1.0.1', true); + isUpgradeableTest('7.10.2-rc1', '1.0.1', true); + isUpgradeableTest('6.8.0', '1.0.1-rc1', true); + isUpgradeableTest('7.0.0', '1.0.1-rc1', true); + isUpgradeableTest('7.10.2', '1.0.1-rc1', true); isUpgradeableTest('1.0.0-rc1', '1.0.0', true); isUpgradeableTest('1.0.1', '1.0.0', false); + isUpgradeableTest('7.10.2', '1.1.0', true); + isUpgradeableTest('7.10.2', '2.0.0', false); }); diff --git a/src/core/server/ui_settings/create_or_upgrade_saved_config/is_config_version_upgradeable.ts b/src/core/server/ui_settings/create_or_upgrade_saved_config/is_config_version_upgradeable.ts index d2908cf6939b..4478e6f9f526 100644 --- a/src/core/server/ui_settings/create_or_upgrade_saved_config/is_config_version_upgradeable.ts +++ b/src/core/server/ui_settings/create_or_upgrade_saved_config/is_config_version_upgradeable.ts @@ -75,7 +75,7 @@ export function isConfigVersionUpgradeable( // If the saved config is from the fork and from 6.8.0 to 7.10.2 then we should be able to upgrade. const savedIsFromPrefork = semver.gte(savedReleaseVersion, '6.8.0') && semver.lte(savedReleaseVersion, '7.10.2'); - const currentVersionIsVersion1 = semver.eq(opensearchDashboardsReleaseVersion, '1.0.0'); + const currentVersionIsVersion1 = semver.major(opensearchDashboardsReleaseVersion) === 1; return ( savedIsLessThanOpenSearchDashboards || (savedIsSameAsOpenSearchDashboards && savedRcIsLessThanOpenSearchDashboards) ||