Skip to content

Fix tests for Spring 7 and Spring Boot 4 #4614

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

Open
wants to merge 10 commits into
base: 08-04-attempt_to_fix_kotlin_2.2_issue
Choose a base branch
from

Conversation

adinauer
Copy link
Member

@adinauer adinauer commented Aug 7, 2025

📜 Description

  • Fix tests that require updating due to the Kotlin/Spring/Boot update.
  • Fix tests that check for SDK name to test for the new names.

💡 Motivation and Context

💚 How did you test it?

📝 Checklist

  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

Copy link
Contributor

github-actions bot commented Aug 7, 2025

Fails
🚫 Please consider adding a changelog entry for the next release.

Instructions and example for changelog

Please add an entry to CHANGELOG.md to the "Unreleased" section. Make sure the entry includes this PR's number.

Example:

## Unreleased

- Fix tests for Spring 7 and Spring Boot 4 ([#4614](https://github.com/getsentry/sentry-java/pull/4614))

If none of the above apply, you can opt out of this check by adding #skip-changelog to the PR description.

Generated by 🚫 dangerJS against 38f6bd2

Base automatically changed from 08-07-third_attempt_at_fixing_kotlin_2.2_compat to 08-06-second_attempt_to_fix_kotlin_2.2 August 7, 2025 14:34
Base automatically changed from 08-06-second_attempt_to_fix_kotlin_2.2 to 08-04-attempt_to_fix_kotlin_2.2_issue August 7, 2025 14:35
Copy link
Member

@lcian lcian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test changes look good to me.
It seems that this unfortunately got intertwined with the Kotlin fixes. I've pointed out the places where the build files look odd, so let's please remember to address those before merging.

build.gradle.kts Outdated
Comment on lines 21 to 25
alias(libs.plugins.kotlin.multiplatform) apply false
alias(libs.plugins.kotlin.jvm) apply false
// alias(libs.plugins.kotlin.jvm.spring7) apply false
alias(libs.plugins.kotlin.spring) apply false
// alias(libs.plugins.kotlin.spring7) apply false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something to update?

@@ -5,8 +5,10 @@ import org.springframework.boot.gradle.plugin.SpringBootPlugin
plugins {
`java-library`
id("io.sentry.javadoc")
kotlin("jvm")
// alias(libs.plugins.kotlin.jvm)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// alias(libs.plugins.kotlin.jvm)

@@ -5,7 +5,8 @@ import org.gradle.internal.extensions.stdlib.capitalized

plugins {
id("com.android.application")
kotlin("android")
alias(libs.plugins.kotlin.android)
// alias(libs.plugins.kotlin.compose)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// alias(libs.plugins.kotlin.compose)

@@ -4,7 +4,8 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask

plugins {
id("com.android.library")
kotlin("android")
alias(libs.plugins.kotlin.android)
// alias(libs.plugins.kotlin.compose)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// alias(libs.plugins.kotlin.compose)

@@ -3,7 +3,8 @@ import net.ltgt.gradle.errorprone.errorprone

plugins {
id("com.android.application")
kotlin("android")
alias(libs.plugins.kotlin.android)
// alias(libs.plugins.kotlin.compose)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// alias(libs.plugins.kotlin.compose)

@@ -2,7 +2,8 @@ import io.gitlab.arturbosch.detekt.Detekt

plugins {
id("com.android.application")
kotlin("android")
alias(libs.plugins.kotlin.android)
// alias(libs.plugins.kotlin.compose)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// alias(libs.plugins.kotlin.compose)

adinauer and others added 3 commits August 8, 2025 12:01
* Move Spring 7 and Spring Boot 4 packages

* Fix class not found due to OTel not supporting spring boot 4 yet (#4616)
Copy link
Contributor

github-actions bot commented Aug 8, 2025

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 405.47 ms 429.46 ms 23.99 ms
Size 1.58 MiB 2.09 MiB 524.25 KiB

Baseline results on branch: 08-04-attempt_to_fix_kotlin_2.2_issue

Startup times

Revision Plain With Sentry Diff
1e0ee95 509.08 ms 530.81 ms 21.73 ms

App size

Revision Plain With Sentry Diff
1e0ee95 1.58 MiB 2.09 MiB 524.25 KiB

@adinauer adinauer marked this pull request as ready for review August 8, 2025 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants