Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): Bump org.springframework.boot from 3.1.5 to 3.2.0 #1048

Merged
merged 9 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/anchore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
steps:
- name: Checkout project
uses: actions/checkout@v4
- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
java-version: '21'
- name: Assemble project
uses: gradle/gradle-build-action@v2
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
java-version: '21'
cache: 'gradle'
- name: Cache SonarCloud packages
uses: actions/cache@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
java-version: '21'

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
2 changes: 1 addition & 1 deletion .sdkmanrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Enable auto-env through the sdkman_auto_env config
# Add key=value pairs of SDKs to use below
java=17.0.8-tem
java=21-tem
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pipeline {
agent any
tools {
jdk 'JDK 17'
jdk 'JDK 21'
}
environment {
EGM_CI_DH = credentials('egm-ci-dh')
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ The version number is obtained during the build process by using the `version` i
### Developing on a service

Requirements:
* Java 17 (we recommend using [sdkman!](https://sdkman.io/) to install and manage versions of the JDK)
* Java 21 (we recommend using [sdkman!](https://sdkman.io/) to install and manage versions of the JDK)

To develop on a specific service, you can use the provided `docker-compose.yml` file inside each service's directory, for instance:

Expand Down
4 changes: 2 additions & 2 deletions api-gateway/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# You can build a Docker image of the module with the following command:
# docker build --build-arg JAR_FILE=build/libs/api-gateway-{version}.jar -t stellio-api-gateway:{version} .
FROM eclipse-temurin:17-jre as builder
FROM eclipse-temurin:21-jre as builder
WORKDIR application
ARG JAR_FILE=build/libs/*.jar
COPY ${JAR_FILE} application.jar
RUN java -Djarmode=layertools -jar application.jar extract

FROM eclipse-temurin:17-jre
FROM eclipse-temurin:21-jre
WORKDIR application
COPY --from=builder application/dependencies/ ./
COPY --from=builder application/spring-boot-loader/ ./
Expand Down
6 changes: 5 additions & 1 deletion api-gateway/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ dependencies {
implementation("org.springframework.cloud:spring-cloud-starter-gateway")
implementation("org.zalando:logbook-spring-boot-webflux-autoconfigure:3.6.0")

detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:1.23.3")
// https://docs.gradle.org/8.4/userguide/upgrading_version_8.html#test_framework_implementation_dependencies
testImplementation("org.springframework.boot:spring-boot-starter-test")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")

detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:1.23.4")
}

springBoot {
Expand Down
21 changes: 10 additions & 11 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import com.google.cloud.tools.jib.gradle.PlatformParameters
import io.gitlab.arturbosch.detekt.Detekt
import io.gitlab.arturbosch.detekt.DetektCreateBaselineTask
Expand All @@ -11,21 +10,21 @@ buildscript {
}
}

extra["springCloudVersion"] = "2022.0.2"
extra["springCloudVersion"] = "2023.0.0-RC1"

plugins {
// https://docs.spring.io/spring-boot/docs/current/gradle-plugin/reference/htmlsingle/#reacting-to-other-plugins.java
java
`kotlin-dsl`
// only apply the plugin in the subprojects requiring it because it expects a Spring Boot app
// and the shared lib is obviously not one
id("org.springframework.boot") version "3.1.5" apply false
id("org.springframework.boot") version "3.2.0" apply false
id("io.spring.dependency-management") version "1.1.4" apply false
id("org.graalvm.buildtools.native") version "0.9.28"
kotlin("jvm") version "1.9.21" apply false
kotlin("plugin.spring") version "1.9.21" apply false
id("com.google.cloud.tools.jib") version "3.4.0" apply false
id("io.gitlab.arturbosch.detekt") version "1.23.3" apply false
id("io.gitlab.arturbosch.detekt") version "1.23.4" apply false
id("org.sonarqube") version "4.4.1.3373"
jacoco
}
Expand All @@ -42,7 +41,7 @@ subprojects {
apply(plugin = "io.gitlab.arturbosch.detekt")
apply(plugin = "jacoco")

java.sourceCompatibility = JavaVersion.VERSION_17
java.sourceCompatibility = JavaVersion.VERSION_21

the<DependencyManagementExtension>().apply {
imports {
Expand Down Expand Up @@ -87,8 +86,8 @@ subprojects {

tasks.withType<KotlinCompile> {
kotlinOptions {
freeCompilerArgs = listOf("-Xjsr305=strict", "-opt-in=kotlin.RequiresOptIn")
jvmTarget = "${JavaVersion.VERSION_17}"
freeCompilerArgs = listOf("-Xjsr305=strict")
jvmTarget = "${JavaVersion.VERSION_21}"
}
}
tasks.withType<Test> {
Expand All @@ -103,7 +102,7 @@ subprojects {
configurations.matching { it.name == "detekt" }.all {
resolutionStrategy.eachDependency {
if (requested.group == "org.jetbrains.kotlin") {
useVersion("1.9.10")
useVersion("1.9.21")
}
}
}
Expand All @@ -127,7 +126,7 @@ subprojects {

// see https://docs.gradle.org/current/userguide/jacoco_plugin.html for configuration instructions
jacoco {
toolVersion = "0.8.7"
toolVersion = "0.8.9"
}
tasks.test {
finalizedBy(tasks.jacocoTestReport) // report is always generated after tests run
Expand All @@ -140,7 +139,7 @@ subprojects {
}
}

project.ext.set("jibFromImage", "eclipse-temurin:17-jre")
project.ext.set("jibFromImage", "eclipse-temurin:21-jre")
project.ext.set(
"jibFromPlatforms",
listOf(
Expand All @@ -164,7 +163,7 @@ subprojects {
NGSI-LD is an Open API and data model specification for context management published by ETSI.
""".trimIndent(),
"org.opencontainers.image.source" to "https://github.com/stellio-hub/stellio-context-broker",
"com.java.version" to "${JavaVersion.VERSION_17}"
"com.java.version" to "${JavaVersion.VERSION_21}"
)
)
}
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
4 changes: 2 additions & 2 deletions search-service/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# You can build a Docker image of the module with the following command:
# docker build --build-arg JAR_FILE=build/libs/search-service-{version}.jar -t stellio-search-service:{version} .
FROM eclipse-temurin:17-jre as builder
FROM eclipse-temurin:21-jre as builder
WORKDIR application
ARG JAR_FILE=build/libs/*.jar
COPY ${JAR_FILE} application.jar
RUN java -Djarmode=layertools -jar application.jar extract

FROM eclipse-temurin:17-jre
FROM eclipse-temurin:21-jre
WORKDIR application
COPY --from=builder application/dependencies/ ./
COPY --from=builder application/spring-boot-loader/ ./
Expand Down
2 changes: 1 addition & 1 deletion search-service/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ dependencies {
implementation("org.json:json:20231013")
implementation(project(":shared"))

detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:1.23.3")
detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:1.23.4")

developmentOnly("org.springframework.boot:spring-boot-devtools")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@ import com.egm.stellio.shared.util.*
import com.egm.stellio.shared.util.AuthContextModel.AUTHORIZATION_API_DEFAULT_CONTEXTS
import com.egm.stellio.shared.util.AuthContextModel.AUTH_TERM_SAP
import com.egm.stellio.shared.util.JsonLdUtils.expandAttribute
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.test.runTest
import org.assertj.core.api.Assertions.assertThat
import org.junit.jupiter.api.Assertions
import org.junit.jupiter.api.Test

@OptIn(ExperimentalCoroutinesApi::class)
class AuthUtilsTests {

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@ import com.egm.stellio.shared.util.JsonLdUtils.NGSILD_CORE_CONTEXT
import com.egm.stellio.shared.util.shouldSucceedWith
import com.egm.stellio.shared.util.toUri
import io.mockk.spyk
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.test.runTest
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.fail

@OptIn(ExperimentalCoroutinesApi::class)
class AuthorizationServiceTests {

private val authorizationService = spyk(DisabledAuthorizationService())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import com.ninjasquad.springmockk.MockkBean
import io.mockk.coEvery
import io.mockk.coVerify
import io.mockk.coVerifyAll
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.test.runTest
import org.junit.jupiter.api.Assertions.*
import org.junit.jupiter.api.Test
Expand All @@ -30,7 +29,6 @@ import org.springframework.test.context.ActiveProfiles
import java.net.URI
import java.util.UUID

@OptIn(ExperimentalCoroutinesApi::class)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE, classes = [EnabledAuthorizationService::class])
@ActiveProfiles("test")
class EnabledAuthorizationServiceTests {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import io.mockk.Called
import io.mockk.coEvery
import io.mockk.coVerify
import io.r2dbc.postgresql.codec.Json
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.runBlocking
import kotlinx.coroutines.test.runTest
import org.junit.jupiter.api.AfterEach
Expand All @@ -36,7 +35,6 @@ import org.springframework.test.context.ActiveProfiles
import java.net.URI
import java.util.UUID

@OptIn(ExperimentalCoroutinesApi::class)
@SpringBootTest
@ActiveProfiles("test")
class EntityAccessRightsServiceTests : WithTimescaleContainer {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import com.egm.stellio.shared.util.*
import com.egm.stellio.shared.util.GlobalRole.STELLIO_ADMIN
import com.egm.stellio.shared.util.GlobalRole.STELLIO_CREATOR
import io.r2dbc.postgresql.codec.Json
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.test.runTest
import org.assertj.core.api.Assertions.assertThat
import org.junit.jupiter.api.AfterEach
Expand All @@ -21,7 +20,6 @@ import org.springframework.data.r2dbc.core.R2dbcEntityTemplate
import org.springframework.test.context.ActiveProfiles
import java.util.UUID

@OptIn(ExperimentalCoroutinesApi::class)
@SpringBootTest
@ActiveProfiles("test")
class SubjectReferentialServiceTests : WithTimescaleContainer {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package com.egm.stellio.search.config

import com.egm.stellio.shared.config.ApplicationProperties
import org.springframework.boot.test.context.TestConfiguration
import org.springframework.context.annotation.Bean
import org.springframework.security.oauth2.jwt.ReactiveJwtDecoder
import org.springframework.security.oauth2.jwt.ReactiveJwtDecoders

@TestConfiguration
class WebSecurityTestConfig(
private val applicationProperties: ApplicationProperties
) {

@Bean
fun jwtDecoder(): ReactiveJwtDecoder =
ReactiveJwtDecoders.fromOidcIssuerLocation(applicationProperties.tenants[0].issuer)
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,12 @@ import com.egm.stellio.shared.util.loadSampleData
import com.ninjasquad.springmockk.MockkBean
import io.mockk.coEvery
import io.mockk.coVerify
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.test.runTest
import org.junit.jupiter.api.Test
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.test.context.ActiveProfiles

@OptIn(ExperimentalCoroutinesApi::class)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE, classes = [IAMListener::class])
@ActiveProfiles("test")
class IAMListenerTests {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import com.egm.stellio.shared.model.JsonLdEntity
import com.egm.stellio.shared.util.*
import com.ninjasquad.springmockk.MockkBean
import io.mockk.*
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.Job
import kotlinx.coroutines.test.runTest
import org.junit.jupiter.api.Test
Expand All @@ -20,7 +19,6 @@ import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.test.context.ActiveProfiles

@OptIn(ExperimentalCoroutinesApi::class)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE, classes = [ObservationEventListener::class])
@ActiveProfiles("test")
class ObservationEventListenerTests {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import com.egm.stellio.search.util.deserializeAsMap
import com.egm.stellio.shared.model.PaginationQuery
import com.egm.stellio.shared.model.getScopes
import com.egm.stellio.shared.util.*
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.runBlocking
import kotlinx.coroutines.test.runTest
import org.assertj.core.api.Assertions.assertThat
Expand All @@ -25,7 +24,6 @@ import org.springframework.data.r2dbc.core.R2dbcEntityTemplate
import org.springframework.test.context.ActiveProfiles
import java.util.stream.Stream

@OptIn(ExperimentalCoroutinesApi::class)
@SpringBootTest
@ActiveProfiles("test")
class ScopeServiceTests : WithTimescaleContainer, WithKafkaContainer {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import com.egm.stellio.search.model.*
import com.egm.stellio.search.support.*
import com.egm.stellio.shared.model.OperationNotSupportedException
import com.egm.stellio.shared.util.*
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.test.runTest
import org.assertj.core.api.AbstractObjectAssert
import org.assertj.core.api.Assertions
Expand All @@ -24,7 +23,6 @@ import java.time.OffsetTime
import java.time.ZonedDateTime
import java.util.UUID

@OptIn(ExperimentalCoroutinesApi::class)
@SpringBootTest
@ActiveProfiles("test")
class AggregatedQueryServiceTests : WithTimescaleContainer, WithKafkaContainer {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import com.egm.stellio.shared.util.JsonUtils.deserializeAsList
import com.egm.stellio.shared.util.JsonUtils.deserializeAsMap
import io.mockk.spyk
import io.mockk.verify
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.runBlocking
import kotlinx.coroutines.test.runTest
import org.assertj.core.api.Assertions.assertThat
Expand All @@ -35,7 +34,6 @@ import java.time.ZoneOffset
import java.time.ZonedDateTime
import java.util.UUID

@OptIn(ExperimentalCoroutinesApi::class)
@SpringBootTest
@ActiveProfiles("test")
class AttributeInstanceServiceTests : WithTimescaleContainer, WithKafkaContainer {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import com.egm.stellio.shared.model.ResourceNotFoundException
import com.egm.stellio.shared.util.*
import com.egm.stellio.shared.util.JsonLdUtils.NGSILD_LOCATION_PROPERTY
import com.egm.stellio.shared.util.JsonLdUtils.NGSILD_LOCATION_TERM
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.runBlocking
import kotlinx.coroutines.test.runTest
import org.junit.jupiter.api.AfterEach
Expand All @@ -28,7 +27,6 @@ import org.springframework.test.context.ActiveProfiles
import java.time.Instant
import java.time.ZoneOffset

@OptIn(ExperimentalCoroutinesApi::class)
@SpringBootTest
@ActiveProfiles("test")
class AttributeServiceTests : WithTimescaleContainer, WithKafkaContainer {
Expand Down
Loading