Skip to content

Commit

Permalink
bump(deps): major version updates in /scheduler/data-flow (#5639)
Browse files Browse the repository at this point in the history
- bump kotlin language version 1.8.20 -> 1.9.21
- bump kotlinx-coroutines-core 1.7.3 -> 1.8.1
- bump io.grpc:grpc-* 1.63.0 -> 1.64.0

The only remaining update that we would like to make to dataflow is bumping
JDK 17 -> JDK 21. However, that update is currently blocked by the
requirements of kafka-streams; The confluent platform libraries that we're
using (kafka-streams:7.6.1-ccs) have only been tested up to JDK 17 according
to: https://docs.confluent.io/platform/current/installation/versions-interoperability.html#java
  • Loading branch information
lc525 committed May 24, 2024
1 parent bd0b2ed commit 06fa148
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
12 changes: 6 additions & 6 deletions scheduler/data-flow/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id("com.github.hierynomus.license-report") version "0.16.1"
id("com.github.johnrengelman.shadow") version "8.1.1"
kotlin("jvm") version "1.8.20" // the kotlin version
id("org.jlleitschuh.gradle.ktlint") version "12.1.0"
kotlin("jvm") version "1.9.21" // the kotlin version
id("org.jlleitschuh.gradle.ktlint") version "12.1.1"
java
application
}
Expand All @@ -33,12 +33,12 @@ dependencies {

// gRPC
implementation("io.grpc:grpc-kotlin-stub:1.4.1")
implementation("io.grpc:grpc-stub:1.63.0")
implementation("io.grpc:grpc-protobuf:1.63.0")
runtimeOnly("io.grpc:grpc-netty-shaded:1.63.0")
implementation("io.grpc:grpc-stub:1.64.0")
implementation("io.grpc:grpc-protobuf:1.64.0")
runtimeOnly("io.grpc:grpc-netty-shaded:1.64.0")
implementation("com.google.protobuf:protobuf-java:3.25.3")
implementation("com.google.protobuf:protobuf-kotlin:3.25.3")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.1")
implementation("com.michael-bull.kotlin-retry:kotlin-retry:2.0.1")

// k8s
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ the Change License after the Change Date as each is defined in accordance with t
package io.seldon.dataflow

import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.FlowPreview
import kotlinx.coroutines.async
import kotlinx.coroutines.flow.DEFAULT_CONCURRENCY
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.flatMapMerge
import kotlinx.coroutines.flow.flow

@OptIn(FlowPreview::class)
@OptIn(FlowPreview::class, ExperimentalCoroutinesApi::class)
suspend fun <T, R> Flow<T>.parallel(
scope: CoroutineScope,
concurrency: Int = DEFAULT_CONCURRENCY,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ the Change License after the Change Date as each is defined in accordance with t

package io.seldon.dataflow

import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.FlowPreview
import kotlinx.coroutines.async
import kotlinx.coroutines.flow.asFlow
Expand Down Expand Up @@ -37,6 +38,7 @@ internal class PipelineSubscriberTest {
}
}

@OptIn(ExperimentalCoroutinesApi::class)
@Test
fun `should run ops concurrently`() {
val xs = (1..10).asFlow()
Expand All @@ -58,7 +60,7 @@ internal class PipelineSubscriberTest {
}

@Test
fun `should run ops in parallel`() {
fun `should run ops concurrently using custom Flow type extension`() {
suspend fun waitAndPrint(i: Int) {
kotlinx.coroutines.delay(1000)
println("${LocalDateTime.now()} - $i")
Expand Down

0 comments on commit 06fa148

Please sign in to comment.