-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove opendistro settings and endpoints #3326
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,9 +8,9 @@ | |
import static org.opensearch.sql.legacy.TestUtils.createIndexByRestClient; | ||
import static org.opensearch.sql.legacy.TestUtils.isIndexExist; | ||
import static org.opensearch.sql.legacy.TestUtils.loadDataByRestClient; | ||
import static org.opensearch.sql.legacy.plugin.RestSqlAction.LEGACY_QUERY_API_ENDPOINT; | ||
import static org.opensearch.sql.legacy.plugin.RestSqlAction.QUERY_API_ENDPOINT; | ||
import static org.opensearch.sql.plugin.rest.RestQuerySettingsAction.LEGACY_SQL_SETTINGS_API_ENDPOINT; | ||
import static org.opensearch.sql.sql.LegacyAPICompatibilityIT.LEGACY_QUERY_API_ENDPOINT; | ||
import static org.opensearch.sql.sql.LegacyAPICompatibilityIT.LEGACY_SQL_SETTINGS_API_ENDPOINT; | ||
import static org.opensearch.sql.util.MatcherUtils.rows; | ||
import static org.opensearch.sql.util.MatcherUtils.schema; | ||
import static org.opensearch.sql.util.MatcherUtils.verifyDataRows; | ||
|
@@ -93,21 +93,33 @@ public void testBackwardsCompatibility() throws Exception { | |
List<Map<String, Object>> plugins = (List<Map<String, Object>>) response.get("plugins"); | ||
Set<Object> pluginNames = | ||
plugins.stream().map(map -> map.get("name")).collect(Collectors.toSet()); | ||
String version = (String) response.get("version"); | ||
|
||
boolean isBackwardsIncompatibleVersion = version.startsWith("2."); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. would we test 2.x using main code? I thought we would remove 2.x from build.gradle so this won't happen, since they are not backward compatible There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I think the majority of the features are still backward compatible, besides those planned to deparcate in 3.0. Maybe discuss the bwc version of main branch on thread #1880. |
||
|
||
switch (CLUSTER_TYPE) { | ||
case OLD: | ||
Assert.assertTrue(pluginNames.contains("opensearch-sql")); | ||
updateLegacySQLSettings(); | ||
if (isBackwardsIncompatibleVersion) { | ||
updateLegacySQLSettings(); | ||
} | ||
loadIndex(Index.ACCOUNT); | ||
verifySQLQueries(LEGACY_QUERY_API_ENDPOINT); | ||
verifySQLQueries( | ||
isBackwardsIncompatibleVersion ? LEGACY_QUERY_API_ENDPOINT : QUERY_API_ENDPOINT); | ||
break; | ||
case MIXED: | ||
Assert.assertTrue(pluginNames.contains("opensearch-sql")); | ||
verifySQLSettings(); | ||
verifySQLQueries(LEGACY_QUERY_API_ENDPOINT); | ||
if (isBackwardsIncompatibleVersion) { | ||
verifySQLSettings(); | ||
} else { | ||
// For upgraded nodes, we don't need to verify legacy settings | ||
} | ||
verifySQLQueries( | ||
isBackwardsIncompatibleVersion ? LEGACY_QUERY_API_ENDPOINT : QUERY_API_ENDPOINT); | ||
break; | ||
case UPGRADED: | ||
Assert.assertTrue(pluginNames.contains("opensearch-sql")); | ||
verifySQLSettings(); | ||
// For fully upgraded clusters, we don't need to verify legacy settings | ||
verifySQLQueries(QUERY_API_ENDPOINT); | ||
break; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to list the removed settings in breaking change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As long as we include this change in the release notes, I think it is less confusing to remove them from the documents.