Skip to content

Commit

Permalink
jdk21
Browse files Browse the repository at this point in the history
Signed-off-by: Hailong Cui <[email protected]>
  • Loading branch information
Hailong-am committed Oct 28, 2024
1 parent c17405f commit c60567b
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
8 changes: 6 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ buildscript {
classpath "org.opensearch.gradle:build-tools:${opensearch_version}"
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.23.3"
classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.23.6"
classpath "org.jacoco:org.jacoco.agent:0.8.10"
}
}
Expand All @@ -105,6 +105,10 @@ configurations.all {
resolutionStrategy {
force "org.jetbrains.kotlin:kotlin-stdlib:${kotlin_version}"
force "org.jetbrains.kotlin:kotlin-stdlib-common:${kotlin_version}"
force "org.jetbrains.kotlin:kotlin-reflect:${kotlin_version}"
force "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${kotlin_version}"
force "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${kotlin_version}"
force "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${kotlin_version}"
force 'junit:junit:4.13.1'
force 'commons-beanutils:commons-beanutils:1.9.4'
force 'com.google.guava:guava:30.0-jre'
Expand Down Expand Up @@ -222,7 +226,7 @@ dependencies {
}
}
configurations.ktlint {
resolutionStrategy.force "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.22"
resolutionStrategy.force "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.10"
}

// https://aws.oss.sonatype.org/content/repositories/snapshots/org/opensearch/plugin/
Expand Down
4 changes: 4 additions & 0 deletions detekt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ style:
excludes: ['**/test/**']
FunctionOnlyReturningConstant:
active: false
UseRequire:
active: false
UnusedPrivateProperty:
active: false

complexity:
LargeClass:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ package org.opensearch.indexmanagement.indexstatemanagement

import kotlinx.coroutines.CoroutineName
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.DelicateCoroutinesApi
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.SupervisorJob
Expand Down Expand Up @@ -254,6 +255,7 @@ object ManagedIndexRunner :
}
}

@OptIn(DelicateCoroutinesApi::class)
@Suppress("ReturnCount", "ComplexMethod", "LongMethod", "ComplexCondition", "NestedBlockDepth")
private suspend fun runManagedIndexConfig(managedIndexConfig: ManagedIndexConfig, jobContext: JobExecutionContext) {
logger.debug("Run job for index ${managedIndexConfig.index}")
Expand Down Expand Up @@ -640,6 +642,7 @@ object ManagedIndexRunner :
* update metadata in config index, and save metadata in history after update
* this can be called 2 times in one job run, so need to save seqNo & primeTerm
*/
@OptIn(DelicateCoroutinesApi::class)
private suspend fun updateManagedIndexMetaData(
managedIndexMetaData: ManagedIndexMetaData,
lastUpdateResult: UpdateMetadataResult? = null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
package org.opensearch.indexmanagement.indexstatemanagement.step.forcemerge

import kotlinx.coroutines.CoroutineName
import kotlinx.coroutines.DelicateCoroutinesApi
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.delay
Expand All @@ -30,6 +31,7 @@ class AttemptCallForceMergeStep(private val action: ForceMergeAction) : Step(nam
private var stepStatus = StepStatus.STARTING
private var info: Map<String, Any>? = null

@OptIn(DelicateCoroutinesApi::class)
@Suppress("TooGenericExceptionCaught", "ComplexMethod")
override suspend fun execute(): AttemptCallForceMergeStep {
val context = this.context ?: return this
Expand Down

0 comments on commit c60567b

Please sign in to comment.