Skip to content

Commit

Permalink
Upgrades Index Management to use 2.0.0-alpha1 of OpenSearch and depen…
Browse files Browse the repository at this point in the history
…dencies

Signed-off-by: Drew Baugher <[email protected]>
  • Loading branch information
dbbaughe committed Mar 31, 2022
1 parent 901d887 commit cac39fb
Show file tree
Hide file tree
Showing 44 changed files with 345 additions and 328 deletions.
2 changes: 2 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ root = true

# See https://github.com/arturbosch/detekt
max_line_length=off

disabled_rules=import-ordering
2 changes: 1 addition & 1 deletion .github/workflows/multi-node-test-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Checkout Branch
uses: actions/checkout@v2
- name: Run integration tests with multi node config
run: ./gradlew integTest -PnumNodes=3 -Dopensearch.version=1.3.0-SNAPSHOT
run: ./gradlew integTest -PnumNodes=3 -Dopensearch.version=2.0.0-alpha1-SNAPSHOT
- name: Upload failed logs
uses: actions/upload-artifact@v2
if: failure()
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/test-and-build-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ jobs:
# Job name
name: Build Index Management
env:
BUILD_ARGS: -D"opensearch.version=1.3.0-SNAPSHOT" ${{ matrix.os_build_args }}
BUILD_ARGS: -D"opensearch.version=2.0.0-alpha1-SNAPSHOT" ${{ matrix.os_build_args }}
WORKING_DIR: ${{ matrix.working_directory }}.
strategy:
# This setting says that all jobs should finish, even if one fails
fail-fast: false
# This starts three jobs, setting these environment variables uniquely for the different jobs
matrix:
java: [8, 11, 14]
java: [11, 17]
os: [ubuntu-latest, windows-latest, macos-latest]
include:
- os: windows-latest
Expand All @@ -28,12 +28,6 @@ jobs:
os_java_options: -Xmx4096M
- os: macos-latest
os_build_args: -x integTest -x jacocoTestReport
# Only testing the LTS java version on mac and windows
exclude:
- os: windows-latest
java: [8, 14]
- os: macos-latest
java: [8, 14]
runs-on: ${{ matrix.os }}
steps:
# This step uses the setup-java Github action: https://github.com/actions/setup-java
Expand Down
50 changes: 25 additions & 25 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ import java.util.function.Predicate

buildscript {
ext {
opensearch_version = System.getProperty("opensearch.version", "1.3.0-SNAPSHOT")
// 1.1.0 -> 1.1.0.0, and 1.1.0-SNAPSHOT -> 1.1.0.0-SNAPSHOT
opensearch_build = opensearch_version.replaceAll(/(\.\d)([^\d]*)$/, '$1.0$2')
notification_version = System.getProperty("notification.version", opensearch_build)
opensearch_version = System.getProperty("opensearch.version", "2.0.0-alpha1-SNAPSHOT")
// 1.1.0 -> 1.1.0.0, 1.1.0-SNAPSHOT -> 1.1.0.0-SNAPSHOT, and 2.0.0-alpha1-SNAPSHOT -> 2.0.0.0-alpha1-SNAPSHOT
opensearch_build = opensearch_version.replaceAll(/(\.\d)(-.*)$/, '$1.0$2')
// notification_version = System.getProperty("notification.version", opensearch_build)
common_utils_version = System.getProperty("common_utils.version", opensearch_build)
job_scheduler_version = System.getProperty("job_scheduler_version.version", opensearch_build)
kotlin_version = System.getProperty("kotlin.version", "1.4.0")
kotlin_version = System.getProperty("kotlin.version", "1.6.10")
}

repositories {
Expand All @@ -34,7 +34,7 @@ buildscript {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlin_version}"
classpath "org.jetbrains.kotlin:kotlin-allopen:${kotlin_version}"
classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.17.1"
classpath "org.jacoco:org.jacoco.agent:0.8.5"
classpath "org.jacoco:org.jacoco.agent:0.8.7"
}
}

Expand Down Expand Up @@ -121,7 +121,7 @@ detekt {
buildUponDefaultConfig = true
}

configurations.testCompile {
configurations.testImplementation {
exclude module: "securemock"
}

Expand All @@ -143,22 +143,23 @@ allprojects {
dependencies {
compileOnly "org.opensearch:opensearch:${opensearch_version}"
compileOnly "org.opensearch:opensearch-job-scheduler-spi:${job_scheduler_version}"
compile "org.jetbrains.kotlin:kotlin-stdlib:${kotlin_version}"
compile "org.jetbrains.kotlin:kotlin-stdlib-common:${kotlin_version}"
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${kotlin_version}"
compile 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9'
compile "org.jetbrains:annotations:13.0"
compile project(path: ":${rootProject.name}-spi", configuration: 'shadow')
compile "org.opensearch:notification:${notification_version}"
compile "org.opensearch:common-utils:${common_utils_version}"
compile "com.github.seancfoley:ipaddress:5.3.3"

testCompile "org.opensearch.test:framework:${opensearch_version}"
testCompile "org.jetbrains.kotlin:kotlin-test:${kotlin_version}"
implementation "org.jetbrains.kotlin:kotlin-stdlib:${kotlin_version}"
implementation "org.jetbrains.kotlin:kotlin-stdlib-common:${kotlin_version}"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${kotlin_version}"
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9'
implementation "org.jetbrains:annotations:13.0"
implementation project(path: ":${rootProject.name}-spi", configuration: 'shadow')
// implementation "org.opensearch:notification:${notification_version}"
implementation "org.opensearch:common-utils:${common_utils_version}"
implementation "com.github.seancfoley:ipaddress:5.3.3"
implementation "commons-codec:commons-codec:1.13"

testImplementation "org.opensearch.test:framework:${opensearch_version}"
testImplementation "org.jetbrains.kotlin:kotlin-test:${kotlin_version}"
testImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0"
testCompile "org.mockito:mockito-core:3.12.4"
testImplementation "org.mockito:mockito-core:4.3.1"

add("ktlint", "com.pinterest:ktlint:0.41.0") {
add("ktlint", "com.pinterest:ktlint:0.45.1") {
attributes {
attribute(Bundling.BUNDLING_ATTRIBUTE, objects.named(Bundling, Bundling.EXTERNAL))
}
Expand All @@ -171,11 +172,11 @@ repositories {
}

plugins.withId('java') {
sourceCompatibility = targetCompatibility = "1.8"
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_11
}

plugins.withId('org.jetbrains.kotlin.jvm') {
compileKotlin.kotlinOptions.jvmTarget = compileTestKotlin.kotlinOptions.jvmTarget = "1.8"
compileKotlin.kotlinOptions.jvmTarget = compileTestKotlin.kotlinOptions.jvmTarget = JavaVersion.VERSION_11
compileKotlin.dependsOn ktlint
}

Expand Down Expand Up @@ -346,7 +347,7 @@ String bwcFilePath = "src/test/resources/bwc/"
testClusters {
"${baseName}$i" {
testDistribution = "ARCHIVE"
versions = ["7.10.2", "1.3.0-SNAPSHOT"]
versions = ["7.10.2", "2.0.0-alpha1-SNAPSHOT"]
numberOfNodes = 3
plugin(provider(new Callable<RegularFile>(){
@Override
Expand Down Expand Up @@ -553,7 +554,6 @@ testClusters.mixedCluster {
} else {
node.plugin(project.tasks.bundlePlugin.archiveFile)
}
node.plugins.each { println("plugin in the node: ${it.get()}") }
}
setting 'path.repo', repo.absolutePath
}
Expand Down
2 changes: 1 addition & 1 deletion detekt.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# TODO: Remove this before initial release, only for developmental purposes
build:
maxIssues: 10
maxIssues: 20

exceptions:
TooGenericExceptionCaught:
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit cac39fb

Please sign in to comment.