[PURIFY] remove all trace of x-pack sql (#18)
This commit removes all trace of Elastic licensed SQL Signed-off-by: Peter Nied <petern@amazon.com>
This commit is contained in:
parent
3769b2c6a4
commit
f15b830261
|
@ -99,16 +99,6 @@ public class InternalDistributionBwcSetupPlugin implements Plugin<Project> {
|
|||
|
||||
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) {
|
||||
|
|
|
@ -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" />
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -798,12 +798,6 @@ public final class ContextDocGenerator {
|
|||
|
||||
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");
|
||||
}
|
||||
|
||||
|
|
|
@ -1,45 +0,0 @@
|
|||
/*
|
||||
* Licensed to Elasticsearch under one or more contributor
|
||||
* license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright
|
||||
* ownership. Elasticsearch licenses this file to you under
|
||||
* the Apache License, Version 2.0 (the "License"); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.packaging.test;
|
||||
|
||||
import org.elasticsearch.packaging.util.Distribution;
|
||||
import org.elasticsearch.packaging.util.Shell;
|
||||
import org.junit.Before;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.containsString;
|
||||
import static org.junit.Assume.assumeFalse;
|
||||
import static org.junit.Assume.assumeTrue;
|
||||
|
||||
public class SqlCliTests extends PackagingTestCase {
|
||||
@Before
|
||||
public void filterDistros() {
|
||||
assumeTrue("only default distro", distribution.flavor == Distribution.Flavor.DEFAULT);
|
||||
assumeFalse("no docker", distribution.isDocker());
|
||||
}
|
||||
|
||||
public void test010Install() throws Exception {
|
||||
install();
|
||||
}
|
||||
|
||||
public void test020Help() throws Exception {
|
||||
Shell.Result result = installation.executables().sqlCli.run("--help");
|
||||
assertThat(result.stdout, containsString("Elasticsearch SQL CLI"));
|
||||
}
|
||||
}
|
|
@ -209,7 +209,6 @@ public class Archives {
|
|||
"elasticsearch-migrate",
|
||||
"elasticsearch-saml-metadata",
|
||||
"elasticsearch-setup-passwords",
|
||||
"elasticsearch-sql-cli",
|
||||
"elasticsearch-syskeygen",
|
||||
"elasticsearch-users",
|
||||
"x-pack-env",
|
||||
|
@ -224,10 +223,6 @@ public class Archives {
|
|||
}
|
||||
});
|
||||
|
||||
// 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)));
|
||||
}
|
||||
|
|
|
@ -537,7 +537,6 @@ public class Docker {
|
|||
"elasticsearch-croneval",
|
||||
"elasticsearch-saml-metadata",
|
||||
"elasticsearch-setup-passwords",
|
||||
"elasticsearch-sql-cli",
|
||||
"elasticsearch-syskeygen",
|
||||
"elasticsearch-users",
|
||||
"x-pack-env",
|
||||
|
@ -545,10 +544,6 @@ public class Docker {
|
|||
"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));
|
||||
}
|
||||
|
|
|
@ -197,7 +197,6 @@ public class Installation {
|
|||
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");
|
||||
}
|
||||
|
|
|
@ -237,7 +237,6 @@ public class Packages {
|
|||
"elasticsearch-migrate",
|
||||
"elasticsearch-saml-metadata",
|
||||
"elasticsearch-setup-passwords",
|
||||
"elasticsearch-sql-cli",
|
||||
"elasticsearch-syskeygen",
|
||||
"elasticsearch-users",
|
||||
"x-pack-env",
|
||||
|
@ -245,10 +244,6 @@ public class Packages {
|
|||
"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)));
|
||||
}
|
||||
|
|
|
@ -47,28 +47,6 @@ public class XPackIT extends AbstractRollingTestCase {
|
|||
*/
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
|
|
Loading…
Reference in New Issue