From ab79a1825af896dea6813c7366aeaf8858c02501 Mon Sep 17 00:00:00 2001 From: Subhobrata Dey Date: Tue, 16 Jul 2024 11:57:40 -0700 Subject: [PATCH] fix minor bug in lock handler (#1486) * fix minor bug in lock handler Signed-off-by: Subhobrata Dey * dummy commit Signed-off-by: Subhobrata Dey --------- Signed-off-by: Subhobrata Dey --- .github/workflows/test-workflow.yml | 2 +- .../kotlin/org/opensearch/alerting/MonitorRunnerService.kt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-workflow.yml b/.github/workflows/test-workflow.yml index 07bdf3af7..6540490bc 100644 --- a/.github/workflows/test-workflow.yml +++ b/.github/workflows/test-workflow.yml @@ -54,7 +54,7 @@ jobs: cp ./alerting/build/distributions/*.zip alerting-artifacts # This step uses the codecov-action Github action: https://github.com/codecov/codecov-action - name: Upload Coverage Report - uses: codecov/codecov-action@v1 + uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN }} # This step uses the upload-artifact Github action: https://github.com/actions/upload-artifact diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/MonitorRunnerService.kt b/alerting/src/main/kotlin/org/opensearch/alerting/MonitorRunnerService.kt index e3147a2d9..b949eefdf 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/MonitorRunnerService.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/MonitorRunnerService.kt @@ -353,7 +353,7 @@ object MonitorRunnerService : JobRunner, CoroutineScope, AbstractLifecycleCompon } } finally { monitorCtx.client!!.suspendUntil { monitorCtx.lockService!!.release(lock, it) } - logger.debug("lock ${lock!!.lockId} released") + logger.debug("lock ${lock?.lockId} released") } } } @@ -385,7 +385,7 @@ object MonitorRunnerService : JobRunner, CoroutineScope, AbstractLifecycleCompon } } finally { monitorCtx.client!!.suspendUntil { monitorCtx.lockService!!.release(lock, it) } - logger.debug("lock ${lock!!.lockId} released") + logger.debug("lock ${lock?.lockId} released") } } }