Skip to content
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

[PURIFY] remove all trace of x-pack sql #18

Merged
merged 1 commit into from
Jan 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,6 @@ private void configureBwcProject(Project project, BwcVersions.UnreleasedVersionI

registerBwcArtifacts(project, distributionProject);
}

// Create build tasks for the JDBC driver used for compatibility testing
String jdbcProjectDir = "x-pack/plugin/sql/jdbc";

File jdbcProjectArtifact = new File(
checkoutDir.get(),
jdbcProjectDir + "/build/distributions/x-pack-sql-jdbc-" + bwcVersion.get() + "-SNAPSHOT.jar"
);

createBuildBwcTask(bwcSetupExtension, project, bwcVersion, "jdbc", jdbcProjectDir, jdbcProjectArtifact, buildBwcTaskProvider);
}

private void registerBwcArtifacts(Project bwcProject, DistributionProject distributionProject) {
Expand Down
1 change: 0 additions & 1 deletion buildSrc/src/main/resources/checkstyle_suppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
<!-- These files are generated by ANTLR so its silly to hold them to our rules. -->
<suppress files="modules[/\\]lang-painless[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]painless[/\\]antlr[/\\]PainlessLexer\.java" checks="." />
<suppress files="modules[/\\]lang-painless[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]painless[/\\]antlr[/\\]PainlessParser(|BaseVisitor|Visitor)\.java" checks="." />
<suppress files="plugin[/\\]sql[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]xpack[/\\]sql[/\\]parser[/\\]SqlBase(Base(Listener|Visitor)|Lexer|Listener|Parser|Visitor).java" checks="." />

<!-- JNA requires the no-argument constructor on JNAKernel32Library.SizeT to be public-->
<suppress files="server[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]bootstrap[/\\]JNAKernel32Library.java" checks="RedundantModifier" />
Expand Down
8 changes: 0 additions & 8 deletions gradle/formatting.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,6 @@ def projectPathsToExclude = [
':x-pack:plugin:ql',
':x-pack:plugin:search-business-rules',
':x-pack:plugin:spatial',
':x-pack:plugin:sql',
':x-pack:plugin:sql:jdbc',
':x-pack:plugin:sql:qa',
':x-pack:plugin:sql:qa:security',
':x-pack:plugin:sql:sql-action',
':x-pack:plugin:sql:sql-cli',
':x-pack:plugin:sql:sql-client',
':x-pack:plugin:sql:sql-proto',
':x-pack:plugin:transform',
':x-pack:plugin:vectors',
':x-pack:plugin:voting-only-node',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -798,12 +798,6 @@ private static Map<String, String> getDisplayNames(List<PainlessContextClassInfo

private static boolean isInternalClass(String javaName) {
return javaName.equals("org.elasticsearch.script.ScoreScript") ||
javaName.equals("org.elasticsearch.xpack.sql.expression.function.scalar.geo.GeoShape") ||
javaName.equals("org.elasticsearch.xpack.sql.expression.function.scalar.whitelist.InternalSqlScriptUtils") ||
javaName.equals("org.elasticsearch.xpack.sql.expression.literal.IntervalDayTime") ||
javaName.equals("org.elasticsearch.xpack.sql.expression.literal.IntervalYearMonth") ||
javaName.equals("org.elasticsearch.xpack.ql.expression.function.scalar.InternalQlScriptUtils") ||
javaName.equals("org.elasticsearch.xpack.ql.expression.function.scalar.whitelist.InternalQlScriptUtils") ||
javaName.equals("org.elasticsearch.script.ScoreScript$ExplanationHolder");
}

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@ private static void verifyDefaultInstallation(Installation es, Distribution dist
"elasticsearch-migrate",
"elasticsearch-saml-metadata",
"elasticsearch-setup-passwords",
"elasticsearch-sql-cli",
"elasticsearch-syskeygen",
"elasticsearch-users",
"x-pack-env",
Expand All @@ -224,10 +223,6 @@ private static void verifyDefaultInstallation(Installation es, Distribution dist
}
});

// at this time we only install the current version of archive distributions, but if that changes we'll need to pass
// the version through here
assertThat(es.bin("elasticsearch-sql-cli-" + getCurrentVersion() + ".jar"), file(File, owner, owner, p755));

Stream.of("users", "users_roles", "roles.yml", "role_mapping.yml", "log4j2.properties")
.forEach(configFile -> assertThat(es.config(configFile), file(File, owner, owner, p660)));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -537,18 +537,13 @@ private static void verifyDefaultInstallation(Installation es) {
"elasticsearch-croneval",
"elasticsearch-saml-metadata",
"elasticsearch-setup-passwords",
"elasticsearch-sql-cli",
"elasticsearch-syskeygen",
"elasticsearch-users",
"x-pack-env",
"x-pack-security-env",
"x-pack-watcher-env"
).forEach(executable -> assertPermissionsAndOwnership(es.bin(executable), p755));

// at this time we only install the current version of archive distributions, but if that changes we'll need to pass
// the version through here
assertPermissionsAndOwnership(es.bin("elasticsearch-sql-cli-" + getCurrentVersion() + ".jar"), p755);

Stream.of("role_mapping.yml", "roles.yml", "users", "users_roles")
.forEach(configFile -> assertPermissionsAndOwnership(es.config(configFile), p660));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ public class Executables {
public final Executable shardTool = new Executable("elasticsearch-shard");
public final Executable nodeTool = new Executable("elasticsearch-node");
public final Executable setupPasswordsTool = new Executable("elasticsearch-setup-passwords");
public final Executable sqlCli = new Executable("elasticsearch-sql-cli");
public final Executable syskeygenTool = new Executable("elasticsearch-syskeygen");
public final Executable usersTool = new Executable("elasticsearch-users");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,18 +237,13 @@ private static void verifyDefaultInstallation(Installation es, Distribution dist
"elasticsearch-migrate",
"elasticsearch-saml-metadata",
"elasticsearch-setup-passwords",
"elasticsearch-sql-cli",
"elasticsearch-syskeygen",
"elasticsearch-users",
"x-pack-env",
"x-pack-security-env",
"x-pack-watcher-env"
).forEach(executable -> assertThat(es.bin(executable), file(File, "root", "root", p755)));

// at this time we only install the current version of archive distributions, but if that changes we'll need to pass
// the version through here
assertThat(es.bin("elasticsearch-sql-cli-" + distribution.version + ".jar"), file(File, "root", "root", p755));

Stream.of("users", "users_roles", "roles.yml", "role_mapping.yml", "log4j2.properties")
.forEach(configFile -> assertThat(es.config(configFile), file(File, "root", "elasticsearch", p660)));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,28 +47,6 @@ public void skipIfNotXPack() {
*/
}

/**
* Test a basic feature (SQL) which doesn't require any trial license.
* Note that the test methods on this class can run in any order so we
* <strong>might</strong> have already installed a trial license.
*/
public void testBasicFeature() throws IOException {
Request bulk = new Request("POST", "/sql_test/doc/_bulk");
bulk.setJsonEntity(
"{\"index\":{}}\n"
+ "{\"f\": \"1\"}\n"
+ "{\"index\":{}}\n"
+ "{\"f\": \"2\"}\n");
bulk.addParameter("refresh", "true");
bulk.setOptions(expectWarnings(RestBulkAction.TYPES_DEPRECATION_MESSAGE));
client().performRequest(bulk);

Request sql = new Request("POST", "/_sql");
sql.setJsonEntity("{\"query\": \"SELECT * FROM sql_test WHERE f > 1 ORDER BY f ASC\"}");
String response = EntityUtils.toString(client().performRequest(sql).getEntity());
assertEquals("{\"columns\":[{\"name\":\"f\",\"type\":\"text\"}],\"rows\":[[\"2\"]]}", response);
}

/**
* Test creating a trial license and using it. This is interesting because
* our other tests test cover starting a new cluster with the default
Expand Down