Skip to content

Commit 114edc1

Browse files
authored
Merge pull request #165 from RADAR-base/release-1.1.3
Release 1.1.3
2 parents c759a04 + a0e5617 commit 114edc1

File tree

5 files changed

+31
-32
lines changed

5 files changed

+31
-32
lines changed

.github/workflows/snyk.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ on:
33
pull_request:
44
branches:
55
- master
6+
- dev
67

78
jobs:
89
security:

buildSrc/src/main/kotlin/Versions.kt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@Suppress("ConstPropertyName", "MemberVisibilityCanBePrivate")
22
object Versions {
3-
const val project = "1.1.2"
3+
const val project = "1.1.3"
44

55
object Plugins {
66
const val licenseReport = "2.5"
@@ -14,17 +14,17 @@ object Versions {
1414
}
1515

1616
const val java = 17
17-
const val slf4j = "2.0.9"
18-
const val confluent = "7.5.0"
19-
const val kafka = "7.5.0-ce"
17+
const val slf4j = "2.0.13"
18+
const val confluent = "7.6.0"
19+
const val kafka = "${confluent}-ce"
2020
const val avro = "1.11.3"
21-
const val jackson = "2.15.2"
22-
const val okhttp = "4.11.0"
21+
const val jackson = "2.15.3"
22+
const val okhttp = "4.12.0"
2323
const val junit = "5.10.0"
2424
const val mockito = "5.5.0"
2525
const val mockitoKotlin = "5.1.0"
2626
const val hamcrest = "2.2"
27-
const val radarSchemas = "0.8.4"
27+
const val radarSchemas = "0.8.8"
2828
const val opencsv = "5.8"
2929
const val ktor = "2.3.4"
3030
const val coroutines = "1.7.3"

radar-commons-gradle/build.gradle.kts

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ plugins {
55
`kotlin-dsl`
66
`java-gradle-plugin`
77
// Match to the versions in the bottom of this file
8-
kotlin("jvm") version "1.9.21"
8+
kotlin("jvm") version "1.9.24"
99
`maven-publish`
10-
id("io.github.gradle-nexus.publish-plugin") version "2.0.0-rc-1"
10+
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
1111
id("org.jetbrains.dokka") version "1.9.10"
1212
signing
1313
}
1414

15-
version = "1.1.2"
15+
version = Versions.project
1616
group = "org.radarbase"
1717
description = "RADAR-base common Gradle plugin setup"
1818

@@ -176,7 +176,7 @@ tasks.withType<PublishToMavenRepository> {
176176
// They should be copied from the Versions.kt file directly to maintain consistency.
177177
@Suppress("ConstPropertyName", "MemberVisibilityCanBePrivate")
178178
object Versions {
179-
const val project = "1.1.2"
179+
const val project = "1.1.3"
180180

181181
object Plugins {
182182
const val licenseReport = "2.5"
@@ -190,17 +190,17 @@ object Versions {
190190
}
191191

192192
const val java = 17
193-
const val slf4j = "2.0.9"
194-
const val confluent = "7.5.0"
195-
const val kafka = "7.5.0-ce"
193+
const val slf4j = "2.0.13"
194+
const val confluent = "7.6.0"
195+
const val kafka = "${confluent}-ce"
196196
const val avro = "1.11.3"
197-
const val jackson = "2.15.2"
198-
const val okhttp = "4.11.0"
197+
const val jackson = "2.15.3"
198+
const val okhttp = "4.12.0"
199199
const val junit = "5.10.0"
200200
const val mockito = "5.5.0"
201201
const val mockitoKotlin = "5.1.0"
202202
const val hamcrest = "2.2"
203-
const val radarSchemas = "0.8.4"
203+
const val radarSchemas = "0.8.8"
204204
const val opencsv = "5.8"
205205
const val ktor = "2.3.4"
206206
const val coroutines = "1.7.3"
@@ -210,4 +210,3 @@ object Versions {
210210
const val gradleVersionsPlugin = "0.50.0"
211211
const val ktlint = "12.0.3"
212212
}
213-

radar-commons/src/main/java/org/radarbase/producer/schema/SchemaRestClient.kt

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,10 @@ package org.radarbase.producer.schema
22

33
import io.ktor.client.HttpClient
44
import io.ktor.client.call.body
5+
import io.ktor.client.plugins.auth.*
6+
import io.ktor.client.plugins.auth.providers.*
57
import io.ktor.client.plugins.contentnegotiation.ContentNegotiation
6-
import io.ktor.client.plugins.defaultRequest
7-
import io.ktor.client.request.HttpRequestBuilder
8-
import io.ktor.client.request.accept
9-
import io.ktor.client.request.request
10-
import io.ktor.client.request.setBody
11-
import io.ktor.client.request.url
8+
import io.ktor.client.request.*
129
import io.ktor.http.ContentType
1310
import io.ktor.http.HttpMethod
1411
import io.ktor.http.contentType
@@ -21,13 +18,15 @@ import kotlinx.coroutines.withContext
2118
import kotlinx.serialization.json.Json
2219
import org.apache.avro.Schema
2320
import org.radarbase.producer.rest.RestException.Companion.toRestException
21+
import org.slf4j.LoggerFactory
2422
import java.io.IOException
23+
import java.net.URI
2524
import kotlin.coroutines.CoroutineContext
2625

2726
/** REST client for Confluent schema registry. */
2827
class SchemaRestClient(
2928
httpClient: HttpClient,
30-
baseUrl: String,
29+
private val baseUrl: String,
3130
private val ioContext: CoroutineContext = Dispatchers.IO,
3231
) {
3332
private val httpClient: HttpClient = httpClient.config {
@@ -39,10 +38,6 @@ class SchemaRestClient(
3938
},
4039
)
4140
}
42-
defaultRequest {
43-
url(baseUrl)
44-
accept(ContentType.Application.Json)
45-
}
4641
}
4742

4843
suspend inline fun <reified T> request(
@@ -88,7 +83,7 @@ class SchemaRestClient(
8883
@Throws(IOException::class)
8984
suspend fun schemaGet(path: String): SchemaMetadata = request {
9085
method = HttpMethod.Get
91-
url(path)
86+
url(URI(baseUrl).resolve(path).toString())
9287
}
9388

9489
@Throws(IOException::class)
@@ -97,7 +92,7 @@ class SchemaRestClient(
9792
schema: Schema,
9893
): SchemaMetadata = request {
9994
method = HttpMethod.Post
100-
url(path)
95+
url(URI(baseUrl).resolve(path).toString())
10196
contentType(ContentType.Application.Json)
10297
setBody(SchemaMetadata(schema = schema.toString()))
10398
}
@@ -132,4 +127,8 @@ class SchemaRestClient(
132127
schemaGet("/schemas/ids/$id")
133128
.toParsedSchemaMetadata(id)
134129
.schema
130+
131+
companion object {
132+
private val logger = LoggerFactory.getLogger(SchemaRestClient::class.java)
133+
}
135134
}

radar-commons/src/main/java/org/radarbase/producer/schema/SchemaRetriever.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,8 @@ open class SchemaRetriever(config: Config) {
205205
@RadarProducerDsl
206206
class Config(
207207
val baseUrl: String,
208+
var httpClient: HttpClient? = null,
208209
) {
209-
var httpClient: HttpClient? = null
210210
var schemaTimeout: CacheConfig = DEFAULT_SCHEMA_TIMEOUT_CONFIG
211211
var ioContext: CoroutineContext = Dispatchers.IO
212212
fun httpClient(config: HttpClientConfig<*>.() -> Unit) {

0 commit comments

Comments
 (0)