diff --git a/src/core/server/opensearch/version_check/opensearch_opensearch_dashboards_version_compatability.test.ts b/src/core/server/opensearch/version_check/opensearch_opensearch_dashboards_version_compatability.test.ts index 44773e22818c..80de3a19f0a5 100644 --- a/src/core/server/opensearch/version_check/opensearch_opensearch_dashboards_version_compatability.test.ts +++ b/src/core/server/opensearch/version_check/opensearch_opensearch_dashboards_version_compatability.test.ts @@ -68,6 +68,18 @@ describe('plugins/opensearch', () => { it('when majors and minors are not equal, but the engine is on legacy version 8.0.0 and OpenSearch Dashboards is on 2.0.0', () => { expect(opensearchVersionCompatibleWithOpenSearchDashboards('8.0.0', '2.0.0')).toBe(false); }); + + it('when majors and minors are not equal, but the engine is on legacy version 6.10.3 and OpenSearch Dashboards is on 3.0.0', () => { + expect(opensearchVersionCompatibleWithOpenSearchDashboards('6.10.3', '3.0.0')).toBe(false); + }); + + it('when majors and minors are not equal, but the engine is on legacy version 7.10.3 and OpenSearch Dashboards is on 3.0.0', () => { + expect(opensearchVersionCompatibleWithOpenSearchDashboards('7.10.3', '3.0.0')).toBe(false); + }); + + it('when majors and minors are not equal, but the engine is on legacy version 8.0.0 and OpenSearch Dashboards is on 3.0.0', () => { + expect(opensearchVersionCompatibleWithOpenSearchDashboards('8.0.0', '3.0.0')).toBe(false); + }); }); describe('returns true', () => { @@ -110,6 +122,18 @@ describe('plugins/opensearch', () => { it('when majors and minors are not equal, but the engine is on legacy version 7.10.2 and OpenSearch Dashboards is on 2.1.0', () => { expect(opensearchVersionCompatibleWithOpenSearchDashboards('7.10.2', '2.1.0')).toBe(true); }); + + it('when majors and minors are not equal, but the engine is on legacy version 7.10.2 and OpenSearch Dashboards is on 3.0.0', () => { + expect(opensearchVersionCompatibleWithOpenSearchDashboards('7.10.2', '3.0.0')).toBe(true); + }); + + it('when majors and minors are not equal, but the engine is on legacy version 7.10.2 and OpenSearch Dashboards is on 3.0.1', () => { + expect(opensearchVersionCompatibleWithOpenSearchDashboards('7.10.2', '3.0.1')).toBe(true); + }); + + it('when majors and minors are not equal, but the engine is on legacy version 7.10.2 and OpenSearch Dashboards is on 3.1.0', () => { + expect(opensearchVersionCompatibleWithOpenSearchDashboards('7.10.2', '3.1.0')).toBe(true); + }); }); }); }); diff --git a/src/core/server/opensearch/version_check/opensearch_opensearch_dashboards_version_compatability.ts b/src/core/server/opensearch/version_check/opensearch_opensearch_dashboards_version_compatability.ts index 8ecae4d60250..ab8e3725d73d 100644 --- a/src/core/server/opensearch/version_check/opensearch_opensearch_dashboards_version_compatability.ts +++ b/src/core/server/opensearch/version_check/opensearch_opensearch_dashboards_version_compatability.ts @@ -45,7 +45,7 @@ interface VersionNumbers { * * WARNING: OpenSearchDashboards 7.x could cause conflicts. */ -const osdLegacyCompatibleMajorVersions = [1, 2]; +const osdLegacyCompatibleMajorVersions = [1, 2, 3]; /** * Checks for the compatibilitiy between OpenSearch and OpenSearchDashboards versions 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 f1e052979c09..10a01c004e04 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 @@ -89,5 +89,6 @@ describe('savedObjects/health_check/isConfigVersionUpgradeable', function () { isUpgradeableTest('1.0.1', '1.0.0', false); isUpgradeableTest('7.10.2', '1.1.0', true); isUpgradeableTest('7.10.2', '2.0.0', true); - isUpgradeableTest('7.10.2', '3.0.0', false); + isUpgradeableTest('7.10.2', '3.0.0', true); + isUpgradeableTest('7.10.2', '4.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 3a111371c578..44206e6345b7 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 @@ -35,7 +35,7 @@ import semver from 'semver'; * * WARNING: OpenSearchDashboards 7.x could cause conflicts. */ -const osdValidMajorVersions = [1, 2]; +const osdValidMajorVersions = [1, 2, 3]; const rcVersionRegex = /^(\d+\.\d+\.\d+)\-rc(\d+)$/i; function extractRcNumber(version: string): [string, number] {