diff --git a/src/main/kotlin/org/digma/intellij/plugin/ui/common/UpdateBackendAction.kt b/src/main/kotlin/org/digma/intellij/plugin/ui/common/UpdateBackendAction.kt index 3efd97b5b..ac1bbb08c 100644 --- a/src/main/kotlin/org/digma/intellij/plugin/ui/common/UpdateBackendAction.kt +++ b/src/main/kotlin/org/digma/intellij/plugin/ui/common/UpdateBackendAction.kt @@ -30,6 +30,8 @@ class UpdateBackendAction { fun updateBackend(project: Project, backendDeploymentType: BackendDeploymentType, sourceComponent: JComponent?) { + Log.log(logger::info, "updateBackend invoked, backendDeploymentType {}, [t:{}]", backendDeploymentType, Thread.currentThread().name) + when (backendDeploymentType) { BackendDeploymentType.Helm -> { @@ -50,8 +52,10 @@ class UpdateBackendAction { HintManager.getInstance() .showHint(upgradePopupLabel, RelativePoint.getNorthWestOf(it), HintManager.HIDE_BY_ESCAPE, 5000) } + Log.log(logger::info, "calling upgrade backend for local engine. [t:{}]", Thread.currentThread().name) service().upgradeEngine(project) { exitValue -> if (exitValue != "0") { + Log.log(logger::warn, "error upgrading local engine , exitValue {}. [t:{}]", exitValue, Thread.currentThread().name) ErrorReporter.getInstance().reportError( "UpdateBackendAction.upgradeLocalEngine", "failed to upgrade local engine", @@ -79,14 +83,15 @@ class UpdateBackendAction { //call some api to refresh the connection status as soon as possible - private fun tryToUpdateConnectionStatusSoon(project: Project){ + private fun tryToUpdateConnectionStatusSoon(project: Project) { + Log.log(logger::info, "trying to update connection status soon [t:{}]", Thread.currentThread().name) repeat(24) { count -> if (BackendConnectionMonitor.getInstance(project).isConnectionOk()) { return@repeat } try { - Log.log(logger::warn, "waiting for connection {} [t:{}]", count,Thread.currentThread().name) + Log.log(logger::info, "waiting for connection {} [t:{}]", count, Thread.currentThread().name) Thread.sleep(1000) } catch (e: InterruptedException) { //ignore @@ -98,6 +103,12 @@ class UpdateBackendAction { //ignore } } + + if (!BackendConnectionMonitor.getInstance(project).isConnectionOk()) { + Log.log(logger::warn, "connection status is ok. [t:{}]", Thread.currentThread().name) + } else { + Log.log(logger::warn, "connection status is not ok. [t:{}]", Thread.currentThread().name) + } }