Skip to content

Commit 6a1ceeb

Browse files
Adds support for ES 7.7.0 (opensearch-project#228)
* upgrade gradle to 6.4 * Routes replace usage of RestController.register elastic/elasticsearch#51950 * add setting index.hidden=true to createIndex * solve IT allowed action list problem * try hard code jvmArgs * add release note * revert immutableList change, use listOf jvmArgs put into afterEvaluate phase
1 parent d15f56f commit 6a1ceeb

26 files changed

+130
-87
lines changed

.github/workflows/release-workflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
build:
1010
strategy:
1111
matrix:
12-
java: [13]
12+
java: [14]
1313
# Job name
1414
name: Build Index Management with JDK ${{ matrix.java }}
1515
# This job runs on Linux

.github/workflows/test-and-build-workflow.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ jobs:
1717
- name: Checkout Branch
1818
uses: actions/checkout@v2
1919
# This step uses the setup-java Github action: https://github.com/actions/setup-java
20-
- name: Set Up JDK 13
20+
- name: Set Up JDK 14
2121
uses: actions/setup-java@v1
2222
with:
23-
java-version: 13
23+
java-version: 14
2424
- name: Build with Gradle
2525
run: ./gradlew build
2626
- name: Create Artifact Path

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Please see our [documentation](https://opendistro.github.io/for-elasticsearch-do
4141

4242
1. Check out this package from version control.
4343
2. Launch Intellij IDEA, choose **Import Project**, and select the `settings.gradle` file in the root of this package.
44-
3. To build from the command line, set `JAVA_HOME` to point to a JDK >= 13 before running `./gradlew`.
44+
3. To build from the command line, set `JAVA_HOME` to point to a JDK >= 14 before running `./gradlew`.
4545
- Unix System
4646
1. `export JAVA_HOME=jdk-install-dir`: Replace `jdk-install-dir` with the JAVA_HOME directory of your system.
4747
2. `export PATH=$JAVA_HOME/bin:$PATH`

build-tools/esplugin-coverage.gradle

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,10 @@
2727
* break if there are multiple nodes in the integTestCluster. But for now... it sorta works.
2828
*/
2929

30-
apply plugin: 'jacoco'
31-
3230
// Get gradle to generate the required jvm agent arg for us using a dummy tasks of type Test. Unfortunately Elastic's
3331
// testing tasks don't derive from Test so the jacoco plugin can't do this automatically.
3432
def jacocoDir = "${buildDir}/jacoco"
33+
3534
task dummyTest(type: Test) {
3635
enabled = false
3736
workingDir = file("/") // Force absolute path to jacoco agent jar
@@ -42,7 +41,6 @@ task dummyTest(type: Test) {
4241
}
4342
}
4443

45-
4644
task dummyIntegTest(type: Test) {
4745
enabled = false
4846
workingDir = file("/") // Force absolute path to jacoco agent jar
@@ -57,15 +55,6 @@ integTest.runner {
5755
systemProperty 'jacoco.dir', "${jacocoDir}"
5856
}
5957

60-
testClusters.integTest {
61-
jvmArgs " ${dummyIntegTest.jacoco.getAsJvmArg()}"
62-
systemProperty 'com.sun.management.jmxremote', "true"
63-
systemProperty 'com.sun.management.jmxremote.authenticate', "false"
64-
systemProperty 'com.sun.management.jmxremote.port', "7777"
65-
systemProperty 'com.sun.management.jmxremote.ssl', "false"
66-
systemProperty 'java.rmi.server.hostname', "127.0.0.1"
67-
}
68-
6958
jacocoTestReport {
7059
dependsOn integTest, test
7160
executionData dummyTest.jacoco.destinationFile, dummyIntegTest.jacoco.destinationFile
@@ -77,7 +66,17 @@ jacocoTestReport {
7766
}
7867
}
7968

80-
project.gradle.projectsEvaluated {
81-
jacocoTestReport.dependsOn integTest.runner
82-
}
69+
allprojects{
70+
afterEvaluate {
71+
jacocoTestReport.dependsOn integTest.runner
8372

73+
testClusters.integTest {
74+
jvmArgs " ${dummyIntegTest.jacoco.getAsJvmArg()}"
75+
systemProperty 'com.sun.management.jmxremote', "true"
76+
systemProperty 'com.sun.management.jmxremote.authenticate', "false"
77+
systemProperty 'com.sun.management.jmxremote.port', "7777"
78+
systemProperty 'com.sun.management.jmxremote.ssl', "false"
79+
systemProperty 'java.rmi.server.hostname', "127.0.0.1"
80+
}
81+
}
82+
}

build.gradle

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515

1616
buildscript {
1717
ext {
18-
es_version = System.getProperty("es.version", "7.6.1")
19-
kotlin_version = System.getProperty("kotlin.version", "1.3.61")
18+
es_version = System.getProperty("es.version", "7.7.0")
19+
kotlin_version = System.getProperty("kotlin.version", "1.3.72")
2020
}
2121

2222
repositories {
@@ -36,7 +36,7 @@ buildscript {
3636
}
3737

3838
plugins {
39-
id 'nebula.ospackage' version "8.2.0"
39+
id 'nebula.ospackage' version "8.3.0"
4040
id "com.dorongold.task-tree" version "1.5"
4141
}
4242

@@ -79,12 +79,12 @@ configurations.testCompile {
7979

8080
dependencies {
8181
compileOnly "org.elasticsearch:elasticsearch:${es_version}"
82-
compileOnly "com.amazon.opendistroforelasticsearch:opendistro-job-scheduler-spi:1.6.0.0"
82+
compileOnly "com.amazon.opendistroforelasticsearch:opendistro-job-scheduler-spi:1.8.0.0"
8383
compile "org.jetbrains.kotlin:kotlin-stdlib:${kotlin_version}"
8484
compile "org.jetbrains.kotlin:kotlin-stdlib-common:${kotlin_version}"
8585
compile 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.2.1'
8686
compile "org.jetbrains:annotations:13.0"
87-
compile "com.amazon.opendistroforelasticsearch:notification:1.6.0.0"
87+
compile "com.amazon.opendistroforelasticsearch:notification:1.8.0.0"
8888

8989
testCompile "org.elasticsearch.test:framework:${es_version}"
9090
testCompile "org.jetbrains.kotlin:kotlin-test:${kotlin_version}"
@@ -129,6 +129,15 @@ thirdPartyAudit.enabled = false
129129
def es_tmp_dir = rootProject.file('build/private/es_tmp').absoluteFile
130130
es_tmp_dir.mkdirs()
131131

132+
afterEvaluate {
133+
testClusters.integTest.nodes.each { node ->
134+
def plugins = node.plugins
135+
def firstPlugin = plugins.get(0)
136+
plugins.remove(0)
137+
plugins.add(firstPlugin)
138+
}
139+
}
140+
132141
test {
133142
systemProperty 'tests.security.manager', 'false'
134143
}

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# permissions and limitations under the License.
1414
#
1515

16-
version = 1.7.0
16+
version = 1.8.0

gradle/wrapper/gradle-wrapper.jar

215 Bytes
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#Tue Mar 24 11:18:08 PDT 2020
2-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.2.2-all.zip
1+
#Tue May 19 22:58:14 PDT 2020
2+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.4-all.zip
33
distributionBase=GRADLE_USER_HOME
44
distributionPath=wrapper/dists
55
zipStorePath=wrapper/dists

gradlew

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ esac
8282

8383
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
8484

85+
8586
# Determine the Java command to use to start the JVM.
8687
if [ -n "$JAVA_HOME" ] ; then
8788
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
@@ -129,6 +130,7 @@ fi
129130
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
130131
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
131132
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
133+
132134
JAVACMD=`cygpath --unix "$JAVACMD"`
133135

134136
# We build the pattern for arguments to be converted via cygpath

gradlew.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ set CMD_LINE_ARGS=%*
8484

8585
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
8686

87+
8788
@rem Execute Gradle
8889
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
8990

0 commit comments

Comments
 (0)