From a4360d703f9788f5eae66553108c7db9c82ca794 Mon Sep 17 00:00:00 2001 From: Nicolas F Rouquette Date: Sun, 21 Jul 2019 13:20:24 -0700 Subject: [PATCH] Add explicit argument for maximumObjectLength indirectly used in watchWithOptions as bufsize --- client/src/main/scala/skuber/api/client/KubernetesClient.scala | 2 ++ .../scala/skuber/api/client/impl/KubernetesClientImpl.scala | 2 ++ 2 files changed, 4 insertions(+) diff --git a/client/src/main/scala/skuber/api/client/KubernetesClient.scala b/client/src/main/scala/skuber/api/client/KubernetesClient.scala index 5240526c..5ce95a82 100644 --- a/client/src/main/scala/skuber/api/client/KubernetesClient.scala +++ b/client/src/main/scala/skuber/api/client/KubernetesClient.scala @@ -380,6 +380,7 @@ trait KubernetesClient { * @param podCompletion a callback invoked at the completion of the job's pod (successful or not), after which the job will be deleted * @param watchContinuouslyRequestTimeout the delay for continuously monitoring the pod progress * @param deletionMonitorRepeatDelay the delay for continuously monitoring the job deletion + * @param bufSize optional buffer size for received object updates, normally the default is more than enough * @param pool a skuber pool to reuse, if any, or to create otherwise * @return A future consisting of a triple of the following: * - the skuber pool suitable for subsequently executing other jobs on the same server @@ -393,6 +394,7 @@ trait KubernetesClient { podCompletion: WatchEvent[Pod] => Future[Unit], watchContinuouslyRequestTimeout: Duration, deletionMonitorRepeatDelay: FiniteDuration, + bufSize: Int = 10000, pool: Option[Pool[WatchSource.Start[Pod]]])(implicit jfmt: Format[Job], pfmt: Format[Pod], jrd: ResourceDefinition[Job], prd: ResourceDefinition[Pod]): Future[(Pool[WatchSource.Start[Pod]], Option[Http.HostConnectionPool], WatchEvent[Pod])] diff --git a/client/src/main/scala/skuber/api/client/impl/KubernetesClientImpl.scala b/client/src/main/scala/skuber/api/client/impl/KubernetesClientImpl.scala index 76915ed4..e3ca4ac1 100644 --- a/client/src/main/scala/skuber/api/client/impl/KubernetesClientImpl.scala +++ b/client/src/main/scala/skuber/api/client/impl/KubernetesClientImpl.scala @@ -642,6 +642,7 @@ class KubernetesClientImpl private[client] ( podCompletion: WatchEvent[Pod] => Future[Unit], watchContinuouslyRequestTimeout: Duration, deletionMonitorRepeatDelay: FiniteDuration, + bufSize: Int = 10000, pool: Option[Pool[WatchSource.Start[Pod]]])(implicit jfmt: Format[Job], pfmt: Format[Pod], jrd: ResourceDefinition[Job], prd: ResourceDefinition[Pod]) : Future[(Pool[WatchSource.Start[Pod]], Option[Http.HostConnectionPool], WatchEvent[Pod])] = for { @@ -652,6 +653,7 @@ class KubernetesClientImpl private[client] ( labelSelector = Some(labelSelector), timeoutSeconds = Some(watchContinuouslyRequestTimeout.toSeconds) ), + bufsize = bufSize, pool = pool ) .takeWhile(podProgress, inclusive = true)