From 5f6f7028ee074ecab08e040c088e182ee41e5cb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Goworko?= Date: Sat, 15 Nov 2025 15:15:35 +0100 Subject: [PATCH 1/8] qs --- .../filePatchers/JarManifestModifier.scala | 6 +++-- .../windows/WindowsEsDirectoryManager.scala | 6 ----- .../containers/windows/WindowsEsSetup.scala | 23 ++++++++++++++++++- 3 files changed, 26 insertions(+), 9 deletions(-) diff --git a/ror-tools-core/src/main/scala/tech/beshu/ror/tools/core/patches/internal/filePatchers/JarManifestModifier.scala b/ror-tools-core/src/main/scala/tech/beshu/ror/tools/core/patches/internal/filePatchers/JarManifestModifier.scala index 678123e557..8f1c6a2273 100644 --- a/ror-tools-core/src/main/scala/tech/beshu/ror/tools/core/patches/internal/filePatchers/JarManifestModifier.scala +++ b/ror-tools-core/src/main/scala/tech/beshu/ror/tools/core/patches/internal/filePatchers/JarManifestModifier.scala @@ -21,7 +21,7 @@ import tech.beshu.ror.tools.core.utils.EsDirectory import tech.beshu.ror.tools.core.utils.FileUtils.{getFilePermissionsAndOwner, setFilePermissionsAndOwner} import java.util.UUID -import java.util.jar.{JarFile, JarOutputStream} +import java.util.jar.{JarEntry, JarFile, JarOutputStream} import scala.jdk.CollectionConverters.IteratorHasAsScala import scala.util.Using @@ -67,7 +67,9 @@ object JarManifestModifier { originalJarFile.entries().asIterator().asScala.foreach { entry => val name = entry.getName if (!name.equalsIgnoreCase("META-INF/MANIFEST.MF")) { - jarOutput.putNextEntry(entry) + val newEntry = new JarEntry(name) + newEntry.setTime(entry.getTime) + jarOutput.putNextEntry(newEntry) Using(originalJarFile.getInputStream(entry))(_.transferTo(jarOutput)).fold( ex => throw IllegalStateException(s"Could not copy content of ${entry.getName} because of [${ex.getMessage}]", ex), (_: Long) => () diff --git a/tests-utils/src/main/scala/tech/beshu/ror/utils/containers/windows/WindowsEsDirectoryManager.scala b/tests-utils/src/main/scala/tech/beshu/ror/utils/containers/windows/WindowsEsDirectoryManager.scala index 6d0b10bfab..d09b3ade3b 100644 --- a/tests-utils/src/main/scala/tech/beshu/ror/utils/containers/windows/WindowsEsDirectoryManager.scala +++ b/tests-utils/src/main/scala/tech/beshu/ror/utils/containers/windows/WindowsEsDirectoryManager.scala @@ -17,14 +17,11 @@ package tech.beshu.ror.utils.containers.windows import com.typesafe.scalalogging.LazyLogging -import os.* -import tech.beshu.ror.utils.containers.images.Elasticsearch import tech.beshu.ror.utils.containers.images.Elasticsearch.Config import java.io.{BufferedInputStream, FileOutputStream} import java.nio.file.{Files, StandardCopyOption} import java.util.zip.ZipInputStream -import scala.jdk.CollectionConverters.* import scala.language.postfixOps import scala.util.Using @@ -36,9 +33,6 @@ object WindowsEsDirectoryManager extends LazyLogging { def basePath: os.Path = os.pwd / "windows-es" - def tempPath: os.Path = - os.pwd / "temp" - def downloadsPath: os.Path = basePath / "downloads" diff --git a/tests-utils/src/main/scala/tech/beshu/ror/utils/containers/windows/WindowsEsSetup.scala b/tests-utils/src/main/scala/tech/beshu/ror/utils/containers/windows/WindowsEsSetup.scala index 801ad8ff64..46828f7392 100644 --- a/tests-utils/src/main/scala/tech/beshu/ror/utils/containers/windows/WindowsEsSetup.scala +++ b/tests-utils/src/main/scala/tech/beshu/ror/utils/containers/windows/WindowsEsSetup.scala @@ -27,6 +27,7 @@ import tech.beshu.ror.utils.containers.windows.WindowsEsPortProvider.* import tech.beshu.ror.utils.containers.windows.WindowsEsRunner.{WindowsEsProcess, startEs} import java.util.function.Consumer +import scala.annotation.tailrec import scala.language.postfixOps object WindowsEsSetup extends LazyLogging { @@ -39,7 +40,7 @@ object WindowsEsSetup extends LazyLogging { def prepareEs(elasticsearch: Elasticsearch): Unit = { downloadEsZipFileWithProgress(elasticsearch.esVersion) - unzipEs(elasticsearch.esVersion, elasticsearch.config) + withRetries(times = 3)(unzipEs(elasticsearch.esVersion, elasticsearch.config)) replaceConfigFile(elasticsearch) installPlugins(elasticsearch) } @@ -107,4 +108,24 @@ object WindowsEsSetup extends LazyLogging { val updated = file.lines.map(line => if (line.startsWith(prefix)) newLine else line) file.overwrite(updated.mkString("\n")) + private def withRetries(times: Int)(block: => Unit): Unit = { + @tailrec + def loop(attempt: Int): Unit = { + try { + block + } catch { + case e: Throwable => + val nextAttempt = attempt + 1 + if (nextAttempt > times) { + throw e + } else { + logger.error(s"Attempt $attempt failed: ${e.getMessage}, retrying...", e) + loop(nextAttempt) + } + } + } + + loop(1) + } + } From 3ece3487193952f1dc6a1942821ba287a9898cd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Goworko?= Date: Sat, 15 Nov 2025 15:45:00 +0100 Subject: [PATCH 2/8] qs --- .../windows/WindowsEsDirectoryManager.scala | 5 +++++ .../utils/containers/windows/WindowsEsSetup.scala | 14 ++++++++++---- .../ror/utils/gradle/RorPluginGradleProject.scala | 5 ++++- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/tests-utils/src/main/scala/tech/beshu/ror/utils/containers/windows/WindowsEsDirectoryManager.scala b/tests-utils/src/main/scala/tech/beshu/ror/utils/containers/windows/WindowsEsDirectoryManager.scala index d09b3ade3b..fb27f59b21 100644 --- a/tests-utils/src/main/scala/tech/beshu/ror/utils/containers/windows/WindowsEsDirectoryManager.scala +++ b/tests-utils/src/main/scala/tech/beshu/ror/utils/containers/windows/WindowsEsDirectoryManager.scala @@ -63,6 +63,11 @@ object WindowsEsDirectoryManager extends LazyLogging { } } + def cleanDownloadsDirectory(esVersion: String): Unit = { + logger.info(s"Removing all files from Windows ES downloads directory") + os.remove.all(downloadsPath) + } + private def doDownloadEsZipFileWithProgress(esVersion: String): Unit = { val url = downloadUrl(esVersion) val dest = zipFilePath(esVersion) diff --git a/tests-utils/src/main/scala/tech/beshu/ror/utils/containers/windows/WindowsEsSetup.scala b/tests-utils/src/main/scala/tech/beshu/ror/utils/containers/windows/WindowsEsSetup.scala index 46828f7392..abf41bb559 100644 --- a/tests-utils/src/main/scala/tech/beshu/ror/utils/containers/windows/WindowsEsSetup.scala +++ b/tests-utils/src/main/scala/tech/beshu/ror/utils/containers/windows/WindowsEsSetup.scala @@ -39,8 +39,11 @@ object WindowsEsSetup extends LazyLogging { } def prepareEs(elasticsearch: Elasticsearch): Unit = { - downloadEsZipFileWithProgress(elasticsearch.esVersion) - withRetries(times = 3)(unzipEs(elasticsearch.esVersion, elasticsearch.config)) + // The ES zip file sometimes cannot be unzipped when running CI job. In that case we delete the downloaded file and try again. + withRetries(times = 3, cleanBeforeRetrying = cleanDownloadsDirectory(elasticsearch.esVersion)) { + downloadEsZipFileWithProgress(elasticsearch.esVersion) + unzipEs(elasticsearch.esVersion, elasticsearch.config) + } replaceConfigFile(elasticsearch) installPlugins(elasticsearch) } @@ -108,7 +111,7 @@ object WindowsEsSetup extends LazyLogging { val updated = file.lines.map(line => if (line.startsWith(prefix)) newLine else line) file.overwrite(updated.mkString("\n")) - private def withRetries(times: Int)(block: => Unit): Unit = { + private def withRetries(times: Int, cleanBeforeRetrying: => Unit)(block: => Unit): Unit = { @tailrec def loop(attempt: Int): Unit = { try { @@ -119,7 +122,10 @@ object WindowsEsSetup extends LazyLogging { if (nextAttempt > times) { throw e } else { - logger.error(s"Attempt $attempt failed: ${e.getMessage}, retrying...", e) + logger.error(s"Attempt $attempt failed: ${e.getMessage}", e) + logger.warn(s"Starting cleaning after failed attempt") + cleanBeforeRetrying + logger.warn(s"Retrying...") loop(nextAttempt) } } diff --git a/tests-utils/src/main/scala/tech/beshu/ror/utils/gradle/RorPluginGradleProject.scala b/tests-utils/src/main/scala/tech/beshu/ror/utils/gradle/RorPluginGradleProject.scala index af03e98137..0fa787581f 100644 --- a/tests-utils/src/main/scala/tech/beshu/ror/utils/gradle/RorPluginGradleProject.scala +++ b/tests-utils/src/main/scala/tech/beshu/ror/utils/gradle/RorPluginGradleProject.scala @@ -17,6 +17,7 @@ package tech.beshu.ror.utils.gradle import better.files.* +import com.typesafe.scalalogging.LazyLogging import org.gradle.tooling.GradleConnector import java.io.File as JFile @@ -48,7 +49,7 @@ object RorPluginGradleProject { .toList } -class RorPluginGradleProject(val moduleName: String) { +class RorPluginGradleProject(val moduleName: String) extends LazyLogging { private val project = esProject(moduleName) private val esProjectProperties = GradleProperties @@ -60,8 +61,10 @@ class RorPluginGradleProject(val moduleName: String) { .getOrElse(throw new IllegalStateException("cannot load root project gradle.properties file")) def assemble: Option[JFile] = { + logger.info(s"Assembling ROR in module $moduleName") runTask(moduleName + ":packageRorPlugin") val plugin = new JFile(project, "build/distributions/" + pluginName) + logger.info(s"Finished assembling ROR in module $moduleName") if (!plugin.exists) None else Some(plugin) } From edddf91a03fc9b62c6e75ccdbcaccde21ce3e858 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Goworko?= Date: Sat, 15 Nov 2025 15:54:57 +0100 Subject: [PATCH 3/8] qs --- .../beshu/ror/utils/containers/windows/WindowsEsSetup.scala | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests-utils/src/main/scala/tech/beshu/ror/utils/containers/windows/WindowsEsSetup.scala b/tests-utils/src/main/scala/tech/beshu/ror/utils/containers/windows/WindowsEsSetup.scala index abf41bb559..6b7c1ab75e 100644 --- a/tests-utils/src/main/scala/tech/beshu/ror/utils/containers/windows/WindowsEsSetup.scala +++ b/tests-utils/src/main/scala/tech/beshu/ror/utils/containers/windows/WindowsEsSetup.scala @@ -111,7 +111,7 @@ object WindowsEsSetup extends LazyLogging { val updated = file.lines.map(line => if (line.startsWith(prefix)) newLine else line) file.overwrite(updated.mkString("\n")) - private def withRetries(times: Int, cleanBeforeRetrying: => Unit)(block: => Unit): Unit = { + private def withRetries(maxRetries: Int, cleanBeforeRetrying: => Unit)(block: => Unit): Unit = { @tailrec def loop(attempt: Int): Unit = { try { @@ -119,7 +119,8 @@ object WindowsEsSetup extends LazyLogging { } catch { case e: Throwable => val nextAttempt = attempt + 1 - if (nextAttempt > times) { + if (nextAttempt > maxRetries) { + logger.error(s"Attempt $attempt failed: ${e.getMessage}. Retries exhausted, failing with exception.") throw e } else { logger.error(s"Attempt $attempt failed: ${e.getMessage}", e) From 6fd5c2484facccbdaaed673385c7c219234b5ee1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Goworko?= Date: Sat, 15 Nov 2025 15:59:43 +0100 Subject: [PATCH 4/8] qs --- .../beshu/ror/utils/containers/windows/WindowsEsSetup.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests-utils/src/main/scala/tech/beshu/ror/utils/containers/windows/WindowsEsSetup.scala b/tests-utils/src/main/scala/tech/beshu/ror/utils/containers/windows/WindowsEsSetup.scala index 6b7c1ab75e..e3b6134423 100644 --- a/tests-utils/src/main/scala/tech/beshu/ror/utils/containers/windows/WindowsEsSetup.scala +++ b/tests-utils/src/main/scala/tech/beshu/ror/utils/containers/windows/WindowsEsSetup.scala @@ -40,7 +40,7 @@ object WindowsEsSetup extends LazyLogging { def prepareEs(elasticsearch: Elasticsearch): Unit = { // The ES zip file sometimes cannot be unzipped when running CI job. In that case we delete the downloaded file and try again. - withRetries(times = 3, cleanBeforeRetrying = cleanDownloadsDirectory(elasticsearch.esVersion)) { + withRetries(maxRetries = 3, cleanBeforeRetrying = cleanDownloadsDirectory(elasticsearch.esVersion)) { downloadEsZipFileWithProgress(elasticsearch.esVersion) unzipEs(elasticsearch.esVersion, elasticsearch.config) } From 8fdc5b4b6afdb3464c8584835538ad449a7afa4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Goworko?= Date: Sat, 15 Nov 2025 16:26:09 +0100 Subject: [PATCH 5/8] qs --- .../utils/containers/windows/WindowsEsDirectoryManager.scala | 2 +- .../beshu/ror/utils/containers/windows/WindowsEsSetup.scala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests-utils/src/main/scala/tech/beshu/ror/utils/containers/windows/WindowsEsDirectoryManager.scala b/tests-utils/src/main/scala/tech/beshu/ror/utils/containers/windows/WindowsEsDirectoryManager.scala index fb27f59b21..437755d1d0 100644 --- a/tests-utils/src/main/scala/tech/beshu/ror/utils/containers/windows/WindowsEsDirectoryManager.scala +++ b/tests-utils/src/main/scala/tech/beshu/ror/utils/containers/windows/WindowsEsDirectoryManager.scala @@ -63,7 +63,7 @@ object WindowsEsDirectoryManager extends LazyLogging { } } - def cleanDownloadsDirectory(esVersion: String): Unit = { + def cleanDownloadsDirectory(): Unit = { logger.info(s"Removing all files from Windows ES downloads directory") os.remove.all(downloadsPath) } diff --git a/tests-utils/src/main/scala/tech/beshu/ror/utils/containers/windows/WindowsEsSetup.scala b/tests-utils/src/main/scala/tech/beshu/ror/utils/containers/windows/WindowsEsSetup.scala index e3b6134423..bfe30b5e75 100644 --- a/tests-utils/src/main/scala/tech/beshu/ror/utils/containers/windows/WindowsEsSetup.scala +++ b/tests-utils/src/main/scala/tech/beshu/ror/utils/containers/windows/WindowsEsSetup.scala @@ -40,7 +40,7 @@ object WindowsEsSetup extends LazyLogging { def prepareEs(elasticsearch: Elasticsearch): Unit = { // The ES zip file sometimes cannot be unzipped when running CI job. In that case we delete the downloaded file and try again. - withRetries(maxRetries = 3, cleanBeforeRetrying = cleanDownloadsDirectory(elasticsearch.esVersion)) { + withRetries(maxRetries = 3, cleanBeforeRetrying = cleanDownloadsDirectory()) { downloadEsZipFileWithProgress(elasticsearch.esVersion) unzipEs(elasticsearch.esVersion, elasticsearch.config) } From 47b4acf2a1c9b8f4421573f3a1e47082762b2d10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Goworko?= Date: Mon, 17 Nov 2025 21:49:49 +0100 Subject: [PATCH 6/8] qs --- .../containers/windows/WindowsEsSetup.scala | 28 ++------------- .../ror/utils/misc/EsStartupChecker.scala | 15 ++------ .../beshu/ror/utils/misc/ScalaUtils.scala | 34 ++++++++++++++----- 3 files changed, 29 insertions(+), 48 deletions(-) diff --git a/tests-utils/src/main/scala/tech/beshu/ror/utils/containers/windows/WindowsEsSetup.scala b/tests-utils/src/main/scala/tech/beshu/ror/utils/containers/windows/WindowsEsSetup.scala index bfe30b5e75..2705ac8c85 100644 --- a/tests-utils/src/main/scala/tech/beshu/ror/utils/containers/windows/WindowsEsSetup.scala +++ b/tests-utils/src/main/scala/tech/beshu/ror/utils/containers/windows/WindowsEsSetup.scala @@ -25,9 +25,9 @@ import tech.beshu.ror.utils.containers.images.Elasticsearch.Plugin.PluginInstall import tech.beshu.ror.utils.containers.windows.WindowsEsDirectoryManager.* import tech.beshu.ror.utils.containers.windows.WindowsEsPortProvider.* import tech.beshu.ror.utils.containers.windows.WindowsEsRunner.{WindowsEsProcess, startEs} +import tech.beshu.ror.utils.misc.ScalaUtils.retry import java.util.function.Consumer -import scala.annotation.tailrec import scala.language.postfixOps object WindowsEsSetup extends LazyLogging { @@ -40,7 +40,7 @@ object WindowsEsSetup extends LazyLogging { def prepareEs(elasticsearch: Elasticsearch): Unit = { // The ES zip file sometimes cannot be unzipped when running CI job. In that case we delete the downloaded file and try again. - withRetries(maxRetries = 3, cleanBeforeRetrying = cleanDownloadsDirectory()) { + retry(times = 3, cleanBeforeRetrying = cleanDownloadsDirectory()) { downloadEsZipFileWithProgress(elasticsearch.esVersion) unzipEs(elasticsearch.esVersion, elasticsearch.config) } @@ -111,28 +111,4 @@ object WindowsEsSetup extends LazyLogging { val updated = file.lines.map(line => if (line.startsWith(prefix)) newLine else line) file.overwrite(updated.mkString("\n")) - private def withRetries(maxRetries: Int, cleanBeforeRetrying: => Unit)(block: => Unit): Unit = { - @tailrec - def loop(attempt: Int): Unit = { - try { - block - } catch { - case e: Throwable => - val nextAttempt = attempt + 1 - if (nextAttempt > maxRetries) { - logger.error(s"Attempt $attempt failed: ${e.getMessage}. Retries exhausted, failing with exception.") - throw e - } else { - logger.error(s"Attempt $attempt failed: ${e.getMessage}", e) - logger.warn(s"Starting cleaning after failed attempt") - cleanBeforeRetrying - logger.warn(s"Retrying...") - loop(nextAttempt) - } - } - } - - loop(1) - } - } diff --git a/tests-utils/src/main/scala/tech/beshu/ror/utils/misc/EsStartupChecker.scala b/tests-utils/src/main/scala/tech/beshu/ror/utils/misc/EsStartupChecker.scala index 9bb5137fd7..5fe884a0ef 100644 --- a/tests-utils/src/main/scala/tech/beshu/ror/utils/misc/EsStartupChecker.scala +++ b/tests-utils/src/main/scala/tech/beshu/ror/utils/misc/EsStartupChecker.scala @@ -25,6 +25,7 @@ import org.apache.http.client.methods.HttpGet import tech.beshu.ror.utils.httpclient.HttpResponseHelper.deserializeJsonBody import tech.beshu.ror.utils.httpclient.RestClient import tech.beshu.ror.utils.misc.EsStartupChecker.{ClusterNotReady, Mode} +import tech.beshu.ror.utils.misc.ScalaUtils.retryBackoff import scala.concurrent.duration.* import scala.language.postfixOps @@ -35,24 +36,12 @@ class EsStartupChecker private(name: String, extends LazyLogging { def waitForStart(): Boolean = { - retryBackoff(clusterIsReady(client), maxRetries = 150, interval = 2 seconds) + retryBackoff(clusterIsReady(client), maxRetries = 150, firstDelay = 2 seconds, backOffScaler = 1) .map((_: Unit) => true) .onErrorRecover(_ => false) .runSyncUnsafe(5 minutes) } - private def retryBackoff[A](source: Task[A], - maxRetries: Int, - interval: FiniteDuration): Task[A] = { - source.onErrorHandleWith { - case ex: Exception => - if (maxRetries > 0) - retryBackoff(source, maxRetries - 1, interval).delayExecution(interval) - else - Task.raiseError(ex) - } - } - private def clusterIsReady(client: RestClient): Task[Unit] = { Resource .make( diff --git a/tests-utils/src/main/scala/tech/beshu/ror/utils/misc/ScalaUtils.scala b/tests-utils/src/main/scala/tech/beshu/ror/utils/misc/ScalaUtils.scala index dbc5278f6c..ca30c0fa2d 100644 --- a/tests-utils/src/main/scala/tech/beshu/ror/utils/misc/ScalaUtils.scala +++ b/tests-utils/src/main/scala/tech/beshu/ror/utils/misc/ScalaUtils.scala @@ -19,14 +19,16 @@ package tech.beshu.ror.utils.misc import java.time.Duration import cats.Functor import cats.implicits.* +import com.typesafe.scalalogging.LazyLogging import monix.eval.Task import java.time.format.DateTimeFormatter +import scala.annotation.tailrec import scala.concurrent.duration.* import scala.language.{implicitConversions, postfixOps} -import scala.util.{Success, Try} +import scala.util.Try -object ScalaUtils { +object ScalaUtils extends LazyLogging { implicit class StringOps(val value: String) extends AnyVal { def stripMarginAndReplaceWindowsLineBreak: String = { @@ -73,14 +75,28 @@ object ScalaUtils { implicit def finiteDurationToJavaDuration(interval: FiniteDuration): Duration = Duration.ofMillis(interval.toMillis) - def retry(times: Int)(action: Unit): Unit = { - LazyList - .fill(times)(()) - .foldLeft(Success(()): Try[Unit]) { - case (Success(_), _) => Try(action) - case (failure, _) => failure + def retry(times: Int, cleanBeforeRetrying: => Unit = ())(action: => Unit): Unit = { + @tailrec + def loop(attempt: Int): Unit = { + try { + action + } catch { + case e: Throwable => + val nextAttempt = attempt + 1 + if (nextAttempt > times) { + logger.error(s"Attempt $attempt failed: ${e.getMessage}. Retries exhausted, failing with exception.") + throw e + } else { + logger.error(s"Attempt $attempt failed: ${e.getMessage}", e) + logger.warn(s"Starting cleaning after failed attempt") + cleanBeforeRetrying + logger.warn(s"Retrying...") + loop(nextAttempt) + } } - .get + } + + loop(1) } def retryBackoff[A](source: Task[A], From e2039be011d174236bafeed78ff5ec475eb270ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Goworko?= Date: Wed, 19 Nov 2025 00:14:01 +0100 Subject: [PATCH 7/8] review change --- .../src/main/scala/tech/beshu/ror/utils/misc/ScalaUtils.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests-utils/src/main/scala/tech/beshu/ror/utils/misc/ScalaUtils.scala b/tests-utils/src/main/scala/tech/beshu/ror/utils/misc/ScalaUtils.scala index ca30c0fa2d..f680af7729 100644 --- a/tests-utils/src/main/scala/tech/beshu/ror/utils/misc/ScalaUtils.scala +++ b/tests-utils/src/main/scala/tech/beshu/ror/utils/misc/ScalaUtils.scala @@ -27,6 +27,7 @@ import scala.annotation.tailrec import scala.concurrent.duration.* import scala.language.{implicitConversions, postfixOps} import scala.util.Try +import scala.util.control.NonFatal object ScalaUtils extends LazyLogging { @@ -81,7 +82,7 @@ object ScalaUtils extends LazyLogging { try { action } catch { - case e: Throwable => + case NonFatal(e) => val nextAttempt = attempt + 1 if (nextAttempt > times) { logger.error(s"Attempt $attempt failed: ${e.getMessage}. Retries exhausted, failing with exception.") From 38fb13f2410d867c39c6fd40022d37547f06a459 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Goworko?= Date: Wed, 19 Nov 2025 00:16:22 +0100 Subject: [PATCH 8/8] bump pre --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 48687e86bb..9716bfead6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ publishedPluginVersion=1.67.2 -pluginVersion=1.68.0-pre8 +pluginVersion=1.68.0-pre9 pluginName=readonlyrest org.gradle.jvmargs=-Xmx6144m