diff --git a/.github/workflows/opensearch-observability-test-and-build-workflow.yml b/.github/workflows/opensearch-observability-test-and-build-workflow.yml index 606303f39..c62ff163b 100644 --- a/.github/workflows/opensearch-observability-test-and-build-workflow.yml +++ b/.github/workflows/opensearch-observability-test-and-build-workflow.yml @@ -58,7 +58,7 @@ jobs: cp -r ./build/distributions/*.zip opensearch-observability-builds/ - name: Upload Artifacts - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v4 with: name: opensearch-observability-ubuntu-latest path: opensearch-observability-builds @@ -90,7 +90,7 @@ jobs: cp -r ./build/distributions/*.zip opensearch-observability-builds/ - name: Upload Artifacts - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v4 with: name: opensearch-observability-${{ matrix.os }} path: opensearch-observability-builds diff --git a/build.gradle b/build.gradle index ea3a3166c..480bbda76 100644 --- a/build.gradle +++ b/build.gradle @@ -21,7 +21,7 @@ buildscript { opensearch_build += "-SNAPSHOT" } common_utils_version = System.getProperty("common_utils.version", opensearch_build) - kotlin_version = System.getProperty("kotlin.version", "1.8.21") + kotlin_version = System.getProperty("kotlin.version", "1.9.20") } repositories { @@ -124,6 +124,7 @@ configurations.all { resolutionStrategy { force "org.jetbrains.kotlin:kotlin-stdlib:${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-reflect:${kotlin_version}" force "org.jetbrains.kotlin:kotlin-stdlib-common:${kotlin_version}" force "com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:${versions.jackson}" @@ -149,11 +150,11 @@ ext { } plugins.withId('java') { - sourceCompatibility = targetCompatibility = "11" + sourceCompatibility = targetCompatibility = "21" } plugins.withId('org.jetbrains.kotlin.jvm') { - compileKotlin.kotlinOptions.jvmTarget = compileTestKotlin.kotlinOptions.jvmTarget = "11" + compileKotlin.kotlinOptions.jvmTarget = compileTestKotlin.kotlinOptions.jvmTarget = "21" } allprojects { @@ -161,7 +162,7 @@ allprojects { version = "${opensearch_build}" plugins.withId('java') { - sourceCompatibility = targetCompatibility = "11" + sourceCompatibility = targetCompatibility = "21" } } diff --git a/src/main/kotlin/org/opensearch/observability/index/ObservabilityIndex.kt b/src/main/kotlin/org/opensearch/observability/index/ObservabilityIndex.kt index 7a8f0dfea..a61ecbd11 100644 --- a/src/main/kotlin/org/opensearch/observability/index/ObservabilityIndex.kt +++ b/src/main/kotlin/org/opensearch/observability/index/ObservabilityIndex.kt @@ -104,10 +104,10 @@ internal object ObservabilityIndex { error("$LOG_PREFIX:Index $INDEX_NAME creation not Acknowledged") } } catch (exception: ResourceAlreadyExistsException) { - log.warn("message: ${exception.message}") + log.warn("skipping creation as resource already exists: ${exception.message}") } catch (exception: Exception) { if (exception.cause !is ResourceAlreadyExistsException) { - throw exception + log.error("index creation failed due to exception: ${exception.message}") } } this.mappingsUpdated = true @@ -169,11 +169,10 @@ internal object ObservabilityIndex { "and ${reindexResponse.updated} docs updated in $INDEX_NAME" ) } catch (exception: ResourceNotFoundException) { - log.warn("message: ${exception.message}") + log.warn("skipping reindex notebook as resource not found, message : ${exception.message}") } catch (exception: Exception) { - if (exception.cause !is ResourceNotFoundException) { - throw exception - } + log.error("reindex notebook failed due to exception: ${exception.message}") + throw exception } } }