Skip to content

Commit 0cc9775

Browse files
authored
[RORDEV-991] new ES 8.10.0 support (#938)
1 parent 6554a0b commit 0cc9775

File tree

172 files changed

+13973
-10
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

172 files changed

+13973
-10
lines changed

azure-pipelines.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ stages:
121121
strategy:
122122
maxParallel: 99
123123
matrix:
124+
IT_es810x:
125+
ROR_TASK: integration_es810x
124126
IT_es89x:
125127
ROR_TASK: integration_es89x
126128
IT_es88x:
@@ -167,8 +169,8 @@ stages:
167169
strategy:
168170
maxParallel: 99
169171
matrix:
170-
IT_es89x:
171-
ROR_TASK: integration_es89x
172+
IT_es810x:
173+
ROR_TASK: integration_es810x
172174
IT_es80x:
173175
ROR_TASK: integration_es80x
174176
- job:

bin/build.sh

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ if [[ -z $TRAVIS ]] || [[ $ROR_TASK == "core_tests" ]]; then
4040
./gradlew --stacktrace core:test
4141
fi
4242

43+
if [[ -z $TRAVIS ]] || [[ $ROR_TASK == "integration_es810x" ]]; then
44+
echo ">>> es810x => Running testcontainers.."
45+
./gradlew integration-tests:test '-PesModule=es810x' || ( find . |grep hs_err |xargs cat && exit 1 )
46+
fi
47+
4348
if [[ -z $TRAVIS ]] || [[ $ROR_TASK == "integration_es89x" ]]; then
4449
echo ">>> es89x => Running testcontainers.."
4550
./gradlew integration-tests:test '-PesModule=es89x' || ( find . |grep hs_err |xargs cat && exit 1 )
@@ -189,21 +194,24 @@ if [[ -z $TRAVIS ]] || [[ $ROR_TASK == "package_es8xx" ]]; then
189194

190195
echo ">>> ($0) additional builds of ES module for specified ES version"
191196

192-
#es89
197+
#es810x
198+
./gradlew --stacktrace es810x:ror '-PesVersion=8.10.0'
199+
200+
#es89x
193201
./gradlew --stacktrace es89x:ror '-PesVersion=8.9.2'
194202
./gradlew --stacktrace es89x:ror '-PesVersion=8.9.1'
195203
./gradlew --stacktrace es89x:ror '-PesVersion=8.9.0'
196204

197-
#es88
205+
#es88x
198206
./gradlew --stacktrace es88x:ror '-PesVersion=8.8.2'
199207
./gradlew --stacktrace es88x:ror '-PesVersion=8.8.1'
200208
./gradlew --stacktrace es88x:ror '-PesVersion=8.8.0'
201209

202-
#es87
210+
#es87x
203211
./gradlew --stacktrace es87x:ror '-PesVersion=8.7.1'
204212
./gradlew --stacktrace es87x:ror '-PesVersion=8.7.0'
205213

206-
#es85
214+
#es85x
207215
./gradlew --stacktrace es85x:ror '-PesVersion=8.6.2'
208216
./gradlew --stacktrace es85x:ror '-PesVersion=8.6.1'
209217
./gradlew --stacktrace es85x:ror '-PesVersion=8.6.0'
@@ -212,25 +220,25 @@ if [[ -z $TRAVIS ]] || [[ $ROR_TASK == "package_es8xx" ]]; then
212220
./gradlew --stacktrace es85x:ror '-PesVersion=8.5.1'
213221
./gradlew --stacktrace es85x:ror '-PesVersion=8.5.0'
214222

215-
#es84
223+
#es84x
216224
./gradlew --stacktrace es84x:ror '-PesVersion=8.4.3'
217225
./gradlew --stacktrace es84x:ror '-PesVersion=8.4.2'
218226
./gradlew --stacktrace es84x:ror '-PesVersion=8.4.1'
219227
./gradlew --stacktrace es84x:ror '-PesVersion=8.4.0'
220228

221-
#es83
229+
#es83x
222230
./gradlew --stacktrace es83x:ror '-PesVersion=8.3.3'
223231
./gradlew --stacktrace es83x:ror '-PesVersion=8.3.2'
224232
./gradlew --stacktrace es83x:ror '-PesVersion=8.3.1'
225233
./gradlew --stacktrace es83x:ror '-PesVersion=8.3.0'
226234

227-
#es82
235+
#es82x
228236
./gradlew --stacktrace es82x:ror '-PesVersion=8.2.3'
229237
./gradlew --stacktrace es82x:ror '-PesVersion=8.2.2'
230238
./gradlew --stacktrace es82x:ror '-PesVersion=8.2.1'
231239
./gradlew --stacktrace es82x:ror '-PesVersion=8.2.0'
232240

233-
#es81
241+
#es81x
234242
./gradlew --stacktrace es81x:ror '-PesVersion=8.1.3'
235243
./gradlew --stacktrace es81x:ror '-PesVersion=8.1.2'
236244
./gradlew --stacktrace es81x:ror '-PesVersion=8.1.1'

es810x/build.gradle

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
/*
2+
* This file is part of ReadonlyREST.
3+
*
4+
* ReadonlyREST is free software: you can redistribute it and/or modify
5+
* it under the terms of the GNU General Public License as published by
6+
* the Free Software Foundation, either version 3 of the License, or
7+
* (at your option) any later version.
8+
*
9+
* ReadonlyREST is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
* GNU General Public License for more details.
13+
*
14+
* You should have received a copy of the GNU General Public License
15+
* along with ReadonlyREST. If not, see http://www.gnu.org/licenses/
16+
*/
17+
18+
plugins {
19+
id "readonlyrest.plugin-common-conventions"
20+
}
21+
22+
def pluginFullName = pluginName + '-' + version
23+
24+
compileScala {
25+
sourceCompatibility = 17
26+
targetCompatibility = 17
27+
}
28+
29+
dependencies {
30+
implementation project(path: ':core')
31+
implementation project(path: ':ror-tools', configuration: 'shadow')
32+
implementation project(path: ':ror-tools-core')
33+
implementation group: 'org.elasticsearch', name: 'elasticsearch' , version: esVersion
34+
implementation group: 'org.elasticsearch.client', name: 'elasticsearch-rest-client', version: esVersion
35+
implementation group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.13'
36+
implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.11.1'
37+
compileOnly group: 'org.locationtech.spatial4j', name: 'spatial4j', version: '0.7'
38+
// if you don't have this dependency in local maven, please run publishToMavenLocal task first
39+
compileOnly group: 'org.elasticsearch.plugin', name: 'transport-netty4', version: esVersion
40+
}
41+
42+
configurations {
43+
wagon
44+
distJars {
45+
exclude group: 'org.elasticsearch'
46+
exclude group: 'lucene-core'
47+
exclude module: 'log4j-api'
48+
exclude module: 'log4j-core'
49+
exclude group: 'lucene-analyzers-common'
50+
exclude group: 'org.apache.commons'
51+
exclude group: 'org.yaml'
52+
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-core'
53+
}
54+
}
55+
56+
tasks.register('cleanOldData') {
57+
doLast {
58+
delete 'build/tmp/' + pluginFullName
59+
}
60+
}
61+
62+
tasks.register('jarHellCheck', JavaExec) {
63+
outputs.upToDateWhen { false }
64+
mainClass.set("org.elasticsearch.jdk.JarHell")
65+
classpath = project.sourceSets.main.compileClasspath.filter { it.exists() }
66+
}
67+
68+
tasks.register('resolvePluginDescriptorTemplate', Copy) {
69+
dependsOn configureEsVersion
70+
outputs.upToDateWhen { false }
71+
from './plugin-metadata'
72+
into 'build/tmp/' + pluginFullName
73+
expand([
74+
'descriptor': [
75+
'name' : pluginName,
76+
'pluginVersion': project.properties['pluginVersion'],
77+
'esVersion' : project.properties['esVersion']
78+
]
79+
])
80+
}
81+
82+
tasks.register('ror', Zip) {
83+
dependsOn(cleanOldData, jarHellCheck, toJar, resolvePluginDescriptorTemplate)
84+
outputs.upToDateWhen { false }
85+
archivesBaseName = pluginName
86+
into('.')
87+
{
88+
from configurations.distJars.filter { x -> !x.name.contains('spatial4j') && !x.name.contains('jts') }
89+
from 'build/libs/' + pluginFullName + '.jar'
90+
from 'build/tmp/' + pluginFullName
91+
}
92+
}

es810x/gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
esVersion=8.10.0
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#
2+
# This file is part of ReadonlyREST.
3+
#
4+
# ReadonlyREST is free software: you can redistribute it and/or modify
5+
# it under the terms of the GNU General Public License as published by
6+
# the Free Software Foundation, either version 3 of the License, or
7+
# (at your option) any later version.
8+
#
9+
# ReadonlyREST is distributed in the hope that it will be useful,
10+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
# GNU General Public License for more details.
13+
#
14+
# You should have received a copy of the GNU General Public License
15+
# along with ReadonlyREST. If not, see http://www.gnu.org/licenses/
16+
#
17+
#
18+
# Elasticsearch plugin descriptor file
19+
# This file must exist as 'plugin-descriptor.properties' in a folder named `elasticsearch`
20+
# inside all plugins.
21+
#
22+
name=${descriptor.name}
23+
version=${descriptor.pluginVersion}
24+
description=Safely expose Elasticsearch REST API
25+
classname=tech.beshu.ror.es.ReadonlyRestPlugin
26+
java.version=1.8
27+
elasticsearch.version=${descriptor.esVersion}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
grant {
2+
permission java.io.FilePermission "/usr/share/elasticsearch", "read";
3+
permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
4+
permission java.lang.RuntimePermission "accessClassInPackage.sun.misc";
5+
permission java.lang.RuntimePermission "accessClassInPackage.sun.misc.*";
6+
permission java.lang.RuntimePermission "accessDeclaredMembers";
7+
permission java.lang.RuntimePermission "getClassLoader";
8+
permission java.lang.RuntimePermission "setContextClassLoader";
9+
permission java.net.SocketPermission "*", "accept, resolve, connect";
10+
permission java.security.SecurityPermission "insertProvider";
11+
permission java.security.SecurityPermission "putProviderProperty.BCFIPS";
12+
permission java.security.SecurityPermission "putProviderProperty.BCJSSE";
13+
permission java.util.PropertyPermission "*", "read,write";
14+
};

0 commit comments

Comments
 (0)