Skip to content

Commit 281af82

Browse files
lbloderadinauerlcian
authored andcommitted
[WIP] test with spring boot 3.5.0 (#4111)
* Bump Spring Boot to 3.4.1 * changelog * update to spring boot 3.4.2 * fix jdbc dependencies for jakarta samples * update readme * update logback dependency in jakarta samples * [WIP] test with spring boot 3.5.0 * Update buildSrc/src/main/java/Config.kt * adapt to breaking change in spring-graphql-1.4.0, fix test, add withOptions to sample * bump to Spring Boot 3.5.0 * trigger CI? * update spring boot version in toml * move changelog * revert maven milestone repos * fix changelog * restore old changelog entry * fix gh pr link --------- Co-authored-by: Alexander Dinauer <alexander.dinauer@sentry.io> Co-authored-by: Alexander Dinauer <adinauer@users.noreply.github.com> Co-authored-by: Lorenzo Cian <lorenzo.cian@sentry.io>
1 parent b07fe07 commit 281af82

File tree

6 files changed

+14
-9
lines changed

6 files changed

+14
-9
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
- `SentryAttribute.stringAttribute()` takes a `String` value
2222
- We opted for handling parameters via `SentryLogParameters` to avoid creating tons of overloads that are ambiguous.
2323

24+
### Dependencies
25+
26+
- Bump Spring Boot to `3.5.0` ([#4111](https://github.com/getsentry/sentry-java/pull/4111))
27+
2428
## 8.12.0
2529

2630
### Features

buildSrc/src/main/java/Config.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ object Config {
66
val kotlinStdLib = "stdlib-jdk8"
77

88
val springBootVersion = "2.7.18"
9-
val springBoot3Version = "3.4.2"
9+
val springBoot3Version = "3.5.0"
1010
val kotlinCompatibleLanguageVersion = "1.6"
1111

1212
val androidComposeCompilerVersion = "1.5.14"

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ otelInstrumentationAlpha = "2.10.0-alpha"
1414
# check https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/dependencyManagement/build.gradle.kts#L49 for release version above to find a compatible version
1515
otelSemanticConvetions = "1.28.0-alpha"
1616
springTwo = "2.7.18"
17-
springThree = "3.4.2"
17+
springThree = "3.5.0"
1818
targetSdk = "34"
1919
compileSdk = "34"
2020
minSdk = "21"

sentry-samples/sentry-samples-spring-boot-jakarta/src/main/java/io/sentry/samples/spring/boot/jakarta/graphql/TaskCreatorController.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ public TaskCreatorController(final BatchLoaderRegistry batchLoaderRegistry) {
2020
// using mapped BatchLoader to not have to deal with correct ordering of items
2121
batchLoaderRegistry
2222
.forTypePair(String.class, ProjectController.Creator.class)
23+
.withOptions((builder) -> builder.setBatchingEnabled(true))
2324
.registerMappedBatchLoader(
2425
(Set<String> keys, BatchLoaderEnvironment env) -> {
2526
return Mono.fromCallable(

sentry-spring-jakarta/src/main/java/io/sentry/spring/jakarta/graphql/SentryBatchLoaderRegistry.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public BatchLoaderRegistry.RegistrationSpec<K, V> withName(String name) {
7676

7777
@Override
7878
public BatchLoaderRegistry.RegistrationSpec<K, V> withOptions(
79-
Consumer<DataLoaderOptions> optionsConsumer) {
79+
Consumer<DataLoaderOptions.Builder> optionsConsumer) {
8080
return delegate.withOptions(optionsConsumer);
8181
}
8282

sentry-spring-jakarta/src/test/kotlin/io/sentry/spring/jakarta/graphql/SentrySpringSubscriptionHandlerTest.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
package io.sentry.spring.graphql
1+
package io.sentry.spring.jakarta.graphql
22

33
import graphql.execution.instrumentation.parameters.InstrumentationFieldFetchParameters
44
import graphql.language.Document
55
import graphql.language.OperationDefinition
66
import graphql.schema.DataFetchingEnvironment
77
import io.sentry.IScopes
88
import io.sentry.graphql.ExceptionReporter
9-
import io.sentry.spring.jakarta.graphql.SentrySpringSubscriptionHandler
109
import org.junit.jupiter.api.assertThrows
1110
import org.mockito.kotlin.anyOrNull
11+
import org.mockito.kotlin.check
1212
import org.mockito.kotlin.mock
1313
import org.mockito.kotlin.same
1414
import org.mockito.kotlin.verify
@@ -40,10 +40,10 @@ class SentrySpringSubscriptionHandlerTest {
4040

4141
verify(exceptionReporter).captureThrowable(
4242
same(exception),
43-
org.mockito.kotlin.check {
43+
check {
4444
assertEquals(true, it.isSubscription)
4545
assertSame(scopes, it.scopes)
46-
assertEquals("query testQuery\n", it.query)
46+
assertEquals("query testQuery \n", it.query)
4747
},
4848
anyOrNull()
4949
)
@@ -69,10 +69,10 @@ class SentrySpringSubscriptionHandlerTest {
6969

7070
verify(exceptionReporter).captureThrowable(
7171
same(exception),
72-
org.mockito.kotlin.check {
72+
check {
7373
assertEquals(true, it.isSubscription)
7474
assertSame(scopes, it.scopes)
75-
assertEquals("query testQuery\n", it.query)
75+
assertEquals("query testQuery \n", it.query)
7676
},
7777
anyOrNull()
7878
)

0 commit comments

Comments
 (0)