Skip to content

Commit

Permalink
chore: update dependencies to the latest (#1835)
Browse files Browse the repository at this point in the history
  • Loading branch information
dariuszkuc authored Sep 12, 2023
1 parent 3903664 commit ff88dad
Show file tree
Hide file tree
Showing 9 changed files with 51 additions and 49 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/graalvm-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ on:

jobs:
graalvm-integration:
timeout-minutes: 20
timeout-minutes: 60
runs-on: ubuntu-latest
defaults:
run:
working-directory: integration/graalvm
strategy:
max-parallel: 1
matrix:
server: ['ktor-graalvm-server', 'maven-graalvm-server', 'spring-graalvm-server']

Expand All @@ -29,15 +30,16 @@ jobs:
- name: Setup GraalVM
uses: graalvm/setup-graalvm@v1
with:
version: '22.3.1'
java-version: '17'
distribution: 'graalvm'
components: 'native-image'
native-image-job-reports: 'true'

- name: Set up Gradle cache
uses: gradle/gradle-build-action@v2

- name: Build native image
timeout-minutes: 20
id: build_server
run: |
./gradlew :${server}:buildGraalVmNativeImage
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2021 Expedia, Inc
* Copyright 2023 Expedia, Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -28,11 +28,12 @@ import graphql.execution.DataFetcherExceptionHandlerResult
import graphql.execution.ResultPath
import graphql.language.SourceLocation
import org.slf4j.LoggerFactory
import java.util.concurrent.CompletableFuture

class CustomDataFetcherExceptionHandler : DataFetcherExceptionHandler {
private val log = LoggerFactory.getLogger(CustomDataFetcherExceptionHandler::class.java)

override fun onException(handlerParameters: DataFetcherExceptionHandlerParameters): DataFetcherExceptionHandlerResult {
override fun handleException(handlerParameters: DataFetcherExceptionHandlerParameters): CompletableFuture<DataFetcherExceptionHandlerResult> {
val exception = handlerParameters.exception
val sourceLocation = handlerParameters.sourceLocation
val path = handlerParameters.path
Expand All @@ -49,8 +50,8 @@ class CustomDataFetcherExceptionHandler : DataFetcherExceptionHandler {
}

log.warn(error.message, exception)

return DataFetcherExceptionHandlerResult.newResult().error(error).build()
val exceptionResult = DataFetcherExceptionHandlerResult.newResult().error(error).build()
return CompletableFuture.completedFuture(exceptionResult)
}
}

Expand Down
34 changes: 17 additions & 17 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
[versions]
android-plugin = "8.0.2"
classgraph = "4.8.160"
android-plugin = "8.1.1"
classgraph = "4.8.162"
dataloader = "3.2.0"
federation = "3.0.1"
graphql-java = "20.2"
graalvm = "0.9.21"
jackson = "2.15.0"
federation = "4.1.0"
graphql-java = "21.1"
graalvm = "0.9.25"
jackson = "2.15.2"
# kotlin version has to match the compile-testing compiler version
kotlin = "1.8.22"
# TODO kotlin 1.9 upgrade -> kotlinx-benchaamrk 0.4.9+ uses kotlin 1.9
kotlinx-benchmark = "0.4.8"
kotlinx-coroutines = "1.7.3"
# TODO kotlin 1.9 upgrade -> kotlinx-serialization 1.6.0+ uses kotlin 1.9
kotlinx-serialization = "1.5.1"
ktor = "2.3.3"
ktor = "2.3.4"
maven-plugin-annotation = "3.9.0"
maven-plugin-api = "3.9.2"
maven-plugin-api = "3.9.4"
maven-project = "2.2.1"
poet = "1.14.2"
## reactor and spring versions should be the same as defined in spring-boot-dependencies
reactor-core = "3.5.6"
reactor-core = "3.5.9"
reactor-extensions = "1.2.2"
slf4j = "2.0.7"
spring = "6.0.9"
spring-boot = "3.1.0"
spring = "6.0.11"
spring-boot = "3.1.2"

# test dependencies
compile-testing = "0.3.2"
icu = "73.1"
junit = "5.9.3"
logback = "1.4.7"
icu = "73.2"
junit = "5.10.0"
logback = "1.4.11"
mockk = "1.13.7"
rxjava = "3.1.6"
wiremock = "2.35.0"
rxjava = "3.1.7"
wiremock = "3.0.1"

# plugins
# TODO kotlin 1.9 upgrade -> detekt 1.23.1+ uses kotlin 1.9
Expand All @@ -44,7 +44,7 @@ ktlint-core = "0.45.2"
ktlint-plugin = "10.3.0"
maven-plugin-development = "0.4.2"
nexus-publish-plugin = "1.3.0"
plugin-publish = "1.2.0"
plugin-publish = "1.2.1"

# ====================
# LIBRARIES
Expand Down
8 changes: 4 additions & 4 deletions integration/graalvm/common-graalvm-server/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

@Suppress("DSL_SCOPE_VIOLATION") // TODO: remove once KTIJ-19369 / Gradle#22797 is fixed
plugins {
alias(libs.plugins.kotlin.jvm)
Expand All @@ -11,8 +9,10 @@ dependencies {
implementation("com.expediagroup", "graphql-kotlin-hooks-provider")
}

tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "17"
tasks {
kotlin {
jvmToolchain(17)
}
}

// required for maven test
Expand Down
2 changes: 1 addition & 1 deletion integration/graalvm/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
group = com.expediagroup.graalvm

org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g
org.gradle.jvmargs=-Xmx6g -XX:MaxMetaspaceSize=2g
org.gradle.caching=true
org.gradle.parallel=true

14 changes: 7 additions & 7 deletions integration/graalvm/ktor-graalvm-server/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ dependencies {
testImplementation(libs.ktor.server.test.host)
}

tasks.test {
useJUnitPlatform()
}

tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "17"
tasks {
kotlin {
jvmToolchain(17)
}
test {
useJUnitPlatform()
}
}

application {
mainClass.set("com.expediagroup.graalvm.ktor.ApplicationKt")
}
Expand Down
10 changes: 5 additions & 5 deletions integration/graalvm/maven-graalvm-server/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ dependencies {
testImplementation(libs.ktor.server.test.host)
}

tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "17"
}

tasks {
kotlin {
jvmToolchain(17)
}

val kotlinJvmVersion: String by project
/*
integration test is run by invoking maven directly
Expand All @@ -45,7 +45,7 @@ tasks {
val buildGraalVmNativeImage by register("buildGraalVmNativeImage") {
dependsOn(gradle.includedBuild("graphql-kotlin").task(":resolveIntegrationTestDependencies"))
dependsOn(":common-graalvm-server:publishToMavenLocal")
timeout.set(Duration.ofSeconds(500))
timeout.set(Duration.ofSeconds(1200))
doLast {
exec {
environment(mavenEnvironmentVariables)
Expand Down
14 changes: 7 additions & 7 deletions integration/graalvm/spring-graalvm-server/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import com.expediagroup.graphql.plugin.gradle.graphql
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

@Suppress("DSL_SCOPE_VIOLATION") // TODO: remove once KTIJ-19369 / Gradle#22797 is fixed
plugins {
Expand All @@ -19,12 +18,13 @@ dependencies {
testImplementation(libs.spring.boot.test)
}

tasks.test {
useJUnitPlatform()
}

tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "17"
tasks {
kotlin {
jvmToolchain(17)
}
test {
useJUnitPlatform()
}
}

graalvmNative {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ abstract class GraphQLGraalVmMetadataTask : SourceTask() {

@TaskAction
fun generateMetadata() {
println("executing task")
val packages = packages.get()
if (packages.isEmpty()) {
throw RuntimeException("attempt to generate SDL failed - missing required supportedPackages property")
Expand All @@ -91,7 +90,7 @@ abstract class GraphQLGraalVmMetadataTask : SourceTask() {
logger.debug("worker classpath: \n${workerSpec.classpath.files.joinToString("\n")}")
}

logger.debug("submitting work item to generate GraalVM for the schema included in packages = $packages")
logger.debug("submitting work item to generate GraalVM for the schema included in packages = {}", packages)
workQueue.submit(GenerateGraalVmMetadataAction::class.java) { parameters ->
parameters.supportedPackages.set(packages)
parameters.mainClassName.set(mainClassName.orNull)
Expand Down

0 comments on commit ff88dad

Please sign in to comment.