Skip to content

Commit

Permalink
Updating some more versions and resolving some dependency conflicts
Browse files Browse the repository at this point in the history
Signed-off-by: Kshitij Tandon <[email protected]>
  • Loading branch information
tandonks committed Oct 29, 2024
1 parent c17405f commit 7148adf
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
9 changes: 6 additions & 3 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,9 @@ 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 '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 +225,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 Expand Up @@ -892,4 +895,4 @@ task updateVersion {
// String tokenization to support -SNAPSHOT
ant.replaceregexp(file: 'build.gradle', match: '"opensearch.version", "\\d.*"', replace: '"opensearch.version", "' + newVersion.tokenize('-')[0] + '-SNAPSHOT"', flags: 'g', byline: true)
}
}
}
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 7148adf

Please sign in to comment.