From d6bb8f057d7f18a4e6f33dd6378612f8d07f428f 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 65d32abbb..d9328214c 100644 --- a/.github/workflows/test-workflow.yml +++ b/.github/workflows/test-workflow.yml @@ -52,7 +52,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 1639678d4..c68f5b7b7 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/MonitorRunnerService.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/MonitorRunnerService.kt @@ -346,7 +346,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") } } } @@ -378,7 +378,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") } } }