Skip to content

Commit

Permalink
Fix JOOQ upgrade in Kork (#5163)
Browse files Browse the repository at this point in the history
* chore(dependencies): Autobump korkVersion

* chore(dependencies): updates required for JOOQ 3.14.x

Co-authored-by: root <root@292101d0d717>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
3 people committed Dec 15, 2020
1 parent a0eda0f commit f094a90
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ class SqlTableMetricsAgent(

val count = jooq.selectCount()
.from(table(tableName))
.fetchOne(0, Int::class.java)
.fetchSingle()
.value1()

registry.gauge(countId.withTag("type", type)).set(count.toDouble())
tableCount++
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,6 @@ abstract class SqlCacheSpec extends WriteableCacheSpec {
null || DSL.field("meowdy").eq("partner") || "meowdy = 'partner'"
RelationshipCacheFilter.include("instances", "images") || null || "(\n rel_type like 'instances%'\n or rel_type like 'images%'\n)"
RelationshipCacheFilter.include("images") || DSL.field("meowdy").eq("partner") || "(\n meowdy = 'partner'\n and rel_type like 'images%'\n)"
null || null || "1 = 1"
null || null || "true"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import com.netflix.spinnaker.kork.sql.test.SqlTestUtil
import de.huxhorn.sulky.ulid.ULID
import dev.minutest.junit.JUnit5Minutests
import dev.minutest.rootContext
import org.jooq.CloseableDSLContext
import org.jooq.SQLDialect
import org.jooq.impl.DSL.field
import org.jooq.impl.DSL.table
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class SqlTaskCleanupAgent(
)
.fetch()

val candidateTaskIds = candidates.map { r -> r.field("task_id").getValue(r).toString() }
val candidateTaskIds = candidates.map { r -> r.field("task_id")?.getValue(r)?.toString() }
.filterNotNull()
.toList()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,8 @@ class SqlEventRepository(

val remaining = jooq.selectCount().from(AGGREGATES_TABLE)
.withConditions(conditions)
.fetchOne(0, Int::class.java) - perPage
.fetchSingle()
.value1() - perPage

EventRepository.ListAggregatesResult(
aggregates = aggregates.map { it.model },
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
fiatVersion=1.26.0
korkVersion=7.93.0
korkVersion=7.94.2
org.gradle.parallel=true
spinnakerGradleVersion=8.10.0
targetJava11=true
Expand Down

0 comments on commit f094a90

Please sign in to comment.