Skip to content

Commit

Permalink
Add explicit argument for maximumObjectLength indirectly used in watc…
Browse files Browse the repository at this point in the history
…hWithOptions as bufsize
  • Loading branch information
NicolasRouquette committed Jul 21, 2019
1 parent b46e2b1 commit a4360d7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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])]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -652,6 +653,7 @@ class KubernetesClientImpl private[client] (
labelSelector = Some(labelSelector),
timeoutSeconds = Some(watchContinuouslyRequestTimeout.toSeconds)
),
bufsize = bufSize,
pool = pool
)
.takeWhile(podProgress, inclusive = true)
Expand Down

0 comments on commit a4360d7

Please sign in to comment.